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

Flash Overflowed FOTA upgrade sdk 1.6.0 (Zephyr) nRF52

Hello
I made an application on the nRF52 sdk, which works correctly.
Now I want to add the ability to update the firmware via OTA bluetooth.
so my prj.conf file contains if following instructions;
CONFIG_BT = y
CONFIG_BT_BROADCASTER = y
CONFIG_BT_OBSERVER = y
CONFIG_BT_DEBUG_LOG = y
CONFIG_I2C = y
CONFIG_FPU = y
CONFIG_NEWLIB_LIBC = y
CONFIG_NEWLIB_LIBC_NANO = n
CONFIG_PWM = y
# Enable mcumgr.
CONFIG_MCUMGR = y
# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT = y
# Enable flash operations. CONFIG_FLASH = y
# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT = y
CONFIG_MCUMGR_CMD_OS_MGMT = y CONFIG_MCUMGR_CMD_STAT_MGMT = y
CONFIG_MCUMGR_SMP_BT = y
And the main is the following:
#ifdef CONFIG_MCUMGR_CMD_OS_MGMT
#include "os_mgmt / os_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_CMD_IMG_MGMT
#include "img_mgmt / img_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_SMP_BT
#include "mgmt \ mcumgr \ smp_bt.h"
#endif
K_THREAD_DEFINE (rtc_task_id, STACKSIZE, Rtc_Task, NULL, NULL, NULL, PRIORITY, 0, 0);
K_THREAD_DEFINE (I2CManager_id, STACKSIZE, I2CManager, NULL, NULL, NULL, PRIORITY, 0, 0);
K_THREAD_DEFINE (bletxrx_id, STACKSIZE, BleTxRx, NULL, NULL, NULL, PRIORITY, 0, 0);
K_THREAD_DEFINE (Clock_id, STACKSIZE, ClockManager, NULL, NULL, NULL, PRIORITY, 0, 0);
void main () {
os_mgmt_register_group ();
img_mgmt_register_group ();
smp_bt_register ();
while (1) k_sleep (K_MSEC (10000));
}
When I build the solution, I get the following error:
region `FLASH' overflowed by 46088 bytes
see image below 
What steps should I take to solve the problem?
Thanks in advance
Fausto
volume_up
content_copy
share
Parents Reply Children
  • No, I don't think so. If you have used the Toolchain Manager then it must be installed. Check if you have the directory in PATH variable.

    In Windows you can open a terminal with cmd.exe and type 'echo %PATH%' to see which directories are included in PATH, if you cannot see the directory where 'west' is install then that's the problem.

    You can be add the install directory for west in "Edit the system enviroment variables" in System Properties.

    In the System Variables section (lower half) find the row with "Path" and add the installed directory for west.

  • Another thing you can do, is to open the command prompt from the toolchain manager:

  • Hi ,

    now i get this error

    what to do?

    thanks

    Best Regards

    Fausto

  • Hi, 

    i need help to solve the error in previous post.

    Thanks in avance

    Fausto

  • HI 

    I execute the command :  build -t rom_report,  (in the build_crf52dk_nrf52832 directory and get this error:

    :\Users\PCF\ncs\v1.6.0\zephyr\samples\bluetooth\scan_adv\build_nrf52dk_nrf52832>west build -t rom_report
    -- west build: running target rom_report
    [0/17] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/15] Linking C executable zephyr\zephyr_prebuilt.elf
    FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map
    cmd.exe /C "cd . && C:\Users\PCF\ncs\v1.6.0\toolchain\opt\bin\arm-none-eabi-gcc.exe @CMakeFiles\zephyr_prebuilt.rsp -o zephyr\zephyr_prebuilt.elf && cmd.exe /C "cd /D C:\Users\PCF\ncs\v1.6.0\zephyr\samples\bluetooth\scan_adv\build_nrf52dk_nrf52832\zephyr && C:\Users\PCF\ncs\v1.6.0\toolchain\opt\bin\cmake.exe -E echo ""
    c:/users/pcf/ncs/v1.6.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr\zephyr_prebuilt.elf section `text' will not fit in region `FLASH'
    c:/users/pcf/ncs/v1.6.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 46088 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Users\PCF\ncs\v1.6.0\toolchain\opt\bin\cmake.EXE' --build 'C:\Users\PCF\ncs\v1.6.0\zephyr\samples\bluetooth\scan_adv\build_nrf52dk_nrf52832' --target rom_report

    C:\Users\PCF\ncs\v1.6.0\zephyr\samples\bluetooth\scan_adv\build_nrf52dk_nrf52832>

    I need help to integrate the FOTA in my application.

    Tanks in avance.

    Fausto

Related