I am currently in the process of migrating FreeRTOS to an unavailable architecture.
I have read the "Quick Start Guide", the "Porting Guide" and basically the whole "FreeRTOS" branch of the main website.
One thing I coudn't find is a prototype portmacro.h!
Every guide tells me to either have a look at the demo applications and port one of them to my architecture or use a "clean portmacro.h" or "compil[e] the portable layer stubs". But I wasn't able to find a prototype or stub version of portmacro.h or port.c anywhere on the website.
Is there a stub version of those files, or do I have to basically go through the whole FreeRTOS code and search for functions I need to implement myself?
I mean, the "How FreeRTOS Works" guide gives a rough overview of very, very basic functions to implement, which is nice. But is there a stub version of those files containing a list of every function that can(!) be implemented?
Needless to say, that I might need them all, but for implementation from scratch that would be very helpful ;)
The functions that must be implemented in the portable layer are those
for which the prototype can be found in FreeRTOS/source/include/portable.h.
The best portmacro.h file to use as a base is then really dependent on
whether your port is going to support interrupt nesting or not. If it
is then I would suggest using one of the Cortex-M3 portmacro.h header
files as a base. Otherwise perhaps one of the ARM7 portmacro.h header
Once you have an appropriate starting point for the portmacro.h file you
can delete the implementations of the macros, and implement them to be
appropriate for your hardware.
There is a very old page, which is probably out of date, here:
I went through all the demo files myself and created a basic stub file which seems to be a good average of all portmacro.h files. Maybe it helps other people porting.