Saving SRAM on mbed

I’m trying to make a project on my bluepill_f103c8 but i’m running out of SRAM during runtime and it causes freezes.
My .ini:

platform = ststm32
board = bluepill_f103c8
framework = mbed
upload_protocol = stlink

Any ideas how to save up on SRAM?

i’m already using newlib-nano

See following blogs on the mbed website:

Also try re-writing the program with no RTOS, that can save a lot.

RTOS is a must due to internet connnection and lots of other processes

These blogs are mostly about FLASH than about SRAM, maybe the printf could save a little

Might be helpful Mbed Build Error - RTOS 'osKernelGetTickCount' - #9 by valeros

Already using that :frowning: