FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2010 Threads] compiler error in queue.c at taskYIELDPosted by mkrug on January 3, 2010 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/source\queue.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
RE: compiler error in queue.c at taskYIELDPosted by Adam Turowski on January 3, 2010 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
RE: compiler error in queue.c at taskYIELDPosted by Adam Turowski on January 3, 2010 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
RE: compiler error in queue.c at taskYIELDPosted by bejkarna on January 5, 2010 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
RE: compiler error in queue.c at taskYIELDPosted by Richard on January 5, 2010 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.
RE: compiler error in queue.c at taskYIELDPosted by bejkarna on January 5, 2010 Sorry, you are right I found this somewhere else, now I changed it to #define portYIELD() asm volatile ( "SWI 0" )
and everything works fine. Thanks all of you.
RE: compiler error in queue.c at taskYIELDPosted by mkrug on January 5, 2010 Hello,
thanks everyone for their help. It was simply to change the SWI instruction to SWI 0
Best Regards Markus
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|