How and where FreeRTOS boots/starts ?

bertrandmercier wrote on Monday, March 07, 2016:

Hello,

I’d like to know how FreeRTOS starts in memory ?
Does it need a bootloader like linux ?

Thank you
Best Regards

edwards3 wrote on Monday, March 07, 2016:

On small micros FreeRTOS apps start just like bare metal apps. Bootloaders are not needed unless you are using something like an Atom. This may help understanding http://www.freertos.org/FAQMem.html#BootTime

bertrandmercier wrote on Tuesday, March 08, 2016:

Thank you very much.
What do you mean by small micros ?
So for bigger micros, FreeRTOS needs a bootloader.
When you speak about Atom, you mean Atom Intel processor ?

richard_damon wrote on Tuesday, March 08, 2016:

The details of how a program is loaded into a machine is very much machine/processor dependent. Many/Most smaller processors have a reasonable amount on non-volitile memory directly attached to the processor, and for those machines, the simplest way to put a program is directly in that memory and have the processor just jump to that code.

Bigger machines, which often have bigger programs, might rather than have that much high speed non-volitile memory, may instead have lots of RAM, and a slower storage that the program needs to be copied out of into RAM, and then run. This is often called bootloading (There is a small program in non-volitile memory that pulls the bigger program to be used).

Note that FreeRTOS is basically a ‘nano-kernel’ which is compiled into your program, so we have a single program that needs to be in/loaded into the machine, so if we do need a boot strap, it can be fairly simple.

For something like Linux, which grew up as a disk based system, the OS normally needs to be pulled in from some bulk store into ram, and also at this boot time, drivers for devices found get loaded, and additional processes that are needed to run. The Boot Loader to do all this tends to be more complicated than what I described for loading a FreeRTOS application, so often a system will use the sequence I described above to load in the Linux Boot Loader, which then loads Linux. There are version of Linux that have been customized for smaller embedded application that can be loaded just like a typical FreeRTOS application.