Skip to content

Commit

Permalink
sysbuild: update image specific names to use DEFAULT_IMAGE
Browse files Browse the repository at this point in the history
The image name is hard coded for dependency configuration, but when
using sysbuild the image name of the default image is based on the
name of the folder. This means that if sample is copied elsewhere for
local modification the hard coded name may no longer match the default
image name.

Improve this by using DEFAULT_IMAGE variable instead of hard coded name.

Jira: NCSDK-28028

Signed-off-by: Torsten Rasmussen <[email protected]>
  • Loading branch information
tejlmand authored and nordicjm committed Oct 28, 2024
1 parent 932fa5d commit 53bebe9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions applications/machine_learning/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(SB_CONFIG_PARTITION_MANAGER)
endif()

# Add a dependency so that the remote image will be built first.
sysbuild_add_dependencies(CONFIGURE machine_learning ipc_radio remote)
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} ipc_radio remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH machine_learning ipc_radio remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} ipc_radio remote)

endif()
4 changes: 2 additions & 2 deletions samples/caf_sensor_manager/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ if(SB_CONFIG_PARTITION_MANAGER)
endif()

# Add a dependency so that the remote sample will be built and flashed first
sysbuild_add_dependencies(CONFIGURE caf_sensor_manager remote)
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH caf_sensor_manager remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
4 changes: 2 additions & 2 deletions samples/event_manager_proxy/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET remote)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION remote CACHE INTERNAL "")

# Add a dependency so that the remote sample will be built and flashed first
sysbuild_add_dependencies(CONFIGURE event_manager_proxy remote)
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH event_manager_proxy remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
4 changes: 2 additions & 2 deletions samples/ipc/ipc_service/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET remote)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION remote CACHE INTERNAL "")

# Add a dependency so that the remote sample will be built and flashed first
sysbuild_add_dependencies(CONFIGURE ipc_service remote)
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH ipc_service remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
4 changes: 2 additions & 2 deletions tests/benchmarks/multicore/idle/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET remote)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION remote CACHE INTERNAL "")

# Add a dependency so that the remote image will be built and flashed first
add_dependencies(idle remote)
add_dependencies(${DEFAULT_IMAGE} remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH idle remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
4 changes: 2 additions & 2 deletions tests/subsys/event_manager_proxy/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET remote)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION remote CACHE INTERNAL "")

# Add a dependency so that the remote sample will be built and flashed first
add_dependencies(event_manager_proxy remote)
add_dependencies(${DEFAULT_IMAGE} remote)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH event_manager_proxy remote)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
4 changes: 2 additions & 2 deletions tests/subsys/pcd/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET hello_world)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION hello_world CACHE INTERNAL "")

# Add a dependency so that the remote sample will be built and flashed first
add_dependencies(pcd hello_world)
add_dependencies(${DEFAULT_IMAGE} hello_world)
# Add dependency so that the remote image is flashed first.
sysbuild_add_dependencies(FLASH pcd hello_world)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} hello_world)

0 comments on commit 53bebe9

Please sign in to comment.