Hardware in loop allows remote code uploading onto STM32 boards without physical presence near the boards.
This project uses a Raspberry Pi as a hub to remotely pull code from Git Hub and upload code to the STM32 board. The aim is to facilitate the rapid development of code.
- An STM32 board
- A Raspberry Pi
- Github Actions Runner
This can be set up by going to the settings -> actions -> runner and setting up a Linux runner. Follow all the commands '''except the last command''' which executes the
run.sh
shell script. - Libraries
- Setting up printf and scanf using this website
- Run this sudo command to ensure your system's package list is up to date:
sudo apt update sudo apt-get update
- Install stlink and its dependencies:
sudo apt-get install stlink-tools
- Install libtool and its dependencies:
sudo apt install libtool
- Install the ARM GCC toolchain:
sudo apt install gcc-arm-none-eabi
- Installing OpenOCD using the code below
Now paste this at the end of the filegit clone git://git.code.sf.net/p/openocd/code cd code/ ./bootstrap ./configure make sudo make install cd .. rm -rf code/ sudo nano /etc/udev/rules.d/stlink.rules
KERNEL=="tty[A-Z]*[0-9]", MODE="0666" SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", MODE="0666"
The worklfow on the yaml file starts when a push is made to main.
Add the file paths
to the YAML file. These file paths
are labelled in the env
section of the YAML file.
To execute this project to the location of the self hosted runner loaction and execute ./run/sh
.
In case the runner is deleted, please go ahead and reinstall the runner at the same location (which by default shall be actions-runner). To do this, skip the first command
(*mkdir.....*
) .
If you get an error while configuring, execute
ls -a
rm -f .runnner
rm -f config.sh