Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 2 months ago.
Minimum RAM and Flash requirement for porting MBED OS...
Hi,
I am planning to port MBED OS to Kinetis KL03. This chip has only 2K RAM and I am trying to figure out what is the minimum RAM and Flash required to run MBED OS. Let me know if any of you have some details on this minimum memory requirement for MBED to run (could not get any hint from the documents - though I see some controller/ boards having 4K are able to run MBED).
Also is there any step by step porting guide for porting MBED to new controller?
With best regards, P.
1 Answer
8 years, 2 months ago.
Are you going to port the normal mbed library (so DigitalIn, Serial, etc), or completely mbed OS? Regarding Mbed OS I can assure you it won't fit on a KL03.
For the normal mbed libs, I would just try to compile some programs on a KL05 for example, since that will be very similar in size restrictions. I am afraid the stdio which is pretty much automatically included is going to take already alot of your SRAM. But you can decide to skip on that (you can set the target as if there is no Serial debug connection, so then stdio is only included if the user wants to use it). In addition to that you have for example InterruptIn, which reserved RAM for interrupt vectors which may or may not be used.
For porting, there is some documentation, although I don't know how outdated it is: https://developer.mbed.org/handbook/mbed-SDK-porting. Also have a look at how the KL05 is implemented, since that is probably very similar to yours.
TL;DR: stdio is going to be a bitch. It will run, but I think you will need to disable that by default to have some SRAM left.
Hi Erik,
Thanks for your comments. Basically I want to port normal mbed - i.e. not only GPIO, Serial - but would also include PWM, Analog, Interrupt, power management and basic TCP/IP protocol so that I can realize small IoT product.
Sounds like more or less complete OS? Not sure. If I do not have these components, then there is no use in putting OS in the first place. I have seen the boards (https://developer.mbed.org/platforms/) having 4K RAM running MBED - Not sure, if it is complete OS or very basic functionality.
I thought, there would be fixed RAM size number for MBED - seems I need to do some more study/ experiment.
Any way thanks again and with best regards, P.
posted by 26 Sep 2016