I'm adding DFU over Bluetooth support to an existing application based on nRF Connect v2.3.0 following these instructions. What the instructions lack (and possibly is a given for Peripheral LBS, although I don't readily see it) is the device tree definition of `boot_partion` that is required.
I've added the following block to my custom boards DTS file:
&flash0 { partitions { compatible = "fixed-partitions"; boot_partition: partition@0 { label = "mcuboot"; reg = <0x000000000 0x00010000>; }; }; };
But get a warning from the nRF Connect VSCode extension that my defintion of `reg` is ill-formed:
It is saying the form is `addr addr size` as opposed to `addr size`. Building it anyway I get the following failure:
devicetree error: 'reg' property in <Node /soc/flash-controller@4001e000/flash@0/partitions/partition@0 in 'C:/ncs/v2.3.0/zephyr/misc/empty_file.c'> has length 8, which is not evenly divisible by 12 (= 4*(<#address-cells> (= 2) + <#size-cells> (= 1))). Note that #*-cells properties come either from the parent node or from the controller (in the case of 'interrupts').
Suspecting that the warning is correct I find it builds without issue if I format it `addr addr size`, however, it fails at the very end:
c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH' overflowed by 5436 bytes
This isn't a shock because I didn't know what values to choose for the `addr addr size` format.
So - My question is 1) What is the correct format for defining the reg property for an image partition? and 2) What should the default value be for a nRF52840 based board?