cant access internal flash with sysbuild enabled

Hi support

I am developing code for the application core on the nrf5340 and testing this on an nrf7002dk dev kit. I am using sdk version 3.0.0.

The code needs to read from and write to the internal nrf5340 flash. As a start, I have copied the approach used in the soc_flash_nrf sample. This accesses the storage_partition. However I find that this code only works if sysbuild is disabled in the build configuration. If sysbuild is enabled, the device_is_ready() function fails when i run the code on the dev kit.

Is there a way that I can access the internal flash with code that is build with sysbuild enabled ?

Parents
  • Hello,

    I was not able to reproduce this issue with the soc_flash_nrf sample. However, the relevant difference when enabling Sysbuild is likely that the Partition Manager is used to manage the memory layout. In your build folder, please check whether the /<project_name>/zephyr/include/generated/pm_config.h file includes the PM_SETTINGS_STORAGE_DEV or PM_NVS_STORAGE_DEV symbol. You can also check the generated partition file (build/partitions.yml) to check if the storage partition got included.

    Best regards,

    Vidar

  • I looked at the build directories created when my code was built with sysbuild and without sysbuild:

    1) code build with sysbuild
    No build/<project_name/zephyr/include directory was generated
    the file build/partition.yml was created. it included partitions for app, otp, rpmsg_nrf53_sram and sram_primary but there was no storage_partition

    as before the device_is_ready() function failed when I ran the code.


    2) code built without systbuild
    The directory build/<project_name/zephyr/include/generated was created but it did not contain a file pm_config.h
    no file build/partition.yml was created

    as before the code ran successfully on the dev board.


    I have now worked out how to compile the soc_flash_nrf sample code for my nrf7002dk board with sysbuild enabled. When I run this on the board I find that it runs successfully. However, I am not clear why my code is failing. Do you have any suggestions ?

Reply
  • I looked at the build directories created when my code was built with sysbuild and without sysbuild:

    1) code build with sysbuild
    No build/<project_name/zephyr/include directory was generated
    the file build/partition.yml was created. it included partitions for app, otp, rpmsg_nrf53_sram and sram_primary but there was no storage_partition

    as before the device_is_ready() function failed when I ran the code.


    2) code built without systbuild
    The directory build/<project_name/zephyr/include/generated was created but it did not contain a file pm_config.h
    no file build/partition.yml was created

    as before the code ran successfully on the dev board.


    I have now worked out how to compile the soc_flash_nrf sample code for my nrf7002dk board with sysbuild enabled. When I run this on the board I find that it runs successfully. However, I am not clear why my code is failing. Do you have any suggestions ?

Children
Related