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

39 Commits

Author SHA1 Message Date
crasbe
5d7194a4ee makefiles: introduce OPENOCD_POST_INIT_CMDS 2024-11-08 16:03:17 +01:00
Marian Buschsieweke
d674b3a80c
makefiles/tools/openocd.inc.mk: Improve transport handling
Allow setting `OPENOCD_TRANSPORT` to `default` for when a transport to
not explicitly set the transport. This is useful when the target or
interface script already specify the transport.
2024-01-17 09:14:38 +01:00
bors[bot]
829af7c105
Merge #19703 #19724 #19735
19703: cpu/sam0_eth: interrupt based link detection/auto-negotiation r=benpicco a=benpicco



19724: dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable r=benpicco a=fabian18



19735: nrf5x_common: Clear I2C periph shorts r=benpicco a=bergzand

### Contribution description

The I2C peripheral's shortcuts are used with the read and write register to automatically stop the I2C transaction or to continue with the next stage.

With simple I2C read and write bytes these shorts are not used, but are also not cleared by the function in all cases, causing it to use the shortcut configuration set by a previous function call. This patch ensures that the shorts are always set by the read and write functions

### Testing procedure

Should be possible to spot with a logic analyzer and the I2C periph test. Maybe the HIL test can also detect it :)

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-06-14 12:34:33 +00:00
Fabian Hüßler
17d0e586c5 dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable 2023-06-13 21:04:27 +02:00
Fabian Hüßler
c76a192eb8 openocd: support target debug-client 2023-06-10 01:03:30 +02:00
Marian Buschsieweke
f220c23c20
tools/openocd: Fix handling of OPENOCD_CMD_RESET_HALT
The OPENOCD_CMD_RESET_HALT was not longer correctly passed to the
script. This fixes the issue.
2023-04-25 15:59:30 +02:00
Marian Buschsieweke
3e1dcf31cb
tools/openocd: Allow specifying a custom halt command
Typically, OpenOCD is already performing a reset on connect. A
`reset halt` to bring the target to a `halt` state for flashing will
result in the device going through a second reset cycle. This can be
problematic with some device, such as the CC26xx MCUs. For these
devices, an `OPENOCD_CMD_RESET_HALT := -c 'halt'` will avoid the second
reset that is causing the issues.
2023-01-10 21:59:56 +01:00
Benjamin Valentin
1111631c45 makefiles/tools: define DEBUG_ELFFILE and use it for debugging 2022-05-31 12:39:16 +02:00
9eec6f4eb1
makefiles/openocd: remove DEBUG_ADAPTER and PRE_FLASH_CHECK_SCRIPT vars 2022-01-08 12:05:46 +01:00
Erik Ekman
cbfe502cc6 cpu/esp32: Reset when starting debugging
To avoid 'Target not examined yet' error
2021-10-18 20:11:32 +02:00
Erik Ekman
1c6d7dcdaf tools/openocd: Make verifying flashed image optional
Checksumming flash is not supported on xtensa platform:

Warn : not implemented yet

make: *** [.../RIOT/examples/saul/../../Makefile.include:796: flash] Error 1
2021-10-15 10:13:25 +02:00
Erik Ekman
2df7d499c8 tools/openocd: Export IMAGE_OFFSET only when flashing 2021-10-15 10:12:40 +02:00
1c2132a508
tools/openocd: deprecate DEBUG_ADAPTER and PRE_FLASH_CHECK_SCRIPT 2021-02-23 21:22:55 +01:00
7e21f25779
make: namespace openocd PRE_FLASH_CHECK_SCRIPT variable 2021-02-23 21:22:55 +01:00
603186f913
make: namespace openocd DEBUG_ADAPTER variable 2021-02-23 21:22:52 +01:00
2bcc754fe5
makefiles/tools: ensure all FLASHER/DEBUGGER* vars are overridable 2020-11-27 13:39:22 +01:00
Gilles DOFFE
8a35e114c0 tools/openocd: add GDB_PORT_CORE_OFFSET variable
In case of muticore CPU, openocd opens one debug port by core for gdb.
Thus add a GDB_PORT_CORE_OFFSET port offset to select the right port
for debugging.

Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
2020-11-13 10:43:08 +01:00
Gilles DOFFE
4f3ea5c74c tools/openocd: select target core
For multi-arch SoC like STM32MP1, the right target core has
to be selected to avoid debugging the wrong default cpu.
This is done using openocd command 'targets ${OPENOCD_CORE}'.
OPENOCD_CORE has to be set in board Makefile.include file.
In case it is not set, the command just display available targets, thus it
has no effect on already existing boards using openocd.

Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
2020-11-13 10:43:08 +01:00
Benjamin Valentin
0d59e7dc6e makefiles/tools/openocd-adapters: default to SWD, but make it configurable 2020-08-04 10:36:39 +02:00
Marian Buschsieweke
ba7815163c
Makefile*: Allow multiple external board dirs
- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
  list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
    - If BOARDSDIR is provided by the user, it will be added to
      EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
      to encourage users migrating to EXTRA_BOARDS.)
    - BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
        - Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
        - Provides backward compatibility
