Mbed 5 + stm32f103c8t6 64kb very greedy of flash memory

Hello, I’m using mbed os 5 with platformio ide to program a stm32f103c8t6 with 64kb of flash memory (the same on bluepill board). If I compile by default take over 30k of flash (about 50.3%). Is it possible to use a lightweight version of framework? (I checked and I use -Os to comile the code).
Thanks in advance.