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] [March 2011 Threads] Thumb compile errorPosted by Scott Thode on March 18, 2011 I'm trying to compile FreeRTOS for LPC1768 with GCC under Ubuntu. Tools are set up for arm-none-eabi. I get this error in port.c. Why might the compiler not recognise the svc instruction? I have these compiler flags: -mthumb -D__thumb2__=1 -mcpu=cortex-m3 -mtune=cortex-m3. 151:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** void vPortStartFirstTask( void ) 152:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** { 150 .loc 1 152 0 151 .cfi_startproc 152 @ Naked Function: prologue and epilogue provided by programmer. 153 @ args = 0, pretend = 0, frame = 0 154 @ frame_needed = 1, uses_anonymous_args = 0 153:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** __asm volatile( 155 .loc 1 153 0 156 @ 153 "FreeRTOS/Source/portable/GCC/ARM_CM3/port.c" 1 157 ldr r0, =0xE000ED08 158 ldr r0, [r0] 159 ldr r0, [r0] 160 ???? 80F30888 msr msp, r0 161 ???? 62B6 cpsie i 162 ???? 00DF svc 0 **** Error:SVC is not permitted on this architecture 163 ???? 00BF nop 164 165 @ 0 "" 2 154:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " ldr r0, =0xE000ED08 \n" /* Use the NVIC offset register to locate the stack. */ 155:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " ldr r0, [r0] \n" 156:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " ldr r0, [r0] \n" 157:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " msr msp, r0\n" /* Set the msp back to the start of the stack. */ 158:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " cpsie i\n" /* Globally enable interrupts. */ 159:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " svc 0\n" /* System call to start first task. */ 160:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " nop\n" 161:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** ); 162:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** } 166 .loc 1 162 0 167 .thumb 168 .cfi_endproc
RE: Thumb compile errorPosted by Richard on March 18, 2011 [on the assumption your build options are correct, which on first glance they appear to be, and on the assumption your compiler version supports the CM3]
Check which version of binutils you are using. There is a catastrophic bug in version 2.21 which strangely, being an ARM compiler, does not recognise this ARM instruction as being an ARM instruction. If possible, use Binutils version 2.20.1 instead.
Regards.
RE: Thumb compile errorPosted by Scott Thode on March 19, 2011 Thanks for that Richard. I am using binutils 2.21 so I'll try going back to 2.20.1.
I have GCC 4.5.2, newlib 1.19.2 and gdb 7.1. I did try gdb 7.2 but it fails to compile (some error compiling libiberty)
-Scott
RE: Thumb compile errorPosted by Scott Thode on March 20, 2011 Ok, my FreeRTOS test code compiles now. Just need to get it working which hopefully means debugging my errors, not tool errors.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|