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

nrf52811: Zephyr with MCUboot

Hi,

I am trying to create and FOTA upgradable application on the nrf52811 SoC. I have managed to do the same for nrf52832, but when I repeated the process for nrf52811 it seems that there is not enough memory. Here is the build output after running the command west build -b nrf52811_pca10056:

> Executing task in folder peripheral_uart: source /home/voja/.virtualenvs/zephyenv/bin/activate; west build -b nrf52811_pca10056 -d build/nrf52811_pca10056_app <

-- west build: build configuration:
       source directory: /home/voja/Documents/irnas/zephyr_tests/peripheral_uart
       build directory: /home/voja/Documents/irnas/zephyr_tests/peripheral_uart/build/nrf52811_pca10056_app
       BOARD: nrf52811_pca10056 (origin: CMakeCache.txt)
-- west build: building application
[1/256] Preparing syscall dependency handling

[12/256] Performing build step for 'mcuboot_subimage'
[1/1] Linking C executable zephyr/zephyr.elf
[43/256] Building C object CMakeFiles/app.dir/src/main.c.obj
../../src/main.c:299:13: warning: 'bt_ready' defined but not used [-Wunused-function]
 static void bt_ready(int err)
             ^~~~~~~~
../../src/main.c:284:13: warning: 'advertise' defined but not used [-Wunused-function]
 static void advertise(struct k_work *work)
             ^~~~~~~~~
[247/256] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf 
: && ccache /home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc    zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj  -o zephyr/zephyr_prebuilt.elf  -Wl,-T  zephyr/linker.cmd  -Wl,-Map=/home/voja/Documents/irnas/zephyr_tests/peripheral_uart/build/nrf52811_pca10056_app/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/mpu/libarch__arm__core__aarch32__cortex_m__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a  zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a  zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a  zephyr/subsys/fs/libsubsys__fs.a  zephyr/subsys/mgmt/libsubsys__mgmt.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/random/libsubsys__random.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/entropy/libdrivers__entropy.a  modules/nrf/lib/dk_buttons_and_leds/lib..__nrf__lib__dk_buttons_and_leds.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/mcumgr/lib..__modules__lib__mcumgr.a  modules/tinycbor/lib..__modules__lib__tinycbor.a  modules/nordic/lib..__modules__hal__nordic.a  modules/littlefs/lib..__modules__fs__littlefs.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/thumb/v7e-m/nofp"  -L/home/voja/Documents/irnas/zephyr_tests/peripheral_uart/build/nrf52811_pca10056_app/zephyr  -lgcc  -Wl,--print-memory-usage  -mthumb  -mcpu=cortex-m4  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -mabi=aapcs  -march=armv7e-m && :
Memory region         Used Size  Region Size  %age Used
           FLASH:      194652 B      60928 B    319.48%
            SRAM:       34160 B        24 KB    139.00%
        IDT_LIST:         136 B         2 KB      6.64/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: zephyr/zephyr_prebuilt.elf section `text' will not fit in region `FLASH'
/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: zephyr/zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM'
/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: section .intList VMA [0000000020006000,0000000020006087] overlaps section noinit VMA [0000000020002e20,00000000200078bb]
/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 133724 bytes
/home/voja/Documents/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: region `SRAM' overflowed by 9584 bytes
collect2: error: ld returned 1 exit status
%
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/voja/Documents/irnas/zephyr_tests/peripheral_uart/build/nrf52811_pca10056_app
The terminal process terminated with exit code: 1

So is there enough space on the nrf52811 to do such a thing?
If it is what are the changes needed to be made so it can compile?

I saw a similar question a while back on the devzone: link but then you did not support nrf52 series in the NCS.

Best regards,
Vojislav

Related