STR91x IAR SK Board

joe_her wrote on Monday, August 27, 2007:

Got an IAR STR912 board, and tried to use the STR91 port which is for the ST board, but no luck.
I changed GPIO for leds task (it works without the RTOS), commented out all but the led flash task, and still nothing happnds. The kernel is looping in Abort_Handler(). What am I missing?

davedoors wrote on Monday, August 27, 2007:

Are you using the startup files that came with the FreeRTOS demo, or the files that came with the IAR tools?  Can you check that the startup files call main() from Supervisor mode.

joe_her wrote on Monday, August 27, 2007:

Thanks a lot. This was it. I am using IAR KS ver 5.0, so I had some copatbily problems with the original file.
Her ius the needed change:
------------------------------------------------------------------------------
; — Now change to USR/SYS mode and set up User mode stack,
;  Original IAR:
;      MSR     CPSR_c, #Mode_SYS               ; IRQs & FIQs are now enabled

    MSR   CPSR_c, #Mode_SVC|I_Bit|F_Bit ; FreeRTOS - start with SVC mode
 
        LDR     SP, = SFE(CSTACK)

; — Now enter the C code
        B       ?main   ; Note : use B not BL, because an application will
                         ; never return this way
--------------------------------------------------------------------------------