diff --git a/samples/modules/canopennode/CMakeLists.txt b/samples/modules/canopennode/CMakeLists.txt index fb792ec299a..dea27437d2e 100644 --- a/samples/modules/canopennode/CMakeLists.txt +++ b/samples/modules/canopennode/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.20.0) macro(app_set_runner_args) board_runner_args(canopen "--node-id=${CONFIG_CANOPEN_NODE_ID}") - board_runner_args(dfu-util "--dfuse-modifiers=force:mass-erase") - board_runner_args(pyocd "--erase") - board_runner_args(nrfjprog "--erase") endmacro() find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/samples/modules/canopennode/README.rst b/samples/modules/canopennode/README.rst index fcd8649b690..66fc6514369 100644 --- a/samples/modules/canopennode/README.rst +++ b/samples/modules/canopennode/README.rst @@ -394,48 +394,33 @@ Building and Running for FRDM-K64F The sample can be rebuilt with MCUboot and program download support for the FRDM-K64F as follows: -#. Build and flash MCUboot by following the instructions in the - :ref:`mcuboot` documentation page. - -#. Rebuild the CANopen sample with MCUboot support: +#. Build the CANopenNode sample with MCUboot support: .. zephyr-app-commands:: - :zephyr-app: samples/modules/canopennode + :tool: west + :app: samples/modules/canopennode :board: frdm_k64f :goals: build - :gen-args: -DCONFIG_BOOTLOADER_MCUBOOT=y + :west-args: --sysbuild :compact: -#. Sign the newly rebuilt CANopen sample binary (using either the - demonstration-only RSA key from MCUboot or any other key used when - building MCUboot itself): +#. Flash the newly built MCUboot and CANopen sample binaries using west: .. code-block:: console - west sign -t imgtool --bin --no-hex -- --key mcuboot/root-rsa-2048.pem \ - --version 1.0.0 - -#. Flash the newly signed CANopen sample binary using west: - - .. code-block:: console - - west flash --skip-rebuild --bin-file zephyr/zephyr.signed.bin + west flash --skip-rebuild #. Confirm the newly flashed firmware image using west: .. code-block:: console - west flash --skip-rebuild --runner canopen --confirm-only + west flash --skip-rebuild --domain canopennode --runner canopen --confirm-only -#. Finally, resign the CANopen sample binary with a new version number - and perform a program download over CANopen: +#. Finally, perform a program download via CANopen: .. code-block:: console - west sign -t imgtool --bin --no-hex -- --key mcuboot/root-rsa-2048.pem \ - --version 1.0.1 - west flash --skip-rebuild --bin-file zephyr/zephyr.signed.bin \ - --runner canopen + west flash --skip-rebuild --domain canopennode --runner canopen Modifying the Object Dictionary ******************************* diff --git a/samples/modules/canopennode/sample.yaml b/samples/modules/canopennode/sample.yaml index 43877bd8289..e1448bf73d4 100644 --- a/samples/modules/canopennode/sample.yaml +++ b/samples/modules/canopennode/sample.yaml @@ -18,14 +18,9 @@ tests: CONFIG_FLASH_HAS_DRIVER_ENABLED platform_exclude: nucleo_h723zg nucleo_h743zi nucleo_h745zi_q nucleo_h753zi sample.modules.canopennode.program_download: - build_only: true - platform_exclude: native_posix native_posix_64 rcar_h3ulcb_cr7 qemu_x86 qemu_x86_64 - filter: dt_label_with_parent_compat_enabled("slot0_partition", "fixed-partitions") and - dt_label_with_parent_compat_enabled("slot1_partition", "fixed-partitions") and - dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions") and - dt_chosen_enabled("zephyr,flash-controller") and - CONFIG_FLASH_HAS_DRIVER_ENABLED - extra_configs: - - CONFIG_BOOTLOADER_MCUBOOT=y + sysbuild: True + platform_allow: frdm_k64f twr_ke18f + integration_platforms: + - frdm_k64f sample.modules.canopennode.no_storage: extra_args: CONF_FILE=prj_no_storage.conf diff --git a/samples/modules/canopennode/sysbuild.conf b/samples/modules/canopennode/sysbuild.conf new file mode 100644 index 00000000000..47f00ff3cff --- /dev/null +++ b/samples/modules/canopennode/sysbuild.conf @@ -0,0 +1 @@ +SB_CONFIG_BOOTLOADER_MCUBOOT=y