Skip to content

This is the command line interface which interacts with the microcontroller bootloader also in the academic program

Notifications You must be signed in to change notification settings

GNAT-Academic-Program/mcu_bootloader_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcu_bootloader_cli

This repository contains the CLI for the Ada Microcontroller Bootloader. It was designed to run on Ubuntu Linux, but may also work on other operating systems.

Introduction

This project was made for a senior design project at Pennsylvania State University, Behrend College, and was sponsored by AdaCore and part of its GNAT Academic Program. The goal of the project is to create a bootloader written in Ada for the STM32 microcontroller family. This project was tested for the STM32F746GDISCOVERY Board. The following repository is for the command line interface application that directly communicates with the Ada Microcontroller Bootloader that has been loaded on the STM32F746G-DISCO Board. More about the project can be found on the project's senior design web page.

Building

This project uses the Alire package manager. The CLI can be built by running alr build, or built and ran by running alr run. Either option creates the output executable at bin/mcu_cli.

Setting Up the Environment

This project requires you to load the Ada Microcontroller Bootloader onto your STM32 microcontroller. Instructions to load the bootloader can be found in the README file for it. Before running any of the commands on the CLI, make sure your microcontroller is running in the bootloader first.

  1. Reset your microcontroller by clicking on the reset button on the back of the board.
  2. Interrupt the booting sequence by pressing the user button on the back of the board within the first 100ms of start up.

Interrupting the board at start up:

STM32F746G-DISCO User and Reset Buttons:

Commands

Running the command is as simple as typing it in the command line interface and pressing Enter.

Running the info command:

All available commands can be listed by running help from the CLI. Running help <command>, like help flash will get detailed usage information for the command.

Current implemented commands:

  1. Help
  2. Info
  3. Flash
  4. Erase
  5. Clear
  6. Quit
  7. Verify
  8. Reset

Tests

This project uses ShUnit2 to run automated test cases. All tests can be ran using ./tests/test.sh from the project root, or a specific test can be ran using ./tests/test.sh -- <insert test name here>. For example, to run the clear command test case, execute ./tests/test.sh -- test_clear_command. Multiple tests can be run by listing multiple names separated by spaces.

Credits

Thank you to Pennsylvania State University, Behrend College, and AdaCore for sponsoring and hosting this project.

Further credits goes to Mr. Olivier Henley (GitHub: ohenley), our industry advisor from AdaCore, and Dr. Chen Cao, our project advisor for senior design.

Final credits goes to the senior design team:

  1. Alan Everett (GitHub: thatcomputerguy0101 )
  2. Joseph Smith (GitHub: Jas8101)
  3. Xavier Zhang (GitHub: Lereona)

About

This is the command line interface which interacts with the microcontroller bootloader also in the academic program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published