๐ Short Manual for Installing & Configuring HIL Test Server on Raspberry Pi¶
Detailed video instruction can be found here: ๐บ https://www.youtube.com/@MyEmbeddedWay/playlists
1. ๐งฉ Install Raspberry Pi OS Lite on SD Card¶
Recommended software for flashing the SD card: https://www.raspberrypi.com/software/
2. ๐ Update System¶
sudo apt update && sudo apt upgrade -y
3. ๐ Install Additional Tools¶
sudo apt install git cmake make gcc g++ libusb-1.0-0-dev pkg-config -y
4. ๐ง Install ST-Link Tools¶
๐ฅ Download stlink¶
git clone https://github.com/stlink-org/stlink.git
cd stlink
๐ Build from source¶
sudo make release
๐ฆ Install stlink¶
sudo make install
๐ Update shared-library cache¶
sudo ldconfig
๐งช Check version¶
st-info --version
st-info --probe
5. ๐ Install pip¶
sudo apt install python3-pip -y
6. โ Install py-micro-hil¶
sudo pip install py-micro-hil --break-system-packages
โ Verify installation¶
hiltest -h
7. ๐ก Install lighttpd (Web Server)¶
sudo apt install lighttpd -y
๐ Check current status¶
systemctl status lighttpd
โถ Control the service¶
Start:
sudo systemctl start lighttpd
Stop:
sudo systemctl stop lighttpd
Restart:
sudo systemctl restart lighttpd
๐ Check if lighttpd autostarts¶
systemctl is-enabled lighttpd
โ Enable autostart¶
sudo systemctl enable lighttpd
8. ๐ Fix Web Directory Permissions¶
sudo chown -R $USER:$USER /var/www/html
9. ๐ค Add User to Peripheral Access Groups¶
sudo usermod -aG gpio,i2c,spi,dialout $USER
(Re-login or reboot required.)
10. ๐ Enable Hardware Interfaces¶
Open Raspberry Pi configuration tool:
sudo raspi-config
Then enable:
- Interface Options โ SPI โ Enable
- Interface Options โ I2C โ Enable
-
Interface Options โ Serial Port โ Enable
-
Disable login shell โ Yes
- Enable serial port hardware โ Yes
11. ๐ Reboot the System¶
sudo reboot
๐ Your Raspberry Pi HIL test server is now fully configured!