2014-02-27 03:03 AM
Hello all,
I bought a STM32F4 Discovery recently, and I am trying really hard to find an OS that could help me to port a POSIX application I have developed. The problem is that my application use some plugin mechanisms and use POSIX dlfcn. I have tried some differents OS, as CHibiOS, FreeRTOS and eCOS, but I don't manage to find a simple one that support standard/official BSP (that could allow me to debug over the LCD screen, and to easily use Ethernet port / Wifi extension for example), and that support a File system + a dynamic loading mechanism. If you have some idea/suggestions, I plan to give NuttX and uC/OS-III a try, if possible, but I would like to have you opinion. Is it possible to find such a complete OS ? Thank you by advance -- Valentin BOUSSON #horses-for-courses #stm32f4-discovery-os-dloading2014-02-27 03:46 AM
Hi
I believe there is a stripped down version of Linux ported to STM32F4 called uCLinux This thread has been discussing it/supporting it : https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fuCLinux%20on%20STM32F429I-DISCO&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https%3A%2F%2Fmy.st... I have not tried it - so I do not know if it supports what you want (Posix dlfcn).2014-02-27 05:40 AM
This threads seems awesome, unfortunatly that's not the same board as mine.
Theirs (STM32F429I-DISCO) have 2MB of Flash, and mine has only 1MB. I will take a look, but I'm not sure it will be possible, some threads I've seen about uCLinux + stm32f4discovery are saying that's quite impossible. Thank you anyway. Some other propositions ?2014-02-27 07:41 AM
Hi
You have already tried the (free) ones I know. Try cross referencing the list of RTOS http://en.wikipedia.org/wiki/List_of_real-time_operating_systems (why RTOS and not any OS. The STM32 is an embedded processor and has most support from RTOS) with the list of POSIX compliant OSs http://en.wikipedia.org/wiki/POSIX As you have already discovered, resources (Flash and RAM) are going to be the limiting factor! Good luck.2014-02-27 07:59 AM
IMHO the idea to ask for POSIX compliance for a Cortex M seems a bit overstretched.
Microcontrollers primarily target cost sensitive markets, were designers and PMs are usually put through the mill for any extra half-penny they want to add to the BOM.2014-02-27 02:55 PM
As fm says, Linux is not really suited to microcontrollers.
So you need to ask yourself which is most important to you: to have Linux, or to run on a microcontroller - because the two are pretty much mutually exclusive.2014-02-28 06:36 AM
Hello,
Thanks for your responses; Yes I understand well that's not possible to make big structures/OS to run over such tiny boards. However, my problem is not having Linux on my STM32F4Discovery, but an OS that implement a simple mechanism to use to load dynamically libraries. I have formerly limited myself to shared libraries, but that could be a simple object binary file. My former application which was running on a POSIX environnement used the DLFCN ''interface'', and I'm now searching an equivalent to keep my application with the same structure on stm32f4.eCos seems to implement an object loader on ARM processors, but not on CORTEXM ones. That seems weird to me, but I'm not an expert. Do you have any idea that could come from ?
2014-02-28 06:46 AM
Cortex-Mx processors don't have CACHE or MMU, but instead tightly couple smaller memories. For dynamic loading you need plenty of RAM to accommodate the loading and linking of the modules. This can be done, but is atypical for micro-controller based embedded applications.
If you have to use external RAM, it will be SLOW. If you can't change your paradigm, then you'll need to pick a more appropriate target.