Stephane REY

Problem with interrupt in ASM in FreeRTOS v7.1.0

Discussion created by Stephane REY on May 4, 2012
Latest reply on May 15, 2012 by Stephane REY

Hello

 

I'm trying to implement FreeRTOS v7.1.0 (latest) on a MCF51CN128 (Tower system) using Codewarrior 6.3 (under Win XP)

 

I've downloaded their demo projet which compiles fine but the application doesn't work. After spending too much time without succeding to debug, I've decided to start a simple project from scrap which doesn't work as well whereas it works with an older version of FreeRTOS v4.7 (I've ported a simple blinking project from this URL which works fine : http://myfreescalewebpage.free.fr/rtos/freertos/freertos_cfv1.htm)

 

The differences are in the port.c platform dependant files. In FreeRTOS v4.7, there was port.c and portmacro.h. In port.c there were the two ISR (timer tick and Yield function) :

 

void interrupt VectorNumber_Vrtc vPortTickISR( void )
{
...
}

interrupt VectorNumber_Vtrap15 vPortYield( void )
{
...
}

Now in V7 (and from V5 I guess), there is also a portasm.s in which the ISR routine has been moved from port.c to this assembly file.

 

When debugging I see that my code does't go into this ISR whereas the IT works fine (I've checked that by coding this ISR function in port.c for testing and the code was going there)

 

The declaration of the function in port.c is:

 

asm void interrupt VectorNumber_VL1swi vPortYieldISR( void );

 and the assembly code in portasm.s is :

 

/* Yield interrupt. */_vPortYieldISR:vPortYieldISR:    portSAVE_CONTEXT      jsr _vPortYieldHandler    portRESTORE_CONTEXT

 

In the xMAP file I can see that the function in portasm have been linked correctly. But it sounds like that something makes impossible the relation between the interrupt (#109) VL1swi and the ISR related code located in portasm.s

 

 I've attached my project code to this post for those who'd like to have a look.

 

1. Has anyone had the same problem ?

2. Is the ISR declaration made correctly ? (same since FreeRTOS v5.0 so I would expect YES !)

3. Any idea on how to investigate the problem ?

 

Many thanks

Stephane

Outcomes