Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

compiler error in queue.c at taskYIELD

Posted 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 taskYIELD

Posted 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 taskYIELD

Posted 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 taskYIELD

Posted 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 taskYIELD

Posted 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 taskYIELD

Posted 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 taskYIELD

Posted 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


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists