Kinetis KL05 - empty project build fail (link script error)

Hi all,

I’ve found a PlatformIO platform/board bug.

I just created a new empty project for:

[env:frdm_kl05z]
platform = freescalekinetis
board = frdm_kl05z
framework = mbed

The source code is empty, main() just loops, nothing else.

On build i get:

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

MKL05Z4.ld.link_script.ld contains:

.heap :
{
    __end__ = .;
    end = __end__;
    *(.heap*)
    .= ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
    __HeapLimit = .;
} > RAM

The error is the ".= ORIGIN(RAM) … " line.

BTW… is there a better place to report this to the devs than here?

Thanks.

You might want to report an issue on the github repo for this specific platform.

2 Likes