scottthode wrote on Friday, 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,
159 ldr 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, \n"
156:FreeRTOS/Source/portable/GCC/ARM_CM3/port.c **** " ldr 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