Flash overflow?

Hello,

I'm trying to merge together a couple of sample projects to make a prototype (in particular, the LTE-BLE gateway, and AWS-IoT samples) - to run on the nRF 9160DK

When I try and compile, I get the following errors:

/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'

/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 119504 bytes

How can I resolve this please? Or is it just too big to try and fit onto the Dev Kit?

Regards,

Ben

Parents
  • Hi Ben,

    The error does mean that your compiled application is too big to fit on the memory. May I ask how you arrive at this application?

    It might be helpful if you can share your compiled Devicetree and Kconfig. They are in the files named zephyr.dts and .config, under <build directory>/zephyr.

    Regards,

    Hieu

  • Hi - I'm trying to add BLE scanning into the AWS_IoT sample (the BLE was copied from the BLE_LTE sample)

    0207.zephyr.dts5078.config.txt

  • Hi - yes, I've built and flashed the hci_lpuart sample to the nRF52 - but I'm still getting the same issue:

    *** Booting nRF Connect SDK d96769faceca ***
    [00:00:00.253,631] <inf> aws_iot_sample: The AWS IoT sample started, version: v1.0.0
    Initialising BLE
    ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:331
            command opcode 0x0c03 timeout with err -11
    [00:00:10.264,129] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000000  r2/a3:  0x00000002
    [00:00:10.264,160] <err> os: r3/a4:  0x2000d4a0 r12/ip:  0x00000010 r14/lr:  0x0001f625
    [00:00:10.264,160] <err> os:  xpsr:  0x41000000
    [00:00:10.264,160] <err> os: Faulting instruction address (r15/pc): 0x0001f630
    [00:00:10.264,221] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    [00:00:10.264,251] <err> os: Current thread: 0x20010b90 (unknown)
    [00:00:10.320,587] <err> fatal_error: Resetting system

  • Hi - do you get the same issue if you build/run this code?

    I know that the hci_lpuart is successfully running on the nRF52, as I can run other BLE apps (i.e. a project I've made based on LTE-BLE gateway sample)

  • Hello Ben,

    I took over the case since my colleague is currently unavailable, but it will take me a bit to understand the background and the issue.

    Sorry for the delays and thank you for your patience.

    Best regards,

    Michal

  • Hi Michal - have you had a chance to get up-to-speed with this one yet?

    Let me try and help by summarising

    • I am working on a project based on the AWS_IoT sample
      • nRF9160 DK / nRF Connect SDK v2.6.0
    • I am trying to add BLE functionality to the sample
      • I just need to be able to scan for BLE advertisements
    • I am now able to add the BLE via kconfig and compile the code
    • If I try to actually perform a BLE function (i.e. a scan), I get the following error:

    ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:331

    Regards,
    Ben

  • It might help to get the current thread context that is calling the HCI functionality here. 

    Can you please enable the below in your prj.conf file, compile and rerun the firmware and give us the assert handler and serial logs details here? That will help understand the context more.

    CONFIG_THREAD_ANALYZER=y
    CONFIG_THREAD_NAME=y
    CONFIG_THREAD_MONITOR=y
    CONFIG_DEBUG_OPTIMIZATIONS=y
    

Reply
  • It might help to get the current thread context that is calling the HCI functionality here. 

    Can you please enable the below in your prj.conf file, compile and rerun the firmware and give us the assert handler and serial logs details here? That will help understand the context more.

    CONFIG_THREAD_ANALYZER=y
    CONFIG_THREAD_NAME=y
    CONFIG_THREAD_MONITOR=y
    CONFIG_DEBUG_OPTIMIZATIONS=y
    

Children
Related