Porting child image based project to sysbuild

Hi

We are currently porting a project with a custom board and custom netcore image to sysbuild.

My current problem is, that we have a custom project for the netcore image which was added to the appcore project via CMakeLists.txt and add_child_image.

How is this done via sysbuild nowadays?

The former child image needs to be build during appcore build and added to the domain netcore so sysbuild recognizes it.

I tried it with the sysbuild cmake file:

ExternalZephyrProject_Add(
    APPLICATION net_core
    SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../netcore-project"
    BOARD pan_ng_module/nrf5340/cpunet
)

set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET net_core)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION net_core CACHE INTERNAL "")

add_dependencies(${DEFAULT_IMAGE} net_core)


But then there is the net_provision.hex which I don't know why it is produced!
Do I need to define the image for the netcore domain differently?

Thanks for any hint!


Cheers,
Thilo

Parents
  • Hi Thilo,

    You normally only need to add a kconfig.sysbuild as explained under Adding custom network core images.

    The creation of net_provision.hex does not indicate an issue I believe, as that is generated if you have secure boot for the net core enabled. See Migrating from multi-image builds to sysbuild. You do not get it if you disable secure boot for the network core with SB_CONFIG_SECURE_BOOT_NETCORE=n in sysbuild.conf.

  • Hi Einar

    thank you for your answer!
    Then I will ignore net_provision.hex, cause we need the b0n bootloader to be able to update the net-core.

    Another question is, why the merged.hex is not generated anymore?

    The Build works and it generates the zephyr.hex files for mcuboot, cpuapp app, b0n and cpunet app (and net_provision.hex). So usually I would expect the merged.hex files. Was the generating of the merged.hex files remove?

    Thank you for your time!

    Cheers,
    Thilo

  • Hi Thilo,

    Looking at the error "Address range 0x02008800..0x0200fa18 is outside the memory ranges defined for programming through the Network core (Generic)", it seems you have some remains of earlier attempts of adding the 0x01000000 offset, and so that is added twice. That needs to be reverted.

  • Yeah correct but! Here we go:



    Partition Offset 0x1008800 in the partitions dtsi:
    Error one:

    -- runners.nrfutil: Flashing file: ..../build/net_core/../signed_by_b0_net_core.hex
    -- runners.nrfutil: Connecting to probe
    -- runners.nrfutil: Erasing address ranges touched by firmware
    Error: One or more batch tasks failed:
     * 600104758: Device error: Address range 0x02008800..0x0200fa18 is outside the memory ranges defined for programming through the Network core (Generic)




    Partition Offset 0x8800 without changes of me at the nrfsdk:
    Error one:
    /media/data/projects/pan-ng/nrf-sdk-3.3.0/ZephyrSDK/nrf/subsys/pcd/src/pcd.c: In function 'network_core_pcd_cmdset':
    <command-line>: warning: overflow in conversion from 'long long unsigned int' to 'off_t' {aka 'long int'} changes value from '18446744073692809216' to '-16742400' [-Woverflow]
    <command-line>: note: in definition of macro 'PCD_NET_CORE_APP_OFFSET'


    Error two:
    - runners.nrfutil: Flashing file: /media/data/projects/pan-ng/nrf-sdk-3.3.0/PAN-NG-PROD_APPCORE/build/net_provision.hex
    -- runners.nrfutil: Connecting to probe
    -- runners.nrfutil: Erasing address ranges touched by firmware
    Error: One or more batch tasks failed:
    * 600104758: Device error: Address range 0x000085a8..0x000085c8 is outside the memory ranges defined for programming through the Network core (Generic)



    Either way, something wents wrong!
    IMHO, the parition offset with 0x8800 is the correct one in devicetree, so I tried to fix that.

    Cheers,
    Thilo

  • Hi Thilo,

    I see. I am not able to understand what is going on there. I put together (with help of AI) a minimal sample that demonstrat a nRF5340 project with mcuboot and b0n using sysbuild and without partition manager. This builds for the DK and seems to work as expected. Can you use that as a reference? It whoudl work out of the box on a nRF5340 DK when built with NCS v3.4.0-rc1 (and can together with the DK board files hopefully be used as a reference for your custom board).sysbuild_netcore_demo.zip

  • Hi Thilo,

    Not in the sense that I am not sure why things are not working with your project. But have you had a look at the demo I uploded earlier today? Does that work for you as well, and if so can you use that as a reference?

Reply Children
No Data
Related