This project aims to provide a hands-on learning experience for FreeRTOS in a C++ environment using the STM32F103RB microcontroller. FreeRTOS is a real-time operating system kernel that allows for multitasking, task scheduling, and resource management. By working with the STM32F103RB microcontroller, this project offers an opportunity to understand the integration of FreeRTOS with a specific hardware platform. Through practical examples and exercises, developers can gain a deeper understanding of real-time systems and enhance their skills in embedded software development.
I choose the following folder structure for this project:
.vscode/
: Contains the VSCode configuration files.c_cpp_properties.json
: The C/C++ configuration file for the project.launch.json
: The launch configuration file for the project.settings.json
: The VSCode settings file for the project.tasks.json
: The VSCode tasks file for the project.
CMakeLists.txt
: The main CMake configuration file for the project.CMakeUserPresets.json
: The CMake user presets file for the project.LICENSE
: The license file for the project.README.md
: The README file for the project.STM32F103.svd
: The STM32F103RB SVD file for the project.STM32F103xB_FLASH.ld
: The STM32F103RB linker script file for the project..clang-format
: The ClangFormat configuration file for the project..gitignore
: The Git configuration file for the project.cmake
: Contains the CMake configuration files.arm-none-eabi-gcc.cmake
: Contains the toolchain files for the project.FindClangFormat.cmake
: Contains the ClangFormat configuration files.
src/
: Contains the source code files for the project.main.cpp
: The main entry point of the application.freertos/
: Contains the FreeRTOS code.FreeRTOSConfig
: The FreeRTOS configuration file.tasks/
: Contains the FreeRTOS task implementation files.Source/
: Contains the FreeRTOS source files.
drivers/
: Contains the driver implementation files.led/
: Contains the Led driver implementation files.
stm32f103rb/
: Contains the STM32F103RB specific code.peripherals/
: Contains the peripheral driver implementation files.CMSIS/
: Contains the CMSIS driver implementation files.STM32F1xx_HAL_Driver/
: Contains the STM32 HAL driver implementation files.
startup/
: Contains the startup code files.
build/
: Contains the build output files (generated by CMake).docs/
: Contains project documentation and user guides.tests/
: Contains unit tests for the project.
This folder structure provides a clear separation of concerns and allows for easy navigation and maintenance of the project files.
cmake --preset=Debug
cmake --build build/Debug
st-flash write build/Debug/freertos-learning.bin 0x8000000
- Write a simple blinky application whitout FreeRTOS.
- Integrate FreeRTOS.
- Create a task for the blinky application.
- Create a driver for a specific peripheral like Led.