STM32F101R6 porting problem

kandiner wrote on Wednesday, September 16, 2009:

Hello all.
I’ve tried to use ARM_CM3 with IAR compiler, but it didn’t work. Is there anyone who suceed to use thouse files, and for what controller?
Any help will be appretiated.

rtel wrote on Wednesday, September 16, 2009:

You are going to have to give way more information if you expect to receive a useful and targeted answer.


kandiner wrote on Wednesday, September 16, 2009:

Hello Richard.<br>
I’m using a proprietary board based on STM32F101R6 (low-density ST’s Cortex-M3 μC). The project is built from scratch, using FreeRTOS V5.4.2 and ST STM32F10x Standard Peripheral Library sources. The code is located at internal flash, and basic tests (like, calling the led-toggling "task" without starting the scheduler) worked just fine.<br> However, when I try to define the same toggler function as RTOS task, the system stucks on <samp>vPortStartFirstTask</samp> exit (a call to <samp>svc 0</samp>)<br>Porting files used are the same as in FreeRTOS\Demo\CORTEX\_STM32F103\_IAR.<br> Besr regards Dmitry.

edwards3 wrote on Wednesday, September 16, 2009:

Sounds like you have not configured the interrupt vector table. Look at the examples in the FreeRTOS download, SVC, PendSV and SysTick vectors must all be populated with the correct FreeRTOS handlers.

kandiner wrote on Thursday, September 17, 2009:

Thank you all!

I’ve managed to start it - the problem really was in configuring the interrupts.

ST’s Standard Peripheral Library uses pre-defined names for interrupt handlers, so I had to alias FreeRTOS SVC and PendSV with the names used in library (in portasm.s) and renamed SysTick handler to match ST preferred name.

Also, it seems to be necessary to configure interrupt priorities, and set interrupt vectors table location (somehow it was working without defining those two - when not running RTOS).

Anyway, thank you all for your help.

Best regards, Dmitry.