Skip to content

Linker script issue with KL05 #8

@MWP

Description

@MWP

I've created a new empty project for the board frdm_kl05z.
I haven't changed the contents of any of the project files at all (including main.c).
On compiling i get this error:

Generating LD script .pio\build\frdm_kl05z\MKL05Z4.ld.link_script.ld Linking .pio\build\frdm_kl05z\firmware.elf c:/users/mark/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe:.pio\build\frdm_kl05z\MKL05Z4.ld.link_script.ld:80: syntax error collect2.exe: error: ld returned 1 exit status *** [.pio\build\frdm_kl05z\firmware.elf] Error 1

In the linker script, the error is in the heap section:
.heap : { __end__ = .; end = __end__; *(.heap*) .= ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE; __HeapLimit = .; } > RAM

On the ".= ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;" line.

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