7 years, 1 month ago.

Mbed os on 8K RAM Microcontollers

I'm new to the mbed community, but for my last year project i have to use a stm32l051 microcotroller. This controller has 8k RAM and 32K of flash. I have to run OS on this system. But in my first research is looks difficult or even impossible to run a program with OS features on a 8K RAM microcontroller.

Can somebody give me some info or advise about this topic?

Thank you very much..

1 Answer

7 years, 1 month ago.

please read this blog. Very informative. https://developer.mbed.org/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/

you will have to build your own version by changing the configuration to one as minimal as you project needs.

It is doubtful that much of an RTOS application can be run with such a limited microcontroller.

Accepted Answer

Thanks you for your answer.

I want to keep the RTOS features so completely turning them of is no option. With an empty application i have already a RAM usage of 5K. So wen a have to run a program it will become very difficult to fit everything in this controller, and there aren't any other options.

posted by Stijn Van Dessel 28 Feb 2017

The obvious option is not to use RTOS features. Do you really need it for such a small program? Even more obvious issue is to just get an MCU with more RAM. If you don't need printf you can save a ton of space by disabling debug (compile with NDEBUG set).

posted by Erik - 28 Feb 2017

The stm32l0 controller that I use is put on a LoRA module together with the LoRa chip. We want to develop a system with a lot of possibilities in the future. We don't know al the use cases at this moment so we don't want to cut to fast in the mbed features.

But indeed, its very difficult or impossible to keep al the features on such a small controller.

posted by Stijn Van Dessel 28 Feb 2017

Can you give your idea about minimum requirements for a full mbed OS system, with RTOS enabled?

posted by Stijn Van Dessel 28 Feb 2017

8k SRAM is probably a bit the limit ;). Besides that it depends on how much you want to put on it.

posted by Erik - 01 Mar 2017

Thank you for your help.

posted by Stijn Van Dessel 01 Mar 2017