[riot-notifications] [RIOT-OS/RIOT] Makefile.include: add cleanterm target and use it for tests (#12107)

Francisco notifications at github.com
Fri Sep 27 16:15:12 CEST 2019


Works as advertised:

<details><summary><code>RIOT_TERMINAL=pyterm iotlab-m3</code></summary>

```
RIOT_TERMINAL=pyterm BOARD=iotlab-m3 RIOT_CI_BUILD=1 make --no-print-directory -C tests/test_tools/ flash test

Building application "tests_test_tools" for "iotlab-m3" with MCU "stm32f1".

   text	   data	    bss	    dec	    hex	filename
   9804	    140	   2632	  12576	   3120	/home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf
/home/francisco/workspace/RIOT/dist/tools/openocd/openocd.sh flash /home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-00703-g92bb76a4-dirty (2019-07-19-14:27)
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
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 36847 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f1x.cpu       cortex_m   little stm32f1x.cpu       reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800045c msp: 0x20000200
auto erase enabled
Info : device id = 0x10016414
Info : flash size = 512kbytes
wrote 10240 bytes from file /home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf in 0.474500s (21.075 KiB/s)
verified 9944 bytes in 0.177059s (54.846 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
/home/francisco/workspace/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" --noprefix --no-repeat-command-on-empty-line
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
�main(): This is RIOT! (Version: buildtest)
Running 'tests_tools' application
shellping
shellpong
true this should not be echoed
shellping
shellpong
toupper lowercase
LOWERCASE
getchar

getchar 0x0a

```
</details>

<details><summary><code>RIOT_TERMINAL=picocom iotlab-m3</code></summary>

```
RIOT_TERMINAL=picocom  BOARD=iotlab-m3 RIOT_CI_BUILD=1 make --no-print-directory -C tBuilding application "tests_test_tools" for "iotlab-m3" with MCU "stm32f1".

   text	   data	    bss	    dec	    hex	filename
   9804	    140	   2632	  12576	   3120	/home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf
/home/francisco/workspace/RIOT/dist/tools/openocd/openocd.sh flash /home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-00703-g92bb76a4-dirty (2019-07-19-14:27)
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
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 44335 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f1x.cpu       cortex_m   little stm32f1x.cpu       reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000428 msp: 0x20000200
auto erase enabled
Info : device id = 0x10016414
Info : flash size = 512kbytes
wrote 10240 bytes from file /home/francisco/workspace/RIOT/tests/test_tools/bin/iotlab-m3/tests_test_tools.elf in 0.471909s (21.191 KiB/s)
verified 9944 bytes in 0.177937s (54.575 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
picocom --nolock --imap lfcrlf --baud "500000" "/dev/ttyUSB1"
picocom v2.2

port is        : /dev/ttyUSB1
flowcontrol    : none
baudrate is    : 500000
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : yes
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : lfcrlf,
omap is        : 
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready
�main(): This is RIOT! (Version: buildtest)
Running 'tests_tools' application
shellping
shellpong
true this should not be echoed
shellping
shellpong
toupper lowercase
LOWERCASE
getchar

getchar 0x0a

```
</details>

<details><summary><code>native</code></summary>

```
RIOT_CI_BUILD=1 BOARD=native make --no-print-directory -C tests/test_tools/ flash test
Building application "tests_test_tools" for "native" with MCU "native".

   text	   data	    bss	    dec	    hex	filename
  23072	    656	  47652	  71380	  116d4	/home/francisco/workspace/RIOT/tests/test_tools/bin/native/tests_test_tools.elf
true 
/home/francisco/workspace/RIOT/tests/test_tools/bin/native/tests_test_tools.elf  
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: buildtest)
Running 'tests_tools' application
shellping
shellpong
true this should not be echoed
shellping
shellpong
toupper lowercase
LOWERCASE
getchar

getchar 0x0a

```
</details>

<details><summary><code>term</code></summary>

```
make -C tests/xtimer_usleep -j BOARD=iotlab-m3 --no-print-directory term
/home/francisco/workspace/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-09-27 16:09:14,425 - INFO # Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
s
2019-09-27 16:09:16,570 - INFO # START
2019-09-27 16:09:16,574 - INFO # Slept for 10014 us (expected: 10000 us) Offset: 14 us
2019-09-27 16:09:16,619 - INFO # Slept for 50014 us (expected: 50000 us) Offset: 14 us
2019-09-27 16:09:16,634 - INFO # Slept for 10247 us (expected: 10234 us) Offset: 13 us
2019-09-27 16:09:16,699 - INFO # Slept for 56793 us (expected: 56780 us) Offset: 13 us
2019-09-27 16:09:16,715 - INFO # Slept for 12135 us (expected: 12122 us) Offset: 13 us
2019-09-27 16:09:16,811 - INFO # Slept for 98778 us (expected: 98765 us) Offset: 13 us
2019-09-27 16:09:16,891 - INFO # Slept for 75014 us (expected: 75000 us) Offset: 14 us
2019-09-27 16:09:16,892 - INFO # Slept for 10014 us (expected: 10000 us) Offset: 14 us

```
</details>


-- 
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/12107#issuecomment-535957612
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190927/51db40e9/attachment.htm>


More information about the notifications mailing list