[riot-notifications] [RIOT-OS/RIOT] boards/iotlab: rely on OPENOCD_RESET_USE_CONNECT_ASSERT_SRST (#12153)

Gaëtan Harter notifications at github.com
Mon Sep 2 16:18:47 CEST 2019


### Contribution description

Use the new OPENOCD_RESET_USE_CONNECT_ASSERT_SRST to configure
'reset_config connect_assert_srst' when flashing and resetting only.

This removes the need for a special debug configuration and should allow
connecting to a running target again.


### Testing procedure

When flashing the reset configuration used is the same (see the last line displayed in the output):


```
BOARD=iotlab-m3 RIOT_CI_BUILD=1 make --no-print-directory -C examples/hello-world/ flash
```

<details><summary>Output in the PR, the configuration is changed to the same as in master</summary>

```
BOARD=iotlab-m3 RIOT_CI_BUILD=1 make --no-print-directory -C examples/hello-world/ flash
Building application "hello-world" for "iotlab-m3" with MCU "stm32f1".

   text    data     bss     dec     hex filename
   8168     120    2556   10844    2a5c /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf
/home/harter/work/git/worktree/riot_master/dist/tools/openocd/openocd.sh flash /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf
### Flashing Target ###
GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00462-gdd1d90111 (2019-01-18-11:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
none separate
cortex_m reset_config sysresetreq
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_deassert_srst
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
```
</details>

<details><summary>Output in master until the reset configuration</summary>

```
Building application "hello-world" for "iotlab-m3" with MCU "stm32f1".                                                                                                                                                                                                                    

   text    data     bss     dec     hex filename
   8168     120    2556   10844    2a5c /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf
/home/harter/work/git/worktree/riot_master/dist/tools/openocd/openocd.sh flash /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf
/home/harter/work/git/worktree/riot_master/dist/tools/openocd/openocd.sh: line 124: [: : integer expression expected
### Flashing Target ###
GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00462-gdd1d90111 (2019-01-18-11:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
none separate
cortex_m reset_config sysresetreq
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
```
</details>


<details><summary>Debug works</summary>

```
BOARD=iotlab-m3 RIOT_CI_BUILD=1 make --no-print-directory -C examples/hello-world/ debug
/home/harter/work/git/worktree/riot_master/dist/tools/openocd/openocd.sh debug /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf
### Starting Debugging ###
GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00462-gdd1d90111 (2019-01-18-11:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Reading symbols from /home/harter/work/git/worktree/riot_master/examples/hello-world/bin/iotlab-m3/hello-world.elf...done.
Remote debugging using :3333
cortexm_sleep (deep=<optimized out>) at /home/harter/work/git/worktree/riot_master/cpu/cortexm_common/include/cpu.h:177
177         irq_restore(state);
(gdb) 
```
</details>


### Issues/PRs references

Alternative way of doing https://github.com/RIOT-OS/RIOT/pull/8977 that restores debug on a running target now that we have https://github.com/RIOT-OS/RIOT/pull/11976
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/12153

-- Commit Summary --

  * boards/iotlab: rely on OPENOCD_RESET_USE_CONNECT_ASSERT_SRST

-- File Changes --

    M boards/common/iotlab/Makefile.include (5)
    M boards/iotlab-a8-m3/dist/openocd.cfg (3)
    M boards/iotlab-m3/dist/openocd.cfg (3)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/12153.patch
https://github.com/RIOT-OS/RIOT/pull/12153.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12153
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190902/8c861179/attachment.htm>


More information about the notifications mailing list