summaryrefslogtreecommitdiff
path: root/util/flash_jlink.py
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-208/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/flash_jlink: Change to USB as defaultCraig Hesling2021-07-281-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: * allows for J-Link over USB to be the default connection * allows for passing in hostnames as the remote target, despite the segger tool only accepting IP addresses * changes the --ip arg to --remote, since this better describes the host + port description being provided BRANCH=none BUG=none TEST=# Check over USB ./util/flash_jlink.py TEST=JLinkRemoteServerCLExe ./util/flash_jlink.py --remote 127.0.0.1 ./util/flash_jlink.py --remote 127.0.0.1:19020 ./util/flash_jlink.py --remote localhost ./util/flash_jlink.py --remote localhost:19020 ./util/flash_jlink.py --remote localtoast # Should fail ./util/flash_jlink.py --remote localhost:port # Should fail Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I63c5a250f25bcae9828dc88b6282ac301b9a519f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3054818 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* util/flash_jlink: Add check if J-Link server is runningCraig Hesling2021-07-281-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | This server could be either the local JLinkRemoteServerCLExe program or a physical J-Link connected over the network. Since we are not sure if the remote server is on the localhost, we make a TCP connection to the server to check if it is running. BRANCH=none BUG=none TEST=# No JLinkRemoteServerCLExe running make proj-bloonchipper -j ./util/flash_jlink.py --board bloonchipper # Ensure the cute error is given TEST=JLinkRemoteServerCLExe # in background make proj-bloonchipper -j ./util/flash_jlink.py --board bloonchipper # Ensure all goes well Change-Id: I4f24e5f53545aa3b1482066fe8ba12d5f1715d42 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3055114 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* util/flash_jlink: Change JLinkRemoteServer default portCraig Hesling2021-07-271-1/+1
| | | | | | | | | | | | | | | | This changes the used port to JLinkRemoteServerCLExe's actual default port of 19020, so that you don't need to always specify it. BRANCH=none BUG=none TEST=JLinkRemoteServerCLExe # in background make proj-bloonchipper -j ./util/flash_jlink.py --board bloonchipper Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I2a3c1a10e0b5c7b9cc62001a3a26508ea3db8199 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3055111 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* flash_jlink: Pythonify the ip checkCraig Hesling2021-02-171-1/+1
| | | | | | | | | | | BRANCH=none BUG=none TEST=./util/flash_jlink.py --ip '' --board=nucleo-h743zi --image ./build/nucleo-h743zi/ec.bin Change-Id: Ibe5ec4d64173c83be837bcd08143d57a1d354d15 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2701193 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* flash_jlink: Add nucleosCraig Hesling2021-02-171-0/+3
| | | | | | | | | | | | | BRANCH=none BUG=none TEST=./util/flash_jlink.py --ip '' --board=nucleo-h743zi --image ./build/nucleo-h743zi/ec.bin TEST=./util/flash_jlink.py --ip '' --board=nucleo-dartmonkey --image ./build/nucleo-dartmonkey/ec.bin TEST=Can't test nucleo-f412zg, but confirmed the spelling is correct. Change-Id: I4d09bddb7640c74b8803b48530d243111940d2e1 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2701192 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* docs: Add instructions on using the flash_jlink.py scriptTom Hughes2021-01-261-0/+4
| | | | | | | | | | | | | | These instructions clarify how to use J-Link/J-Trace to flash the FPMCU dev boards. BRANCH=none BUG=b:178124518 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I73e0774e0721001f229e3a608262a64129d2ab44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643588 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* util/flash_jlink: Specify firmware addressTom Hughes2020-10-081-7/+13
| | | | | | | | | | | | BRANCH=none BUG=b:158580909 TEST=./util/flash_jlink.py --board icetower \ -i ./build/nocturne_fp/ec.bin Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I41c5694cf8cc4f6eb569a58267b6620b4ba2df2e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2459228 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* util: update recommended JLink versionTom Hughes2020-09-181-1/+1
| | | | | | | | | | | | | BRANCH=none BUG=b:158327221 TEST==With dragonclaw v0.2 connected to Segger J-Trace and servo micro: ./test/run_device_tests.py Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ibef704e447ecb94e383cd1463e7258c382272998 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410830 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* util/flash_jlink.py: Exit with error codeTom Hughes2020-06-161-2/+8
| | | | | | | | | | | | | | | | | | When flashing fails, the script will exit with non-zero exit code. BRANCH=none BUG=b:151105339 TEST=Stop JLinkRemoteServerCLExe: ./util/flash_jlink.py --board bloonchipper --image \ ./build/bloonchipper/flash_write_protect/flash_write_protect.bin echo $? 1 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I75052eb52d0690e7a6ba3ae9e5ccbf877bee2cd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2233781 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* util/flash_jlink.py: Reset after flashingCraig Hesling2020-06-041-0/+1
| | | | | | | | | | | | | | | | | | | You must reset the chip after flashing to start the new code. It is possible that the chip was resetting without this fix due to a double fault after flashing. In cases where the CPU is hung before flashing, the CPU would not reset. BRANCH=none BUG=none TEST=# Ensure that the chip is hung in on b/147520242 ./local/flash_jlink.py --ip '' # The UART console should reflect a reset and become interactive again Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I5006eff5d3a955ba9b8e6ecee4f72d7ad851f239 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226520 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/flash_jlink.py: Allow USB modeCraig Hesling2020-06-041-3/+8
| | | | | | | | | | | | | | | | | | | | This adds the option to specify "" for --ip, which will disable the TCP/IP mode. Thus, the JLink tool will default to USB direct. BRANCH=none BUG=none TEST=# Ensure JLinkRemoteServerCLExe is not running ./util/flash_jlink.py --ip '' # Ensure JLinkExe uses direct USB and succeeds TEST=# Ensure "JLinkRemoteServerCLExe -Port 2551 -select USB" is running ./util/flash_jlink.py # Ensure JLinkExe uses TCP/IP and succeeds Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I9da2efa8adf155673f14f12dbb354492b0827332 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226880 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/flash_jlink.py: Allow using PATH to find JLinkExeCraig Hesling2020-06-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Installing Jlink Debian package places JLinkExe in a PATH area. This allow flash_jlink to find the normal path'ed executable in addition to the hand placed binary. BRANCH=none BUG=none TEST=# Assume JLink_Linux_V670e_x86_64 dir does not exist mkdir ./JLink_Linux_V670e_x86_64 touch ./JLink_Linux_V670e_x86_64/JLinkExe chmod +x ./JLink_Linux_V670e_x86_64/JLinkExe ./util/flash_jlink.py # Should fail TEST=# Ensure the proper JLinkExe is in PATH rm -rf ./JLink_Linux_V670e_x86_64 ./util/flash_jlink.py # Should succeed Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ife0c2b7a47f989877f7b81a81a7dadd2b7cb5c1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226879 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/flash_jlink.py: Fix formatting + parsing conventionCraig Hesling2020-06-041-14/+15
| | | | | | | | | | | | | BRANCH=none BUG=none TEST=./util/flash_jlink.py --jlink JLinkExe --ip blah # Ensure that the blah parameter was passed Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iee38468eb38e91eb3f2b6c19de9c5070f1c0bc5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226878 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util/flash_jlink: Enforce python3Craig Hesling2020-06-041-1/+1
| | | | | | | | | | | | | | | | | Python 3 is required for the subprocess.run line. Enforcing python 3 helps our non-chroot devs. BRANCH=none BUG=none TEST=# Outside chroot ./util/flash_jlink.py # Ensure the error does not reference subprocess.run Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I057c1b00696a4b356f162795fd1794eba9c54bd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226877 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util: Script for flashing via J-LinkTom Hughes2020-05-151-0/+118
BRANCH=none BUG=none TEST=make BOARD=bloonchipper -j && \ ./util/flash_jlink.py --board bloonchipper Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ida382ade28451eaab62ca852337256740b81d30f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2191292 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>