mirror of
https://github.com/keirf/greaseweazle-firmware.git
synced 2025-10-31 11:06:44 -07:00
STM32F7: Add build target to program via OpenOCD
This commit is contained in:
4
Makefile
4
Makefile
@@ -71,6 +71,10 @@ endif
|
||||
BAUD=115200
|
||||
DEV=/dev/ttyUSB0
|
||||
|
||||
ocd: all
|
||||
python3 scripts/telnet.py localhost 4444 \
|
||||
"reset init ; flash write_image erase `pwd`/$(PROJ)-$(VER).hex ; reset"
|
||||
|
||||
flash: all
|
||||
sudo stm32flash -b $(BAUD) -w $(PROJ)-$(VER).hex $(DEV)
|
||||
|
||||
|
||||
9
scripts/telnet.py
Normal file
9
scripts/telnet.py
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# Send a command over telnet to remote host:
|
||||
# telnet.py <host> <port> <string>
|
||||
|
||||
import sys
|
||||
import telnetlib
|
||||
|
||||
with telnetlib.Telnet(sys.argv[1], sys.argv[2]) as t:
|
||||
t.write((sys.argv[3] + '\n').encode('utf-8'))
|
||||
Reference in New Issue
Block a user