To start working with FreeRTOS first you need replace some of the ARM processor startup 'registers', by the FreeRTOS ones. But this process is not like install a new library, plugin nor compile something, it's just different! and that's why many developers give up! Here you can see how to configure the FreeRTOS aiming run on ARM Cortex-M3 using the Keil uVision IDE.
Every new project you need the startup files that configures the ARM device before it can do something for you. These startup files are provided by the "Manage Run-Time Environment" option:
That will add these files in your project:
Now let's replace the ARM 'registers' by the freeRTOS ones. Edit the "startup_stm32f10x_md.s" file and at this point:
Add "IMPORT xPortPendSVHandler", "IMPORT xPortSysTickHandler" and "IMPORT vPortSVCHandler":
Go down and replace "SVC_Handler" :
And below replace "PendSV_Handler" and " SysTick_Handler":
That's it! now let's blink a GPIO pin and see if works!
About the versions:
- FreeRTOS 8.1.2
- Keil uVision 126.96.36.199
- STM ARM Cortex-M3 STM32F103C8T6