Hello,
Using 2.7 and nrf5340dk/thingy53
I am trying to setup boot mode via
https://docs.zephyrproject.org/latest/services/retention/index.html
in the app and mcuboot;
+sram@2003FFFF {
+ compatible = "zephyr,memory-region", "mmio-sram";
+ reg = <0x2003FFFF 0x1>;
+ zephyr,memory-region = "RetainedMem";
+ status = "okay";
+
+ retainedmem {
+ compatible = "zephyr,retained-ram";
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ retention0: retention@0 {
+ compatible = "zephyr,retention";
+ status = "okay";
+ reg = <0x0 0x1>;
+ };
};
};
+&sram0 {
+ reg = <0x20000000 0x3FFFF>;
+};
+++ b/sysbuild/mcuboot.conf
+CONFIG_MCUBOOT_SERIAL=y
+CONFIG_RETENTION=y
+CONFIG_RETAINED_MEM=y
+CONFIG_RETENTION_BOOT_MODE=y
+CONFIG_BOOT_SERIAL_BOOT_MODE=y
+CONFIG_BOOT_SHARE_DATA=y
+CONFIG_BOOT_SHARE_DATA_BOOTINFO=y
+CONFIG_BOOT_SHARE_BACKEND_RETENTION=y
+CONFIG_BOOT_SHARE_BACKEND_DISABLED=n
then in the app
+bootmode_set(BOOT_MODE_TYPE_BOOTLOADER);
+sys_reboot(0);
c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `bss' will not fit in region `RAM'
c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `RAM' overflowed by 176265 bytes
I've not setup sram before; Adding these definitions leads to RAM overflowed, but from what I understand I would just be taking a single byte for the boot mode.
What should I look at to resolve this overflow?