portfolio/STM32 2-Factor Lock

FreeRTOS Shell

Lightweight FreeRTOS based command shell for controlling a MCU via UART.

CCMakeFreeRTOSCLI

Demo Video

Overview

FreeRTOS Shell is a simple interactive command shell implemented as a separate task in FreeRTOS. Through the UART interface and any terminal on the PC (PuTTY, Tera Term, etc.), the user can enter commands for diagnostics and control of the device in real time.

It's designed to be memory-efficient and suitable for resource-constrained microcontrollers while providing powerful debugging and control capabilities. The core shell engine can be extended with additional modules for more specialized functionality, such as file system operations, network diagnostics, or custom hardware control.

Project Goal: Implement a command line interface to directly interact with the device in real time - without the need for external software or complex protocols.

Key Features

  • Peripheral control via text commands - basic initialization and control of GPIO, UART and other modules.
  • System diagnostics via commands - output the status of tasks, free heap and stack usage.
  • Task management via CLI - view list of tasks and get detailed information.
  • Help & documentation - customizable command registry with help documentation.

Technical Specifications

Real-Time OS & Portability

  • FreeRTOS 11.x + CLI
  • Portable code — only need UART and standart time functions

CLI Configuration

  • Adjustable constants
  • 11 commands present