DFU in nrf52820

Hi Everyone,

I'm using VS Code, nrfConnect SDK v1.7.0

I'm trying for minimal bluetooth roles(either central/peripheral) along dfu support in nrf52820 chipset.

when I try to build the code, I get build error such that 

"

region `FLASH' overflowed by 30012 bytes

I think it's possible to add DFU with one of either bluetooth roles, please let me know if it's possible?

I wish to overwrite current running firmware using serial DFU and without secondary slot in flash.

Is there any minimal version of following build configuration, so that everything can fit in?

Here is the proj.conf I tried to build.

# Enable mcumgr.
CONFIG_MCUMGR=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

# Enable the serial mcumgr transport.
CONFIG_MCUMGR_SMP_UART=y

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

#BT CONFIG
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y

CONFIG_BT_DEVICE_NAME="TMBLE_CONTROLLER"

CONFIG_BT_LL_SOFTDEVICE=y

  • Hello Visma, and sorry about the delay.

    I think it's possible to add DFU with one of either bluetooth roles, please let me know if it's possible?

    Yes, both should be possible.

    Is there any minimal version of following build configuration, so that everything can fit in?

    In a way. There are several configurations that are enabled by default that should be turned off in order for you to get a minimal build. You can find all of these configurations on the prj_minimal.conf files that are provided in some of our example projects. See for instance samples/bluetooth/peripheral_uart/prj_minimal.conf, and try to compare these configurations with what you need, and see the resulting flash space usage.

    I wish to overwrite current running firmware using serial DFU and without secondary slot in flash.

    There is allways the option of doing DFU using serial recovery mode, with which you can get a new image over the serial port. You would have to enter serial recovery mode either holding a button on startup or setting the GPREGRET register. It also has some other limitations. Besides that, it seems that you would need a secondary slot.

    Best regards,

    Elfving

Related