Skip to content

Almighty42/STM32-UART-Serial-Console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UART Serial Console

A small UART-based command line interface firmware for STM32 boards. It exposes simple commands over a serial terminal (LED control, status, etc.) and is currently tested on the STM32F401RE Nucleo board. It uses make + arm-none-eabi-gcc and OpenOCD for flashing.

Features

  • led commands ( turn on / off / toggle )
  • status -> Shows some system values
  • help -> Lists out available commands

Using the program

Build the program and after connecting your STM32 board, flash it onto the board.

make build && make flash

Next expose a serial interface for your board to connect to ( I use a program called tio )

tio <interface> -b <baud-rate>

tio /dev/ttyACM0 -b 115200

Or you can use some other program

If you connected the board after running the serial interface you should see this

========================
STM32F401RE UART Console
========================
Type 'help' for available commands
> 

Example usage:

> help
Available commands:
 led on  - Turn LED on
 led off  - Turn LED off
 led toggle  - Toggle LED state
 status  - Show system status
 help  - Show this help

> kilroy was here
ERROR: Unknown command
Type 'help' for available commands

> 

Other make targets

Build in debug mode ( all .o files left, .map file present, compiled with debug options )

make build_debug

Run the openocd session for a STM32 board

make load

Cleaning project executables

make clean

Plan to implement

  • clear command
  • More detailed error message
  • Help sub-commands for each individual command
  • History system
  • SPI packet TX / RX over commands
  • I2C packet TX / RX over commands

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors