9 years, 6 months ago.

No space in execution regions with .any selector matching

Hi Mbed !

I just want to ask if there is a way to include the full Mbed-library (mbed-src) with my program in order to change the clock frequency ? (I manage to change correctly the frequency in "system-stm32f0xx.c") Because every time I use the lib mbed-src instead of mbed I have not enough RAM to link the .o. Is there a way to modify the lib mbed-src without take the all library ? Thanks

How much memory are you using with the regular mbed lib? There can be some small differences, which if you are really close to max can make a real difference, but if you have plenty of space with the normal mbed lib you should not run into this.

posted by Erik - 21 Oct 2014

I used a big buffer of 5808 byte and some small buffer. I have not so much RAM available (8KB). Do you thing the RAM consumption of the standard mbed library is much less than the full mbed library ? (how many) How can i measure the RAM consumption of the lib, declare some static buffer until error shows up ? Thanks

posted by sebastien videau 21 Oct 2014

I have about 1200 byte available in my program with the standars mbed library. In the complete program with full mbed-src I have an excess of only 58 bytes... but it will be difficult to find this 58 bytes.

posted by sebastien videau 21 Oct 2014

Is there any way to to lighten the mbed-src library ? (about 60 byte)

posted by sebastien videau 21 Oct 2014

1 Answer

9 years, 6 months ago.

Well the weird part is that the mbed-src and regular mbed lib should result in identical builds afaik. It can only be that they are of a different version (mbed-src is newer), but I am not aware of major changes like this.

It sounds more like the mbed lib is compiled with different settings than the mbed-src lib uses. If you have an offline compiler you can export it to that one (or uvision Keil for example, should be free for such small devices), and set the compilation settings for small size. Still 1.2kB difference is huge. And that is only what you got on compile time, at runtime it will use more RAM, so just freeing up 60 bytes won't do it I am afraid.

I will use keil with compiler optimization, I think Mbed made the lighten lib with some strong size optimization. I'll keep you in touch about the result.

posted by sebastien videau 21 Oct 2014

Hi Erik, So I used Keil with compiler optimization, I contact the Keil support because I think my compileur was clamped so the support compiled the Mbed-src, Even with compiler optimization to save RAM I'm so far away from 1.2kB. Do you have and Idea of the person to talk to about the mbed-src library, someone who can recompile the small mbed library with few chance inside the code ? If I can't use this STM32 I will need to change for a controlleur with more RAM inside, just because of two modified lines... Thanks a lot Erik for your help. Best regards.

posted by sebastien videau 28 Oct 2014