platformio / platform-freescalekinetis

Freescale Kinetis: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/freescalekinetis
Apache License 2.0
4 stars 8 forks source link

Linker script issue with KL05 #8

Open MWP opened 5 years ago

MWP commented 5 years ago

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.

valeros commented 5 years ago

Hi @MWP ! Could you please try an older version of the platform?

[env:frdm_kl05z]
platform = freescalekinetis@4.2.0
framework = mbed
board = frdm_kl05z
MWP commented 4 years ago

Just tried... that did build fine. So latest version is broken?

valeros commented 4 years ago

Hi @MWP ! Yes, at the moment you'd better stay on v4.2.0 until a new version of mbedlib is released.