`.text' will not fit in region `FLASH'

I am using the platform xdot_l151cc and trying to include a lib:

build_flags = -L./lib -lxDot-GCC_ARM

This lib is from the mBed site and it compiles and works fine in the online compiler. But, once I add it to pio:

Linking .pioenvs/xdot_l151cc/firmware.elf
/Users/rrodriguez/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/
bin/ld: .pioenvs/xdot_l151cc/firmware.elf section .text' will not fit in regionFLASH’
/Users/rrodriguez/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/
bin/ld: region `FLASH’ overflowed by 25720 bytes

It doesn’t seem to be stripping anything. I added a extra_scripts.py

Import(‘env’)

env.Append(
LINKFLAGS=[
"-Wl,–gc-sections,–relax",
"-Os"
]
)

env.Append(
CCFLAGS=[
"-g",
"-fdata-sections",
"-ffunction-sections",
"-Os"
]
)

That doesnt seem to change anything.

Thanks,
Rob

Please file an issue here Issues · platformio/platform-ststm32 · GitHub