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.
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.
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
.
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.
- Reset your microcontroller by clicking on the reset button on the back of the board.
- 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:
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:
- Help
- Info
- Flash
- Erase
- Clear
- Quit
- Verify
- Reset
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.
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:
- Alan Everett (GitHub: thatcomputerguy0101 )
- Joseph Smith (GitHub: Jas8101)
- Xavier Zhang (GitHub: Lereona)