Tuesday, April 22, 2014

FreeRTOS 8.0.0 porting on STM32F429I Discovery Board on Linux

1 Introduction

FreeRTOS 8.0.0 porting on 32F429IDISCOVERY board using GCC on linux.

Building the projects requires an arm-none-eabi- toolchain with Cortex-M4F support. The known working toolchains are:

2 Get FreeRTOS and STM32F429 Discovery Firmware Ready

Download and decompress the FreeRTOS V8.0.0 from sourceforge.

unzip FreeRTOSV8.0.0.zip

Download and decompress the STM32F429 discovery firmware package from STMicroelectronics website.

unzip stsw-stm32138.zip

Clone and build the project.

git clone https://github.com/winfred-lu/stm32f429-freertos800
cd stm32f429-freertos800
make

stlink is required to flash the binary to the STM32F429I Discovery board. With stlink in the $PATH, then

make flash

3 Supported Projects

Multiple projects are supported:

  1. A loop to toggle LEDs (without OS)
    make clean
    make led-test
    

    No task will be created. An infinite loop to toggle LEDs that never breaks. Try this if there is a hardware issue or so.

  2. Simple LED flasher example (default)
    make clean
    make simple-led
    

    The LED flash tasks are created. Two of the tasks will toggle the STM32F429I Discovery board LED3 and LED4 in different frequency.

  3. Comprehensive test/demo application
    make clean
    make complex-led
    

    A lot of additional tasks and a software timer are crated. Please reference comments in main-led.c.

  4. LCD test/demo application
    make clean
    make lcd
    

    In addition to standard demo tasks, the following tasks are created:

    • LCD task : a gatekeeper task that receives messages from the queue and writes the messages to the LCD.
    • Check hook : periodically checks that all the demo tasks are still operational, and sends PASS or ERROR messages to the LCD task.

Date: 2014-04-22 Tue

Author: Winfred Lu

Created: 2014-04-22 Tue 23:03

Emacs 24.3.50.1 (Org mode 8.2.5h)

Validate

11 comments:

Tectu said...

This is very nice. I appreciate your work a lot - Thank you!

I'm planning to port uGFX to FreeRTOS + STM32F429i-Discovery board.
Are you interested into that as well?

Winfred said...

Hi Tectu, Yes. It looks interesting to me. I will start from reading some documents firstly.

jserv said...

My students did the comprehensive report about FreeRTOS 8.0 and STM32F429: http://wiki.csie.ncku.edu.tw/embedded/freertos

Winfred said...

Hi Jserv, great job done! The documents are awesome, not only FreeRTOS, but also ChibiOS, uClinux, NuttX. Thank you all for these contributions! :)

Winfred said...

Hi Tectu, uGFX notepad demo

Unknown said...
This comment has been removed by the author.
Unknown said...

Hi Winfred,
Your post is great, accurate, simple and educated.
I had a problem to operate the User Button and I saw you comment it out (//STM_EVAL_PBInit( BUTTON_USER, BUTTON_MODE_EXTI );)
Why?
Thanks,
Eyal

Winfred said...

Hi Eyal,
It is simply because the user button is not used in the project. The button can actully work. Feel free to modify the code. :)

Martin said...

Hi Winfred,
I have some problem, I can not get working nothing than led-test. Like operating system functions does not work...
I have tried freertos 8.0.0, 8.0.1 and 8.2.0
I tried to modify main-led.c, adding vParTestToggleLED(LED3); as debug after prvSetupHardware(), but it seems not work if I make simple-led (only if I make led-test everything works as expected).
What should I try?

Martin

Winfred said...

Hi Martin,

Try vParTestSetLED to turn on or off LED3 or LED4 in turn and narrow down where it hangs. Or try to use gdb (with stlink or openocd) to debug.

mio blog said...

I enjoyed reading thiis