Skip to content

Commit

Permalink
samples: Fix configuration scheme
Browse files Browse the repository at this point in the history
In this commit:
- Removed redundant prj_no_dfu.conf configuration.
- moved all pm_static files to samples' main directories and
renamed them to be consistent with the NCS build system and
partition manager requirements.
- Updated documentation regarding the changes.

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski committed Apr 11, 2024
1 parent 47cf235 commit 0433028
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 72 deletions.
6 changes: 0 additions & 6 deletions doc/samples/sid_end_device.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ The sample supports the following build types:
- All from `Requirements`_
- Release version of the application.
It can be used to enable only the necessary application functionalities to optimize its performance.
* - No DFU
- :file:`prj_no_dfu.conf`
- All from `Requirements`_
- No DFU version of the application.
It can be used in simple scenarios where DFU is not required.
Additionally, it can be treated as a starting point when integrating the Sidewalk sample with a custom bootloader.

You can build the ``release`` firmware for ``build_target`` by running the following command in the project directory:

Expand Down
13 changes: 0 additions & 13 deletions samples/sid_end_device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ include(bootloader_version.cmake)
set(hci_ipc_KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/child_image/hci_ipc/Kconfig.root)
set(mcuboot_KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/child_image/mcuboot/Kconfig.root)

# Configurations
if(CONF_FILE)
get_filename_component(CONFIG_FILE_NAME ${CONF_FILE} REALPATH)
endif()

if("${CONFIG_FILE_NAME}" STREQUAL "prj_no_dfu.conf")
set(PM_FILENAME "pm_static_no_dfu.yml")
else()
set(PM_FILENAME "pm_static_dfu.yml")
endif()
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/${PM_FILENAME})


# Zephyr CMake project
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(sidewalk_sid_end_device)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

73 changes: 73 additions & 0 deletions samples/sid_end_device/pm_static_nrf52840dk_nrf52840_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
app:
address: 0x7200
end_address: 0xfd000
region: flash_primary
size: 0xf5e00
external_flash:
address: 0xf6000
end_address: 0x800000
region: external_flash
size: 0x70a000
mcuboot:
address: 0x0
end_address: 0x7000
region: flash_primary
size: 0x7000
mcuboot_pad:
address: 0x7000
end_address: 0x7200
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x7000
end_address: 0xfd000
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
size: 0xf6000
span: *id001
mcuboot_primary_app:
address: 0x7200
end_address: 0xfd000
orig_span: &id002
- app
region: flash_primary
size: 0xf5e00
span: *id002
mcuboot_secondary:
address: 0x0
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0xf6000
placement:
align:
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xf6000
mfg_storage:
address: 0xff000
end_address: 0x100000
region: flash_primary
size: 0x1000
settings_storage:
address: 0xfd000
end_address: 0xff000
placement:
align:
start: 0x1000
before:
- end
region: flash_primary
size: 0x2000
sram_primary:
address: 0x20000000
end_address: 0x20040000
region: sram_primary
size: 0x40000
119 changes: 119 additions & 0 deletions samples/sid_end_device/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
EMPTY_0:
address: 0xfe000
end_address: 0xff000
placement:
after:
- settings_storage
region: flash_primary
size: 0x1000
app:
address: 0x8200
end_address: 0xfc000
region: flash_primary
size: 0xf3e00
external_flash:
address: 0x134000
end_address: 0x800000
region: external_flash
size: 0x6cc000
mcuboot:
address: 0x0
end_address: 0x8000
region: flash_primary
size: 0x8000
mcuboot_pad:
address: 0x8000
end_address: 0x8200
placement:
align:
start: 0x4000
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x8000
end_address: 0xfc000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xf4000
span: *id001
mcuboot_primary_1:
address: 0x0
device: nordic_ram_flash_controller
end_address: 0x40000
region: ram_flash
size: 0x40000
mcuboot_primary_app:
address: 0x8200
end_address: 0xfc000
orig_span: &id002
- app
region: flash_primary
size: 0xf3e00
span: *id002
mcuboot_secondary:
address: 0x0
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0xf4000
placement:
align:
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xf4000
mcuboot_secondary_1:
address: 0xf4000
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0x134000
region: external_flash
size: 0x40000
mfg_storage:
address: 0xff000
end_address: 0x100000
region: flash_primary
size: 0x1000
otp:
address: 0xff8100
end_address: 0xff83fc
region: otp
size: 0x2fc
pcd_sram:
address: 0x20000000
end_address: 0x20002000
placement:
after:
- start
region: sram_primary
size: 0x2000
ram_flash:
address: 0x40000
end_address: 0x40000
region: ram_flash
size: 0x0
rpmsg_nrf53_sram:
address: 0x20070000
end_address: 0x20080000
placement:
before:
- end
region: sram_primary
size: 0x10000
settings_storage:
address: 0xfc000
end_address: 0xfe000
placement:
align:
start: 0x4000
before:
- end
region: flash_primary
size: 0x2000
sram_primary:
address: 0x20002000
end_address: 0x20070000
region: sram_primary
size: 0x6e000
22 changes: 0 additions & 22 deletions samples/sid_end_device/prj_no_dfu.conf

This file was deleted.

16 changes: 0 additions & 16 deletions samples/sid_end_device/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@ tests:
- nrf54l15pdk_nrf54l15_cpuapp
tags: Sidewalk hello

sample.sidewalk.hello.no_dfu:
build_only: true
platform_allow:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
- nrf54l15pdk_nrf54l15_cpuapp
extra_args:
CONF_FILE=prj_no_dfu.conf
extra_configs:
- CONFIG_SID_END_DEVICE_PERSISTENT_LINK_MASK=y
integration_platforms:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
- nrf54l15pdk_nrf54l15_cpuapp
tags: Sidewalk hello

sample.sidewalk.hello.ble_only:
build_only: true
platform_allow:
Expand Down

0 comments on commit 0433028

Please sign in to comment.