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

    I succeeded to make a step further.

    I used the python script pm_to_dts.py to generate the corresponding devicetree entries. 
    The script is complicate to use but when it worked, it is missing something like the following. 
    The compatible line and the address and size cells definition (the 1 needs to <1> but the code did hide the 1 when I wrote it correctly).

    &flash1 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = 1;
    		#size-cells = 1;

    But then it compiles with errors.

    Now I'm missing how I can find the equivalent to the pm_config.h.
    In that Header there where definitons like:
    PM_MCUBOOT_PRIMARY_ID
    PM_CPUNET_APP_ADDRESS
    PM_CPUNET_APP_END_ADDRESS
    PM_CPUNET_B0N_ADDRESS

    which we used in our code.

    Can someone pinpoint me to how I can retrieve theses from the dts partitions nowadays?

    Cheers,
    Thilo

Reply
  • Hi

    I succeeded to make a step further.

    I used the python script pm_to_dts.py to generate the corresponding devicetree entries. 
    The script is complicate to use but when it worked, it is missing something like the following. 
    The compatible line and the address and size cells definition (the 1 needs to <1> but the code did hide the 1 when I wrote it correctly).

    &flash1 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = 1;
    		#size-cells = 1;

    But then it compiles with errors.

    Now I'm missing how I can find the equivalent to the pm_config.h.
    In that Header there where definitons like:
    PM_MCUBOOT_PRIMARY_ID
    PM_CPUNET_APP_ADDRESS
    PM_CPUNET_APP_END_ADDRESS
    PM_CPUNET_B0N_ADDRESS

    which we used in our code.

    Can someone pinpoint me to how I can retrieve theses from the dts partitions nowadays?

    Cheers,
    Thilo

Children
No Data
Related