I’m not sure if doing this is OK, possible or downright dumb. (or all 3)
I want to build FreeRTOS into a static library such that I can call it from a C++ application in IAR/EWARM. Besides the FreeRTOS files I usually set up in EWARM, what else is required?
I set up an EWARM project and included all the source C files, the heap2.c, portasm.s, and port.c
(from the FreeRTOSV8.2.0\FreeRTOS\Source\portable\IAR\ARM_CM4F directory) so there are 9 files. It builds OK into a lib file (.a) and I can add it into my C++ project. The FreeRTOS headers are enclosed in the C++ file as:
On build, I am getting an error that is telling me applicationTickHook isn’t defined, but the function is in my C++ file.
*Error[Li005]: no definition for “vApplicationTickHook” [referenced from tasks.o(FreeRTOSLIB.a)] *
When I build the static lib, do I need a “main.c” file with applicationTickHook included in there? Or, if not, what am I missing?