when the module FreeRTOSV4.0.4\FreeRTOS\Source\portable\GCC\ARM7_AT91SAM7S\portISR.c is compiled with arm-elf-gcc 4.1.0 the following warning appears
Source/portable/GCC/ARM7_AT91SAM7S/portISR.c -o portISR.o
…/…/Source/FreeRTOS_4.0.4/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c: In function ‘vPreemptiveTick’:
…/…/Source/FreeRTOS_4.0.4/Source/include/task.h:832: warning: inlining failed in call to ‘vTaskIncrementTick’: function body not available
…/…/Source/FreeRTOS_4.0.4/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c:144: warning: called from here
Obviously inlining doesn’t work with GCC.
gcc.pdf, page 216 recommends to put the function definition in a header file with the keywords inline and extern.
If ‘vTaskIncrementTick’ is put as ‘extern inline void vTaskIncrementTick( void )’ in ‘task.h’ inlining will work with GCC, too. Of cause some declarations of variables, functions and macros of ‘tasks.c’ are addtionally necessary in ‘task.h’.
I found the above mentioned document at http://www.gnuarm.org/. Its title is ‘Using the GNU Compiler Collection’ for GCC 3.3.2 and dated from 20. December 2002. A newer version doesn’t seem to be available.
The compiler command which I used is
arm-elf-gcc -c -I…/…/Source/Demo -I…/…/Source/FreeRTOS_4.0.4/Source/include -I…/…/Source/FreeRTOS_4.0.4/Source/portable/GCC/ARM7_AT91SAM7S -I…/…/Source/Utilities -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-strict-aliasing -Winline -D THUMB_INTERWORK -D SAM7_GCC -mthumb-interwork -mcpu=arm7tdmi -MMD -finline-limit=1000 -Os …/…/Source/FreeRTOS_4.0.4/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c -o portISR.o