1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

37 Commits

Author SHA1 Message Date
LP-HAW
25013f8ca9 dist/tools/jlink: fix DBG_PID assignment 2023-09-29 13:23:38 +02:00
Oleg Hahm
30e1d3ef8a tools/jlink.sh: start gdb server with setsid
Adopted from openocd script in order to prevent killing the gdb server
upon SIGINT.
2023-06-09 15:33:14 +02:00
Marian Buschsieweke
666dc23266
dist/tools/jlink/jlink.sh: allow flashing with ELF file
Adapt the script to flash files as ELF file if the file extension is
`.elf`, otherwise stick with default behavior and flash as bin file.
2023-05-03 15:32:17 +02:00
Hauke Petersen
ce0d589384
Merge pull request #15807 from haukepetersen/opt_jlink_versioncheckstuff
tools/jlink.sh: fix version check and allow to skip it
2021-01-25 14:03:06 +01:00
75748e3c1f
tools/jlink.sh: Run JlinkExe with silent when debugging
The print statements from the Jlink binary offer little additional
benefit while debugging and only clutter the output. Furthermore they
interfere with the TUI layout of GDB when one of the context layouts is
used.
2021-01-19 21:49:28 +01:00
Hauke Petersen
82ae3eb8a6 tools/jlink.sh: allow to skip version check 2021-01-19 21:28:00 +01:00
Hauke Petersen
5f8d58fbea tools/jlink.sh: use SERIAL for version test 2021-01-19 21:27:07 +01:00
Roudy Dagher
1dc6c848f6 dist/tools/jlink: debugserver test_config prior test_version 2020-11-17 16:42:54 +01:00
Francisco Molina
1dc84b0d9e
dist/tools/jlink: use 'grep -E' instead of 'grep -P'
-P is not suppoted in OSX
2020-11-13 14:27:43 +01:00
Francisco Molina
914912b276
dist/tools/jlink: add -nogui to version test
If multiple debuggers are present when testing for JLinkExe version
a GUI will open to select the debugger to attach, so add -nogui
when testing for version as well.
2020-11-13 14:13:38 +01:00
Bas Stottelaar
62530f42c8 dist/jlink: check for minimum version 2020-10-21 18:23:02 +02:00
Bas Stottelaar
237a24d51b dist/jlink: do not show the GUI.
Since J-Link V6.74, a GUI is shown when flashing from the command line.
This steals the focus of the terminal. Adding `-nogui 1` solves the
issue, but raises the minimum supported version to V6.74 (released
around June 2020).

Note that JLinkGDBServer has a slightly different `-nogui` option.
2020-10-21 14:34:49 +02:00
Bas Stottelaar
8af4f4a60c dist/jlink: textual improvements
- renamed JLink -> J-Link [1]
- fixed incomplete sentence
- fixed typo's

[1] https://wiki.segger.com/J-Link_Commander
2020-10-21 14:08:52 +02:00
Bas Stottelaar
107fd41b1a dist/jlink: unify command line options
According to the documentation [1], the options are case-insensitive.
Unify all options to use a single style (lower case was the easiest).

[1] https://wiki.segger.com/J-Link_Commander
2020-10-21 14:02:28 +02:00
Francisco Molina
f9ebc8658f dist/tools/jlink: cleanup doc 2019-11-18 13:04:42 +01:00
Gaëtan Harter
a514c9bc12
jlink.sh: use PYTERMFLAGS
Use PYTERMFLAGS for configuring the terminal.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
5ed65989ed
dist/jlink.sh: Allow overwriting the 'reset' commands
Add a variable to configure the reset commands.
This is required for board that need a hardware reset.
2019-07-17 15:29:51 +02:00
Leandro Lanzieri
79c095ef46 tools/jlink: Exit terminal on Ctrl+C 2019-05-29 09:18:52 +02:00
Leandro Lanzieri
07131b4e4d tools/jlink: Wait for server before pyterm 2019-05-29 09:16:05 +02:00
Gaëtan Harter
a354b10964
jlink.sh: Exit with an error on failure for JLinkExe commands
On error Jlink exits with a no error code by default.

