Nordic FOTA setup for external QSPI flash with the new 2.6 SDK

We are working on a custom board (gateway BIS) with the nrf5340.  Currently our system is on the 2.5.2 SDK and we currently have FOTA working with an external QSPI flash and updating both the app partition and the BLE core partition simultaneously.

We are currently porting this code to the latest 2.6.0 SDK as we would like to take advantage of the SoftDevice controller and some of the features it offers (Channel Mapping).  I have converted the example code changes from the nrf5340_audio example (as this was the basis for our project.)

When I try to build with the buildprog.py script this is the error I now get.

python buildprog.py -c both -b debug -d gateway  -m external -M --pristine -p

Traceback (most recent call last):
  File "buildprog.py", line 501, in <module>
    __main()
  File "buildprog.py", line 387, in __main
    raise Exception("DFU arguments only accepted when using controller: " +
Exception: DFU arguments only accepted when using controller: ACS_nRF53. Please use standard tools.

So I have tried with this line (which I think configures the old BLE stack, which we want the new SoftDevice controller) and get these errors:

python buildprog.py -c both -b debug -d gateway --ctlr ACS_nRF53 -m external -M --pristine -p

In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain.h:50,
                 from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util.h:18,
                 from C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:26,
                 from C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:12,
                 from C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/flash.h:28,
                 from C:/ncs/v2.6.0/zephyr/drivers/flash/spi_nor.c:14:
C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "jedec,spi-nor jedec-id required for non-runtime SFDP"
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~
C:/ncs/v2.6.0/zephyr/drivers/flash/spi_nor.c:1468:1: note: in expansion of macro 'BUILD_ASSERT'
 1468 | BUILD_ASSERT(DT_INST_NODE_HAS_PROP(0, jedec_id),
      | ^~~~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "jedec,spi-nor size required for non-runtime SFDP page layout"
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~

I have also copied the nrf5340_audio example application and created a build configuration in VSCode and I get this error:

CMake Warning at C:/ncs/v2.6.0/zephyr/CMakeLists.txt:1957 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring done
CMake Error at C:/ncs/v2.6.0/zephyr/cmake/modules/extensions.cmake:424 (add_library):
  Cannot find source file:

    C:/Projects/Somnius/Examples/nrf5340_audio/src/utils/nrf5340_audio_dk.c
Call Stack (most recent call first):
  C:/ncs/v2.6.0/zephyr/cmake/modules/kernel.cmake:211 (zephyr_library_named)
  C:/ncs/v2.6.0/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:52 (find_package)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe '-Bc:\Projects\Somnius\Examples\nrf5340_audio\build' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION=NONE '-Sc:\Projects\Somnius\Examples\nrf5340_audio'

I have tried looking at this thread, but this was for headset, and was not able to get the west command to work.

 nRF5340 audio application FOTA problem with latest SDK 

Thanks,
Chris

Parents
  • Hello Chris,

    Maria is on vacation, so I'll be handling this issue in the meantime.

    Could you please provide the complete log here? The error message "E: Failed to open flash area ID 2 (image 0 slot 1): -19, cannot continue" suggests there is a problem with opening the flash area during the bootloader process. The error message has been defined here. Please ensure that the partitions defined in `pm_static.yml` are correctly configured and match the expected layout for your application and MCUboot.

    Kind regards,

    Abhijith

Reply
  • Hello Chris,

    Maria is on vacation, so I'll be handling this issue in the meantime.

    Could you please provide the complete log here? The error message "E: Failed to open flash area ID 2 (image 0 slot 1): -19, cannot continue" suggests there is a problem with opening the flash area during the bootloader process. The error message has been defined here. Please ensure that the partitions defined in `pm_static.yml` are correctly configured and match the expected layout for your application and MCUboot.

    Kind regards,

    Abhijith

Children
No Data
Related