This a project with Simple Task Scheduler based an STM32F103 board with ARM® Cortex®-M3 MCU.
With an intention to help to learn the Operating System basises.
Time-triggered Preemptive round-robin Scheduler with stack switching between already pre-built tasks.
Purely bare-metal embedded-c and register manipulations without using any STM32Cubemx®-generated code, frameworks or HAL libraries.
It is pain way to learn low level software development.
For user interaction used UART with a simple Command Line Interface
Inspired by Kiran Nayak, FastBit Academy cource - Embedded Systems Programming on ARM Cortex-M3/M4 Processor
https://www.udemy.com/course/embedded-system-programming-on-arm-cortex-m3m4/
Supported commands:
- led-on/off - for turning on/off led
- get-time - show the amount of ticks after restart
- print-task-gebug - show each task acting
- OS: Windows 10 x64
- Code editor and Debbuger: VS code with extensions: Code Runner, Cortex-Debug
- Compiler: GNU ARM GCC - https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/tag/v11.2.1-1.2/
- Build automation: GNU Make - https://gnuwin32.sourceforge.net/packages/make.htm
- Interfaces with JTAG debugger: OpenOCD - https://github.com/openocd-org/openocd/releases/tag/v0.11.0
- Terminal emulator: Terra Term - https://ttssh2.osdn.jp/index.html.en
- Blue Pill STM32F103C8T6 board (Arm® 32-bit Cortex®-M3 CPU core 72MHz, 64Kb Flash, 20Kb SRAM)
- ST-Link V2 Mini - debugger and programmer.
- FTDI FT232RL - USB to UART interface
- Command Line Interface from project - Embedded CLI https://github.com/funbiscuit/embedded-cli/tree/v0.1.2
- Newlib-nano from GNU Arm Embedded Toolchain
- STM32F103C8TX_FLASH.ld, syscalls.c, sysmem.c for support libc so far still copy from generated by STM32CubeIDE
- For build use:
make all;
- For flash and debug use: VS code/Code Runner configured by .vscode/launch.json
- Cortex™-M3 Devices Generic User Guide
- STM32F103x8 datasheet
- stm32f10x Reference manual
- stm32f10x Programming manual
- Re-structure project according C guidelines and best practice
- Embedded CLI depends of malloc() from libc, maybe rewrite this to own implementation
- Embedded cli library - do it as git submodule
- printf() depends of libc, maybe rewrite this to own implementation
- Led seems configured not fully properly