This project uses CAN ISO-TP to do file transfer over CAN bus! Courtesy of this C library for the easy setup of ISO-TP on an MCU.
Using a simple python script, you can flash an STM32F4 based device!
- Linux kernel with SocketCAN
- CAN Adapter (CANable or other)
- STM32F407VET6 MCU Target
- Python 3.7+
- A CAN bus (of course)
-
Build and flash your STM32F4 device with the given Bootloader Platformio project
-
Set up your CAN interface
sudo ip link set can0 type can bitrate 1000000 sudo ip link set can0 up
-
Install Python dependencies
pip install python-can pip install can-isotp
-
Run the script!
python linux_send_isotp.py /path/to/your/binary.bin
- Add common API for app to jump back to bootloader
- Optimize bootloader size
- Add CRC verficiation