From the JLink User Guide:

'-ExitOnError' has the same meaning as the 'exitonerror' command

    'exitonerror' command
    This command toggles whether J-Link Commander exits on error or not.

    1: J-Link Commander will now exit on Error.
    0: J-Link Commander will no longer exit on Error.

Executing 'flash/reset' without a board connected now correctly returns an
error. For 'term' it does not show an error due to the way it is handled
internally.

It also returns an error when the board fails to do an operation when it
is in a state where it cannot be flashed for example.
2019-03-28 11:26:24 +01:00
danpetry
80d4838b1a jlink: handle flashing at IMAGE_OFFSET
- Handling of flashing address is now similar to that in openocd,
  except FLASH_ADDR is not automatically determined
2019-03-20 16:07:51 +01:00
cladmi
5fcc1210d9
jlink: get flash and debug files from cli
Get BINFILE and ELFFILE from command line instead of environment variable.

Rename 'HEXFILE' to 'BINFILE' in the script as the binary file is used.
The documentation was already talking about 'BINFILE' but 'BINFILE'
was never exported by the build system and it was using 'HEXFILE' in the
implementation.
2018-11-27 15:28:49 +01:00
Francisco Acosta
cb8e78da13
Merge pull request #9916 from kYc0o/pr/tools/fix_kill_testrunner
dist/tools/jlink.sh: fix testrunner on stdio_rtt based devices
2018-10-04 17:31:58 +02:00
Francisco Acosta
89fa4da4c3 dist/tools/jlink: remove duplicated check 2018-09-11 17:29:12 +02:00
Francisco Acosta
ad87b2875e dist/tools/jlink: remove setsid for launching JLinkExe for term
When executing `make test` on devices using JLink, testrunner
launches `make term` which calls `jlink.sh term_rtt`. When finished
the father process is killed but `setsid` has launched JLinkExe
as another subprocess, which is not killed by `os.killpg` from
testrunner since it doesn't belong to the same group.
2018-09-11 00:46:18 +02:00
Francisco Acosta
dfd349a05b dist/tools/jlink: send output to /dev/null
While running `make term` JLinkExe is expecting commands and thus
can be disturbed by other JLink commands, e.g. `make reset`.
This enable `make test` (which runs those two commands at the same
time) on target using JLinkExe as a programmer/debugger.
2018-09-11 00:46:18 +02:00
Gaëtan Harter
b0b2835503
dist/tools/jlink: use RIOTTOOLS variable 2018-06-28 14:05:33 +02:00
Bas Stottelaar
c04d831754 dist/tools: jlink: use GDB as default for DBG 2018-03-29 19:54:48 +02:00
Hauke Petersen
45e0468ea4 tools/jlink: add RTT terminal support (term_rtt) 2018-01-15 23:01:34 +01:00
Bas Stottelaar
7e7d5d30f0 dist/tools: check DBG env var. 2017-10-29 15:06:46 +01:00
kYc0o
b19fcba019 dist/tools/jlink: add flashing offset when set 2017-07-17 14:48:29 +02:00
Jason Tran
de8c3f0a85 dist/tools/jlink: remove jlink confirmation prompt 2017-01-24 19:42:06 -08:00
Jeff Bortolotti
6b086e7ae2 dist: tools: jlink.sh: use printf for JLINK_*_FLASH to allow use of backslas 2016-09-30 19:10:01 +02:00
Toon Stegen
cf431e696c make debug: start gdb quietly 2016-04-22 12:00:10 +02:00
Bas Stottelaar
6ce6bb6468 dist: jlink: flash mcu based on serial number 2016-04-04 23:48:21 +02:00
Hauke Petersen
90512ce3ab dist/jlink: fixed typo in JLINK_PRE_FLASH 2016-03-01 19:22:42 +01:00
Hauke Petersen
4b62a4902f dist: added common JLink script for flashing 2015-10-28 11:19:38 +01:00