mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
targets: add "adb" flash method using Android Debug Bridge
Add a new flash method that uses adb to flash boards over Android Debug
Bridge. The method supports running pre-flash shell commands via
"adb shell", pushing the firmware binary via "adb push", and running
post-flash shell commands with a {remote} token for the remote path.
New target JSON fields:
- adb-pre-commands: shell commands to run before pushing firmware
- adb-push-remote: remote device path for adb push
- adb-post-commands: shell commands to run after pushing firmware
Switch arduino-uno-q target to use the new adb flash method with
openocd running on the remote device.
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
"inherits": ["stm32u585"],
|
||||
"build-tags": ["arduino_uno_q"],
|
||||
"serial": "uart",
|
||||
"openocd-interface": "stlink",
|
||||
"openocd-target": "stm32u5x",
|
||||
"openocd-commands": ["adapter driver linuxgpiod adapter gpio swclk -chip 1 26 adapter gpio swdio -chip 1 25 adapter gpio srst -chip 1 38 transport select swd adapter speed 1000 reset_config srst_only srst_push_pull"]
|
||||
"flash-method": "adb",
|
||||
"adb-push-remote": "/tmp/firmware.hex",
|
||||
"adb-post-commands": [
|
||||
"/opt/openocd/bin/openocd -s /opt/openocd/share/openocd/scripts -s /opt/openocd -c \"adapter driver linuxgpiod\" -c \"adapter gpio swclk -chip 1 26\" -c \"adapter gpio swdio -chip 1 25\" -c \"adapter gpio srst -chip 1 38\" -c \"transport select swd\" -c \"adapter speed 1000\" -c \"reset_config srst_only srst_push_pull\" -f /opt/openocd/stm32u5x.cfg -c \"program {remote} verify reset exit\""
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user