- preemptive,
- priority-based,
- statically linked.
Cortex-M3 RTOS project with preemtive and priority-based scheduler, delay functions, mutexes and many more functionalities.
RTOS project files are located under src/rtos
folder.
Implemented:
- preempting and priority-based scheduler,
- delay functions,
- mutexes.
To do:
- semaphores,
- queues,
- messages,
- etc.
The RTOS is developed on a so-called "Bluepill" board with an STM32F103C8T6 microcontroller. Also, we are using Windows OS.
If you have some other microcontroller, you will need to change a few things (I will explain what you need to change if you have a different setup).
The project is using:
- VS Code as an IDE,
- GNU Make as a builder,
- arm-none-eabi toolchain for the GCC and the GDB,
- ST-Link as debugging probe,
- and OpenOCD as a program flasher.
First and foremost, we consider that the user already installed the following programs:
- VS Code
- arm-none-eabi toolchain
- OpenOCD
- ST-Link drivers
- GNU Make
Next, follow the steps below:
- Open VS Code and go to
File -> Open Folder
and select root folder (where you haveREADME.md
file) - Install the following VS Code extensions:
- ms-vscode.cpptools and
- marus25.cortex-debug
- Restart VS Code
- Open
.vscode/c_cpp_properties.json
file - Under
"compilerPath"
set path to point toarm-none-eabi-gcc.exe
executable. - Open
.vscode/launch.json
file - Under
"armToolchainPath"
set paths to point tobin
folder of the amr-none-eabi toolchain. - Open
.vscode/settings.json
file - Under
"cortex-debug.armToolchainPath"
provide a path to the bin directory of gcc-arm-none-eabi toolchain. - Under
"cortex-debug.openocdPath"
provide path toopenocd.exe
executable. - Open your favorite terminal and run GNU Make by executing
make
command. The project should build and the .hex, .bin, and .elf files should be located in thebuild
directory. - Connect Bluepill board with ST-Link and connect ST-Link with the PC.
- Go into the Run taskbar in VS Code (or press
Ctrl + Shift + D
) and press the green play button to run debug. The program should stop at themain
function and you can now debug it.
Please look into Issues. Also if you need futher info or guidance, please do not hesitate to contact me at vnucec.ivan@gmail.com
.
MIT License