droolyone wrote on Monday, June 13, 2011:
I just ported FreeRTOS 7 to the STM32L-DISCOVERY board using Atollic TRUESTUDIO Lite. Considering that this was my first port, it was relatively straight forward with the with one exception. I created a new C project and just added the FreeRTOS directory. Once the proper includes and sources directories were linked, the project built clean. I had to modify startup_stm32l1xx_md.s to include xportSVCHandler, xPortPendSVCHandler, and xPortSysTickHandler.
At this point FreeRTOS was running but very slowly. The vTaskDelay function was off by an order of magnitude. After a lot of fiddling around, I discovered that the SysSysClock function was failing to properly configure the system clock. It turns out that the system_stm32l1xx.c file that Atollic uses for the STM32L-DISCOVERY is not correct. The file tries to configure HSE but the STM32L-DISCOVERY board does not have the external oscillator installed. I just grabbed the system_stm32l1xx.c file from the STM demo project. It worked like a charm.
I hope this might help others who try porting to the STM32L-DISCOVERY. Now I just have to port all the cool features of the demo app to be thread safe under FreeRTOS.