You wrote âThe loader is the first image that boots up and then loads all the components. The way you enable communication between components is by adding one indirection.â
But we donât want to load âallâ the components at once. Just one. And so we donât need communication between the components. And we donât want the available execution memory to get reduced the more applications there are.
Itâs unclear from your post if individual components can be updated independently.
The difference between a traditional OS and RTOS is that there is no loader and you do not usually load applications at runtime. Can you explain your use case and what are you trying to solve?
Another way to explain is that FreeRTOS is not a âsystem executiveâ that lets you load and run programs, like Dos/Windows/Linux, but is a support library that runs INSIDE a âbare-metalâ application.
If you want some sort of âcomponentâ system that can load different chunks of code at different times, that needs to be done OUTSIDE of the FreeRTOS kernel, as that isnât what it does.
Note that for the most part chips like the STM32F4 series, the âFlashâ is used as âexecute in placeâ and the code is just run from the flash, so there is no âloadingâ operation. You will need to do something to manage the RAM usage of the code if all the parts put together need more RAM than the chip available.
Or add a custom boot loader application managing 2 or more parts of the remaining flash where you can store and launch your real applications built and linked to their respective target flash partition. Boot loader is fixed to partition 0.
Thx for all the replies. In solutions suggested, would it be necessary to create all the empty partitions youâd ever need and burn them to the device?
Or can partitions be added/removed on the fly without re-burning? In that case, would it be necessary to restart the uC after creating/removing a partition?
The flash partitioning and management would be completely up to.you and how smart your boot loader application is and also how the flash is organized (how much sectors of which size).
However, usually youâd reserve fixed partitions to avoid conflicts overwriting existing/installed applications and to make your life a lot easier
On the other hand thatâs a certain hard limitation and requires an educated guess about the max. size of the user applications.
But you could submit a new âpartition tableâ to the boot loader in case of future incompatible changes of the flash layout as part of the user application (are-)installation procedureâŚ