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 Ben,

    BenA said:

    I can successfully build the project you shared. I tried adding simple BLE scanning, but I'm getting the following error:

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

     I guess this is another configuration I need to set somewhere?

    Have you flashed the HCI application onto the nRF52840 device on the DK? If not, that would be the problem. The design is that the nRF9160 will run only the BLE Host application, and the nRF52840 will run the BLE Controller application.

    Please refer to the documentation of the LTE BLE Gateway sample for more information.

    BenA said:

    On another note - I don't quite understand how you've added the BLE to the config - as kconfig parameters such as CONFIG_BT=y are in a separate .conf file.

    I added them to the main prj.conf for the purposes of this build - but am I missing something? How to I tell it to also read lte_ble_gateway.conf?

    You guessed right. The other .conf file can be included in the build.

    If you are building from the command line with west, refer to this guide: Application Development — Zephyr Project documentation (nRF Connect SDK) (nordicsemi.com).

    If you are building with the nRF Connect for VS Code Extension, you can specify additional .conf file to be included in a build configuration:

    You might also want to know that the nRF Connect SDK also include a solution for different "build types" that makes use of different .conf files. However, that's not what I am using here.

  • 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

Reply
  • 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

Children
No Data
Related