32.3.1. FreeRTOS Hello

32.3.1.1. Overview

The freertos_hello example shows freertos task scheduling function.

32.3.1.2. Board Setting

No special settings are required

32.3.1.3. Project Configuration

set(CONFIG_FREERTOS_TIMER_RESOURCE_GPTMR 1) select GPTMR as FreeRTOS’s tick source。 set(CONFIG_FREERTOS_TIMER_RESOURCE_PWM 1) select PWM as FreeRTOS’s tick source。

sdk_compile_definitions(-DDISABLE_IRQ_PREEMPTIVE=1) disable interrupt preemption sdk_compile_definitions(-DDISABLE_IRQ_PREEMPTIVE=0) enable interrupt preemption

32.3.1.4. Running the example

When the example runs successfully, the LED starts flashing and following message is displayed in the terminal:

task2 is running.
Toggle the led pin level.
LED is off.
LED is off.
LED is off.
LED is off.
task2 is running.
Toggle the led pin level.
LED is on.
LED is on.
LED is on.
task2 is running.
Toggle the led pin level.
LED is off.
LED is off.
LED is off.
LED is off.