Not able to compile smp_svr with overlay-cdc.conf for nrf52840dongle_nrf52840 board

Hi Team,

I want to use smp_svr application in nrf52840 dongle but I am getting below mentioned compilation error when compiling with overlay-cdc.conf. I have tried it in three NCS 1.8.0, 1.9.0 and 1.9.1. Can you please look into this and let me know for the solution?

Application: smp_svr

Board: nrf52840dongle_nrf52840

SDK: NCS 1.8.0, 1.9.0, 1.9.1 (tried in all three SDK)

Error:

warning: UART_MCUMGR (defined at c:\Projects\1_9_1\smp_svr\build\drivers\console\Kconfig:213) has direct dependencies CONSOLE with value n, but is currently being y-selected by the following symbols:
- MCUMGR_SMP_UART (defined at c:\Projects\1_9_1\smp_svr\build\subsys\mgmt\mcumgr\Kconfig:406), with value y, direct dependencies MCUMGR (value: y), and select condition MCUMGR (value: y)
Parsing C:/Users/149373/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/Users/149373/ncs/v1.9.1/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840_defconfig'
Merged configuration 'C:/Projects/1_9_1/smp_svr/prj.conf'
Merged configuration 'C:/Projects/1_9_1/smp_svr/overlay-cdc.conf'

error: Aborting due to Kconfig warnings

Regards,

Bhavya

Parents
  • @Bhavya: I'm seeing that you have another case where you have the smp_svr with cdc overlay worked for you, at least it can compile. Could you confirm that you managed to compile and make it work. If you did, could you share what you did ? 

    I found that if I add CONFIG_CONSOLE=y I can compile but it will complain about flash area for MCUBoot too small. 

  • Hi @Hung Bui,

    I have tried with CONFIG_CONSOLE=y. In my case also it was complaining for MCUBoot too small. Flash overflowed error.  So I have added CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 in MCUBoot proj.conf which solved this flash area related error and I have remapped partition in fstab-stock.dts file which is being included in the nrf52840dongle_nrf52840.dts file. I have flashed the nrf52840 dongle with smp_svr (merged.hex) but it is not popping up with valid USB port in my system. It is coming up with USB-DEV device without any valid port.

    I am using NCS 1.8.0. Can you please check at your end?

    Regards,

    Bhavya

Reply
  • Hi @Hung Bui,

    I have tried with CONFIG_CONSOLE=y. In my case also it was complaining for MCUBoot too small. Flash overflowed error.  So I have added CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 in MCUBoot proj.conf which solved this flash area related error and I have remapped partition in fstab-stock.dts file which is being included in the nrf52840dongle_nrf52840.dts file. I have flashed the nrf52840 dongle with smp_svr (merged.hex) but it is not popping up with valid USB port in my system. It is coming up with USB-DEV device without any valid port.

    I am using NCS 1.8.0. Can you please check at your end?

    Regards,

    Bhavya

Children
  • Hi Bhavya, 

    The reason you get the USB-DEV could be because that the usb.overlay was not used. Pleas make sure the overlay is used or you can copy the overlay into app.overlay to make it automatically used in VS Code. 

    Also you would need to select CONFIG_USB_DEVICE_PID instead of leaving as the default one. 

    I attached here the project that worked for me. It's built on SDK v1.9.1. I haven't tested upload command but the mcumgr image list mode worked. 

    smp_svr_cdc.zip

    Note that the reason why we need to increase the size of the MCUBoot when compiling for nRF52840 Dongle is that we added the support for USB DFU in MCUBoot (recovery mode). That's why the size of the MCUBoot increased. If  you don't plan to support USB recovery mode (enter DFU by a button press) you can remove the overlay inside \bootloader\mcuboot\boot\zephyr\boards. 

Related