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] [May 2009 Threads] Problem with SWIPosted by Kristian Dilov on May 9, 2009 Hello everybody, I'm trying to change the FREERTOS to have pre-emtive and nonpre-emtive tasks simultaneously. So the idea is when the task has completed its job to yield explicitelly: ________________________________________________________________________________
void vPortYieldProcessor( void ) __attribute__((interrupt("SWI"), naked)); #define portYIELD() asm volatile ( "SWI\n\t" )
static portTASK_FUNCTION( vTask2, pvParameters ) { /* Just to stop compiler warnings. */ ( void ) pvParameters;
SendString(EmaName); /* Print something */ portYIELD(); /* trigger a task switch*/
} Actually trhough my debugger (yagarto tools + eclipse) I see that the program hengs always at the program abort trap: .section .startup,"ax" .code 32 .align 0
b _start/* reset - _start*/ ldr pc, _undf/* undefined - _undf*/ ldr pc, _swi/* SWI - _swi*/ ldr pc, _pabt/* program abort - _pabt*/ ldr pc, _dabt/* data abort - _dabt*/ nop/* reserved*/ ldr pc, [pc,#-0xFF0]/* IRQ - read the VIC*/ ldr pc, _fiq/* FIQ - _fiq*/
_undf: .word __undf /* undefined*/ _swi: .word vPortYieldProcessor /* SWI*/ _pabt: .word __pabt /* program abort*/ _dabt: .word __dabt /* data abort*/ _fiq: .word __fiq /* FIQ*/
__undf: b . /* undefined*/ __pabt: b . /* program abort*/<-HERE __dabt: b . /* data abort*/ __fiq: b . /* FIQ*/ ________________________________________________________________________________ Does anybady know what is going wrong ? Thanks in advance! janiex.
RE: Problem with SWIPosted by Richard on May 9, 2009 You must not allow a task to return from its implementing function. Either the task must be in an infinite loop, or it must be deleted before it reaches the end of the function. A task can delete itself before reaching the end of the function.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|