FreeRTOS + STR912 with Ride7

mkyrylen wrote on Thursday, October 21, 2010:


I am trying to convert an existing ‘bare metal’ application to utilising FreeRTOS.  I am new to FreeRTOS.
Currently we are running a bootloader in Bank 1 of flash, which starts the main application in Bank 0.  FreeRTOS is to only run in the main application.  Bootloader has not been modified, but the main application has its own complete startup crt0.S (only flash is not reconfigured, since it is setup correctly in bootloader).

Based on a STR91x port of FreeRTOS, which uses Eclipse (search for STF12), I have  modified my crt0.S to match the STF12 crt0.S by:
- using portSAVE_CONTEXT and portRESTORE_CONTEXT for IRQ and SWI handlers
- changing the mode to supervisor (MSR CPSR_c, #Mode_SVC|I_BIT|F_BIT) at the end of the stack setup
port.c and portISR.c we obtained from STF12

My testing involves trying to send data to UART0.  I try to do this before the scheduler is started and on the starting of a single task.  The text has never displayed within the task, and also does not display before scheduler started with the above configuration .

I have looked at other ports, and tried any differences.  So far no joy getting the above going.
Any pointers?  I can provide further details if needed.

Thanks for any assistance,

davedoors wrote on Friday, October 22, 2010:

If you configure your interrupt to use the save and restore context then it would be wrong to try and use the interrupt before the scheduler has started. If trying to use the interrupt before the scheduler has started did not cause a crash then I think the interrupts are probably just globally disabled. Did you try putting a break point in the interrupt to see if it is hit?

The contrib part of the FreeRTOS site ( has some files posted by somebody called Stefano. He also has his own website with lots of FreeRTOS stuff that uses GCC (as Ride does). Did you see these?