Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

boards/adafruit-clue: use shared usb_board_reset.mk for flash/reset/term targets #19616

Merged

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented May 18, 2023

Contribution description

Most of the variables defined in the Makefile.include are the same in usb_board_reset.mk. Let's include that file instead.

Testing procedure

  • flash, reset, term are working as expected on adafruti-clue:
$ make -C examples/default BOARD=adafruit-clue flash term --no-print-directory 
Building application "default" for "adafruit-clue" with MCU "nrf52".

"make" -C /work/riot/RIOT/pkg/cmsis/ 
"make" -C /work/riot/RIOT/boards/adafruit-clue
"make" -C /work/riot/RIOT/boards/common/init
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/core/lib
"make" -C /work/riot/RIOT/cpu/nrf52
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/nrf52/periph
"make" -C /work/riot/RIOT/cpu/nrf52/vectors
"make" -C /work/riot/RIOT/cpu/nrf5x_common
"make" -C /work/riot/RIOT/cpu/nrf5x_common/periph
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/apds99xx
"make" -C /work/riot/RIOT/drivers/bmx280
"make" -C /work/riot/RIOT/drivers/lis3mdl
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/saul
"make" -C /work/riot/RIOT/drivers/saul/init_devs
"make" -C /work/riot/RIOT/drivers/sht3x
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/auto_init/usb
"make" -C /work/riot/RIOT/sys/checksum
"make" -C /work/riot/RIOT/sys/div
"make" -C /work/riot/RIOT/sys/event
"make" -C /work/riot/RIOT/sys/fmt
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/libc
"make" -C /work/riot/RIOT/sys/luid
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/phydat
"make" -C /work/riot/RIOT/sys/preprocessor
"make" -C /work/riot/RIOT/sys/ps
"make" -C /work/riot/RIOT/sys/saul_reg
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/cmds
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/usb/usbus
"make" -C /work/riot/RIOT/sys/usb/usbus/cdc/acm
"make" -C /work/riot/RIOT/sys/usb_board_reset
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  31548	    128	   5288	  36964	   9064	/work/riot/RIOT/examples/default/bin/adafruit-clue/default.elf
stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
sleep 1
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
Zip created at /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
adafruit-nrfutil dfu serial --port=/dev/ttyACM0 --baudrate=115200 --touch=1200 --package=/work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip --singlebank
Upgrading target on /dev/ttyACM0 with DFU package /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip. Flow control is disabled, Single bank, Touch 1200
########################################
######################
Activating new firmware
Device programmed.
sleep 2
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-05-18 21:39:54,482 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-05-18 21:39:55,485 # main(): This is RIOT! (Version: 2023.07-devel-373-gd2628-pr/boards/adafruit-clue-cleanup-flash-procedure)
2023-05-18 21:39:55,485 # Welcome to RIOT!
> help
2023-05-18 21:39:57,199 # help
2023-05-18 21:39:57,199 # Command              Description
2023-05-18 21:39:57,200 # ---------------------------------------
2023-05-18 21:39:57,200 # bootloader           Reboot to bootloader
2023-05-18 21:39:57,201 # pm                   interact with layered PM subsystem
2023-05-18 21:39:57,202 # ps                   Prints information about running threads.
2023-05-18 21:39:57,202 # reboot               Reboot the node
2023-05-18 21:39:57,203 # saul                 interact with sensors and actuators using SAUL
2023-05-18 21:39:57,203 # version              Prints current RIOT_VERSION
> 2023-05-18 21:39:58,500 # Exiting Pyterm

Issues/PRs references

None

@aabadie aabadie added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 18, 2023
@github-actions github-actions bot added the Area: boards Area: Board ports label May 18, 2023
@riot-ci
Copy link

riot-ci commented May 18, 2023

Murdock results

✔️ PASSED

d2628e8 boards/adafruit-clue: use shared usb_board_reset.mk for flashing

Success Failures Total Runtime
549 0 549 02m:29s

Artifacts

@aabadie
Copy link
Contributor Author

aabadie commented May 19, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 19, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 57555ca into RIOT-OS:master May 19, 2023
@aabadie aabadie deleted the pr/boards/adafruit-clue-cleanup-flash-procedure branch May 20, 2023 12:47
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants