richard_damon wrote on Wednesday, July 20, 2011:
Your should give a bit of thought to what you are trying to do. The main thing that the portable layer provides are the details of how a given processor works. When you compile a static library, you generally need to define which processor you are targeting (at least to the processor family. which is normally most of what the portable layer needs to know). It is very unlikely that you are going to be able to get a static library that works with many “ports”, unless you are in the habit of changing the resources used by the portable layer for what timer resource you use, or change the clock frequency you run the system at, and for that you just need to not bundle port.c into the library, and provide it separately.
The other issue you are going to run into is that the FreeRTOS files need the FreeRTOSConfig.h file to define certain resource limits that are compiled into the library. If you want to pre-compile the library, you are going to need to lock down the values/options specified therein.