Issues migrating to sysbuild

I have a custom board (nrf52840) project that compiles successfully with SDK  2.7.0 using the "system default" build configuration.

I'm attempting to migrate to the "newer" sysbuild build system and am having some issues:

1. I first attempted to jump to 2.9.0 (both SDK and tools), but it failed trying to compile nrfx_flag32_allocator.c (error says it can't find nrfx_flag32_allocator.c.obj.d).   Is there some different configuration statement required for sysbuild that includes this helper function file?

2. I then decided to attempt using sysbuild with 2.8.0 and got the same error.

3. So I tried to compile 2.7.0 using sysbuild and still got the same error.   Remember that 2.7.0 compiles successfully with "No sysbuild".

4. Then I tried to compile using 2.9.0, but specifying No sysbuild.   This fails as well, but for a different reason: zephyr\zephyr_pre0.elf section `text' will not fit in region `FLASH'  and an undefined reference to '__device_dts_ord_119'.      

The regions.yml and paritions.yml are the same for all three versions.

I'm using the same .dts file for the custom board and partition manager file in all build attempts.  

I think I was successful at converting my .dts to the version 2 HW format, as the warning no longer appears.

Where can I start to look?

Thanks!

Parents
  • More info relating to "point 4" above.   I was able to resolve the memory issue by editing the partition manager file.   But the undefined reference message changed to __device_dts_ord_116.      The  devicetree_generated.h file seems to indicate that index 116 is the bt_hci_sdc   

    Is there some new CONFIG statement that is needed for this?

    Thanks!

  • Hi,

    Could you share the layout of your project folder? What I'm curious about is if you're still using child images or if you've successfully migrated to companion components per the sysbuild migration guides: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html 

    Kind regards,
    Andras

  • Thanks for your response.

    Here is a screen capture of the project folder.   Note that this is a single-image project.  I used some samples from the 2.9.0 zephyr/samples/bluetooth collection as a guide.

    I created a sysbuild folder/directory, when I read over the migration guide, but it is empty.   Note that most of the sample projects don't have a sysbuild folder.   I got the impression that this might only be used for multi-image projects.

    The 2.7.0 no-sysbuild version works fine.

    The 2.9.0 no-sysbuild version fails with the error reported as undefined reference to __device_dts_ord_116

    The 2.9.0 sysbuild version fails about a third of the way through the compilation with the error reported as:  ...\v2.9.0\modules\hal\nordic\nrfx\helpers\nrfx_flag32_allocator.c.obj.d: No such file or directory

  • Another update...

    I copied my entire project folder to  a new location and cleaned up a few files/names/etc.   I'm not sure what changed, but now I can build using both using sysbuild and without sysbuild (no sysbuild option) when using release 2.7.0

    But if I change to release 2.8.0 or 2.9.0, builds using either sysbuild or no sysbuild fail due to an undefined reference to __device_dts_ord_116.   Checking the devicetree_generated.h file, the index 116 points to bt_hci_sdc.

    So something seems to have changed between 2.7.0 and 2.8.0.  I checked the release notes for 2.8.0 and don't see any bluetooth items that have changed.     

    Can you assist in determining what CONFIG (or devicetree) items changed to cause this error or suggestions how to further debug?

    Thanks!

  • Hi again,

    Noted. Since it's a single image build then there might not be any need to add anything to the sysbuild folder, but there might be some sysbuild image id's https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/app_dev/bootloaders_dfu/sysbuild_image_ids.html or forced options https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/app_dev/config_and_build/sysbuild/sysbuild_forced_options.html that you have to move from prj.conf to sysbuild.conf. The simples example to illustrate this is CONFIG_BOOTLOADER_MCUBOOT=y in prj.conf to SB_CONFIG_BOOTLOADER_MCUBOOT=y in sysbuild.conf.

    But as you say, if you don't use companion components previously known as child_images (MCUboot is one of them), then you might not need to add configurations to sysbuild.conf or sysbuild/<companion_component>.conf 

    The first item to declare here is: Are you using MCUboot as your bootloader? I see the pm_static.yml, so I would expect so

    CktDesigner said:
    I copied my entire project folder to  a new location and cleaned up a few files/names/etc.   I'm not sure what changed, but now I can build using both using sysbuild and without sysbuild (no sysbuild option) when using release 2.7.0

    Good news indeed. This means that item 4) in your original description is no longer an issue?

    One thought that might cause this is if you were building to the same directory in between versions, i.e west build -d <your-folder> in both versions. Removing the previous build is the best way to avoid any issues that could come with this.

    In 2.7.0, hardware model 2 was introduced, which was the largest change https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.html 

    CktDesigner said:
    But if I change to release 2.8.0 or 2.9.0, builds using either sysbuild or no sysbuild fail due to an undefined reference to __device_dts_ord_116.   Checking the devicetree_generated.h file, the index 116 points to bt_hci_sdc.

    In the case that you're using MCUboot, then there might be a companion component configuration that you're missing, i.e something that you previously could define in prj.conf needs to be added to sysbuild/mcuboot.conf (just a guess based on that assumption).

    Let me know about these items and I'll get back to you

    Kind regards,
    Andreas

  • Hi Andreas,

    Thanks for your response!

    To answer some of your questions:

    1) This is a single image build.   MCUBOOT is not used (may be added later).    The source has been under development for a while and compiles/runs with version 2.5.2       I'm currently trying to upgrade some things and bring the project "up-to-date" with respect to the tool/sdk versions.

    2) I added the pm_static.yml because I saw warnings issued during the newer version builds that said something to the effect that the partitioning specified in the .dts was not being used and that the partition manager was in charge.   Adding the pm.yml file eliminated that warning.

    3) Note that when using version 2.70, everything builds, so I think my conversion to HWMV2 was successful.   I did not use the conversion script, but instead did a manual conversion.  After making the changes, the warnings that HWMV1 was still being used, were eliminated.

    4) I use separate build folders for each configuration. See the image below.    Note that both sysbuild/nosysbuild configurations build successfully for version 2.7.0.     Neither sysbuild nor nosysbuild  configurations for 2.8.0 or 2.9.0 build.  The failures are all due to the undefined reference to __device_dts_ord_116.      I don't know how to debug this (note what I've tried in previous postings).

    5) Note in the image, the sysbuild configurations have "sub-levels" (as expected), but the lower level doesn't specify "sysbuild".    Is this expected?

    Thanks!!!

      

