Hello,
I get the compiler error:
Error: missing expression – `swi’ in queue.c at the line(s) taskYIELD. I am using RTOS 6.0.1 for the ARM7 in the GCC version. However I tried a 5.x queue.c file with the same result. Additionally I generated a list file of queue. c that has the following appearence:
485:C:/ARM7Programme/workspace/RTOS/rtos/sourcequeue.c **** taskYIELD
308 .loc 1 486 0
309 @ 486 “C:/ARM7Programme/workspace/RTOS/rtos/source/queue.c” 1
310 SWI
311 @ 0 “” 2
So in principle the replacement of taskYIELD() to SWI seems OK. So my guess is more of an assembler syntax problem. I also tried the different portmacro.h versions for the ARM7 that are available without any success.
I am using the gcc version 4.4.2 and assembler 2.2.
Does anybody has a hint ?
Best Regards
Markus
compiler error in queue.c at taskYIELD
compiler error in queue.c at taskYIELD
Latest GCC & binutils requires that every SWI instruction should be followed by number which is passed to called software exception. Before tools assumed that the lack of this number means 0. So add 0 to SWI and it should compile/work.
You may fing example how to change that in http://freeecu.svn.sourceforge.net/trunk/
Regards,
Adam
Adam
compiler error in queue.c at taskYIELD
Exactly in http://freeecu.svn.sourceforge.net/viewvc/freeecu/trunk/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7X/portmacro.h?revision=79&view=markup line 231
Hope that helps,
Adam
Adam
compiler error in queue.c at taskYIELD
Hi
to previous reply its actulay line 213
as I changed the line to
#define portYIELD() __asm volatile ( “SWI 0” )
the SWI errors disappeared but others came out:
../../../Source/queue.c: In function ‘xQueueGenericSend’:
../../../Source/queue.c:480: error: stray ‘240’ in program
eclipse shows that this error is caused everywhere the portYIELD_WITHIN_API(); function is called in queue.c
compiler error in queue.c at taskYIELD
In all but the ports that support memory protection it is defined as
#define portYIELD_WITHIN_API portYIELD
I would guess that the problem is in your edit of portYIELD.
240 is not an ascii character (only an extended ascii character).
Regards.
compiler error in queue.c at taskYIELD
Sorry, you are right I found this somewhere else, now I changed it to
<pre><code> #define portYIELD() asm volatile ( “SWI 0” ) </code></pre>
and everything works fine.
Thanks all of you.
compiler error in queue.c at taskYIELD
Hello,
thanks everyone for their help. It was simply to change the SWI instruction to SWI 0
Best Regards
Markus
Markus