2020-04-29 18:32:39 +02:00
75e828fdeb
makefiles/openocd: define flash targets in a variable 2020-04-07 11:38:10 +02:00
308ee9b31c
makefiles/openocd: export OPENOCD_CMD_RESET_RUN only when required 2020-03-26 10:00:05 +01:00
a0be709a8c
makefiles/openocd: export PRE_FLASH_CHECK_SCRIPT only when required 2020-03-26 09:37:05 +01:00
fcecd6e362
makefiles/openocd: export OPENOCD_PRE_FLASH_CMDS only when required 2020-03-26 09:31:21 +01:00
93f1c7971c
makefiles/openocd: export OPENOCD_PRE_VERIFY_CMDS only when required 2020-03-26 09:31:11 +01:00
54dbb5fce0
makefiles/openocd: export OPENOCD_ADAPTER_INIT to required target 2020-03-03 11:42:20 +01:00
5ba95ed857
makefiles/openocd: export OPENOCD_RESET_USE... to required targets 2020-03-03 11:42:19 +01:00
03f4d383db
makefiles/openocd: export OPENOCD_CONFIG to required targets 2020-02-24 10:04:11 +01:00
Gaëtan Harter
7306dbd382
boards/tools: remove exporting DEBUG*
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the
main Makefile.include or by file included by it.
Their value does not need to be exported.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `55 insertions(+), 55 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:58:35 +02:00
Gaëtan Harter
b88d1887c8
boards/tools: remove exporting RESET/RESET_FLAGS
RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `24 insertions(+), 24 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:14 +02:00
Gaëtan Harter
ac113ca2f8
boards/tools: remove exporting FLASHER/FFLAGS
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for FFLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:00 +02:00
Gaëtan Harter
0be610558d
boards/openocd: use FLASHFILE for boards using openocd
Update to use FLASHFILE as file to be flashed on the board.
2019-03-26 19:26:42 +01:00
Gaëtan Harter
a0b97ad737
openocd: get flash and debug files from cli
Get FLASH_FILE and ELFFILE from command line instead of environment variable.

The documentation was claiming ELFFILE was given as a command line argument
already, but is was not.
2018-12-05 16:21:03 +01:00
f04f954a21 makefiles/tools: use RIOTTOOLS variable 2018-05-15 11:29:33 +02:00
cladmi
3f145413f5 boards/makefiles: Remove '-Otype' from OFLAGS
* Remove '-Oihex' and '-Obinary' from OFLAGS for all boards
  It is now provided by the Makefile.include rule.
2018-04-09 17:32:46 +02:00
28a0ffca37 tools: edbg: use for resetting 2018-02-16 15:32:58 +01:00
Joakim Nohlgård
57de166ea1 makefiles: Refactor openocd tool handling
Attempt to decouple board configuration from debugger interface
configuration by specifying the DEBUG_IFACE variable for the debug
hardware interface to use.
2017-11-17 10:03:05 +01:00
8d3b7a28fc makefiles: openocd.inc.mk: make FLASHER overridable 2017-05-23 10:17:18 +02:00
Joakim Nohlgård
339a4da9dc Makefiles: move to new directory /makefiles 2017-04-04 15:11:54 +02:00