Reply
  • Hi Andreas,

    Thanks for your response!

    To answer some of your questions:

    1) This is a single image build.   MCUBOOT is not used (may be added later).    The source has been under development for a while and compiles/runs with version 2.5.2       I'm currently trying to upgrade some things and bring the project "up-to-date" with respect to the tool/sdk versions.

    2) I added the pm_static.yml because I saw warnings issued during the newer version builds that said something to the effect that the partitioning specified in the .dts was not being used and that the partition manager was in charge.   Adding the pm.yml file eliminated that warning.

    3) Note that when using version 2.70, everything builds, so I think my conversion to HWMV2 was successful.   I did not use the conversion script, but instead did a manual conversion.  After making the changes, the warnings that HWMV1 was still being used, were eliminated.

    4) I use separate build folders for each configuration. See the image below.    Note that both sysbuild/nosysbuild configurations build successfully for version 2.7.0.     Neither sysbuild nor nosysbuild  configurations for 2.8.0 or 2.9.0 build.  The failures are all due to the undefined reference to __device_dts_ord_116.      I don't know how to debug this (note what I've tried in previous postings).

    5) Note in the image, the sysbuild configurations have "sub-levels" (as expected), but the lower level doesn't specify "sysbuild".    Is this expected?

    Thanks!!!

      

Children
No Data
Related