FreeRTOS portable layer

Hello,

I am trying to understand the portable layer code of FreeRTOS. I see that port.c is implemented uniquely for each microcontroller family. Or is it specific to the microcontroller used?

Secondly, if I created an application using a certain controller’s demo application, will I be able to change it (port) to another microcontroller, just by changing the port.c file paths in the Makefile? Eg. If I develop an application using the Posix_GCC demo (Linux port), can I port it to suit any microcontroller by changing the port.c file and vice versa ?

The portable layer provides all the processor-specific information for the KERNEL, so changing that will make the kernel work on the new processor (family). (Most ports work for more than one specific processor)

The Demo applications typically use additional processor or even demo board-specific features that might not work on another processor/demo board.

That would work for FreeRTOS APIs. For the rest of the application it would work as long as you do not do anything specific to the microcontroller. Though, in reality, many things are microcontroller specific - like initializing hardware, accessing peripherals etc.