ylyamin / STM32F103-Preemptive-scheduler

Simple Task Scheduler based an STM32F103 board

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STM32F103 Preemptive scheduler

GitHub release (latest by date)

Overview

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/

Demo

cli_example

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

Toolchain:

Hardware:

  • 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

External dependency

Instalation

  • For build use:
make all;
  • For flash and debug use: VS code/Code Runner configured by .vscode/launch.json

Documentation

TODO:

  • 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

About

Simple Task Scheduler based an STM32F103 board


Languages

Language:C 98.6%Language:Makefile 1.4%