ARMmbed

Mbed too big for the nucleo l432kc

Hi all,

I’m trying to compile an mbed project for the board nucleo L432KC. The problem is that if I compile the following code:

#include "mbed.h"

int main () {
    while(1);
    return 0;
}

I get the following error in linking: region FLASH overflowed by 432 bytes

The only thing that I’m currently compiling is the mbed.h file, so what can I do to use mbed on a board with only 256KB of flash?

Do you have anything weird included in this project? E.g. libraries that could allocate things in flash? Something weird in your mbed_app.json?

I just compiled a simple application for this target (using Mbed OS 5.12.0) and it gives me:

Total Static RAM memory (data + bss): 10208(+0) bytes
Total Flash memory (text + data): 56521(+0) bytes

On the default develop profile. So plenty of space.

All right, I’ve found the problem. I have a class that is linked even if I don’t include it in my main…
Thanks for your help.