Skip to content

Linker on Nordic nRF51822 cannot move location counter backwards. #2467

Closed
@nuket

Description

@nuket

I'm trying to build a simple project but ld keeps complaining, when tried with both gcc 4.9 and gcc 5.4:

gcc 4.9 says:

./mbed-os/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld:142 cannot move location counter backwards (from 0000000020007fd8 to 0000000020007800)
collect2: error: ld returned 1 exit status
[ERROR] ./mbed-os/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld:142 cannot move location counter backwards (from 0000000020007fd8 to 0000000020007800)
collect2: error: ld returned 1 exit status

All of the code compiles fine, it's only the link step that is erroring out. Is it possible that I'm out of memory?

The mbed-os version number, using the mbed CLI:

mbed-os (8d368775e32a)

I tested the mbed OS Blinky example, and it builds fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions