This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trying to configure hci_rpmsg example with DFU image manager brakes config

Trying to enable DFU on the hci_rpmsg example brakes config.

Replicate:
Using SES, opening hci_rpmsg with target NRF53 network core and selecting to configure project.
Sub systems -> Bluetooth -> DFU Image manager (enable)

Then press configure.
Configuration will fail (create_nordic_project.py failed) and trying to load configuration again will result in blank configuration view, not possible to change back.

Log contains:
warning: FLASH_MAP (defined at subsys/storage/flash_map/Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols: 
- MCUBOOT_IMG_MANAGER (defined at subsys/dfu/Kconfig:25), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)
warning: FLASH_PAGE_LAYOUT (defined at drivers/flash/Kconfig:54) has direct dependencies FLASH_HAS_PAGE_LAYOUT && FLASH with value n, but is currently being y-selected by the following symbols:
- STREAM_FLASH (defined at subsys/storage/stream/Kconfig:7), with value y, direct dependencies y (value: y)

Using GUI it is thus not possible to correct config directly.
Reopening project with clean build directory resets everything again.
By entering zephyr folder and deleting .config replacing it with .config.old the configuration dialog also works again.

Parents
  • It shouldn't be necessary to enable "Sub systems -> Bluetooth -> DFU Image manager"  in order to perform DFU on the network core. Following the steps under nRF5340: Network core bootloader-->Testing should be sufficient.

    Regarding the error "create_nordic_project.py failed", if you encounter this later on, try to change ("/")slashes to ("\")slashes. That might solve the issue. You could also try to reduce the path length if possible.

    Best regards,

    Simon

  • Everything has been generated by the SDK and "open nRF connect sdk project" option.
    I would thus assume every path in the underlying files were correct?

    The change happening in the config file is enough to halt the parsing for the python configurator.
    Trying to open the .config.old does not work either and I assume it is because it can no longer parse configs.
    Reloading the configurator after replacing the file works again so I believe there is a parsing error or corruption in the actual config causing issues.

    Where in the config/setup/project files would I start changing path slashes?

  • Using SES, opening hci_rpmsg with target NRF53 network core and selecting to configure project.
    Sub systems -> Bluetooth -> DFU Image manager (enable)

    I'm still curious why you want to do this? This should not be necessary in order to perform DFU on the network core. However, I don't have too much knowledge about this particular topic, and I might be missing out on something.

    Regarding the "create_nordic_project.py" error, I have not really looked into this, but I heard that changing the slashes solved the issue for a colleague. The error might arise due to the fact that this library is not meant to be used with the hci_rspmg/network core. I will look into this later on today/tomorrow..

    Best regards,

    Simon

Reply
  • Using SES, opening hci_rpmsg with target NRF53 network core and selecting to configure project.
    Sub systems -> Bluetooth -> DFU Image manager (enable)

    I'm still curious why you want to do this? This should not be necessary in order to perform DFU on the network core. However, I don't have too much knowledge about this particular topic, and I might be missing out on something.

    Regarding the "create_nordic_project.py" error, I have not really looked into this, but I heard that changing the slashes solved the issue for a colleague. The error might arise due to the fact that this library is not meant to be used with the hci_rspmg/network core. I will look into this later on today/tomorrow..

    Best regards,

    Simon

Children
  • Thank you Simon.
    I am learning and experimenting with how the tools fit together to change setup and edit the examples. I need to understand this to set up the new project where I will be building my application. It will use a generic rpmsg network core and the GATT attributes database will be updated from the application. Multiple options and data will be made available through the GATT protocol for the host to access. Depending on security and access levels I may need to restrict some data and even wait with showing their existance.

    I am a bit troubled by the SES vs West build system in Zephyr and how it ties into the graphical environment. Just making a single change broke the integration which was basically what I wanted to confirm would not happen.

    The goal is to have a project in SES where we have control over what versions of source go into the project and secure their availability in future. We need to have control over the network core as well, and will be talking to an external STM32 chip for some extended hardware control (brushless motor control).

    Just using one of the examples and modifying is not an acceptable option in this case. The SDK folder installed/unpacked by the nRF tools suite is 4 GB and does not lend itself very well to being put in our GIT repo.

  • I tried to build the hci_rspmg example with DFU Image manager enabled (CONFIG_IMG_MANAGER=y), and I got the exact same warnings as you:

    warning: FLASH_MAP (defi....

    warning: FLASH_PAGE_LAYOUT (defin.....

    I also got the following error: error: Aborting due to Kconfig warnings. This means that you have to resolve the two warnings above in order to get rid of the "create_nordic_project.py" error. I could look into these warnings, but I don't see any point of resolving this.

    If you want to update the network core from the application (e.g. the GATT attribute database), the library Peripheral CPU DFU (PCD) should get used for this. This is enabled from the application core through -Dmcuboot_CONFIG_PCD=y read nRF5340: Network core bootloader for more information.

    Best regards,

    Simon

Related