Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Not able to flash binary on samr21-xpro boards choosing serial number #19805

Closed
LizzieDE110 opened this issue Jul 6, 2023 · 2 comments · Fixed by #19823
Closed

Not able to flash binary on samr21-xpro boards choosing serial number #19805

LizzieDE110 opened this issue Jul 6, 2023 · 2 comments · Fixed by #19823
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@LizzieDE110
Copy link

Description

Not able to flash binary on samr21-xpro boards choosing serial number.

Steps to reproduce the issue

I am trying to work with 2 samr21-xpro boards, however, I can't flash binary on the board I want when I am choosing a Serial number.

Below, commands I have executed :

git clone https://github.com/RIOT-OS/RIOT.git
cd RIOT/
git checkout 2023.04-branch
make list-ttys 

This last command shows the 2 boards I use with their Serial number.
To show you the bug, I used the hello-world example :

cd examples/hello-world
make flash term BOARD=samr21-xpro SERIAL=ATML2127031800003035 

It respond :

/home/dev/RIOT/dist/tools/usb-serial/find-tty.sh: ligne 10: ./ttys.py: Aucun fichier ou dossier de ce type
/home/dev/RIOT/makefiles/boards/sam0.inc.mk:11: *** Did not find a device with serial ATML2127031800003035. Arrêt.

However, without Serial parameter, RIOT works as expected :

make flash term BOARD=samr21-xpro

Expected results

I can choose which board I would like to flash using serial number.

Actual results

When I try to specify serial number, it respond :

/home/dev/RIOT/dist/tools/usb-serial/find-tty.sh: ligne 10: ./ttys.py: Aucun fichier ou dossier de ce type
/home/dev/RIOT/makefiles/boards/sam0.inc.mk:11: *** Did not find a device with serial ATML2127031800003035. Arrêt.

Versions

OS : Ubuntu 22.04.2 LST
Build environment :
- native gcc: gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
- arm-none-eabi-gcc: arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)

@LizzieDE110 LizzieDE110 changed the title Not able to compile RIOT on samr21-xpro boards choosing serial number Not able to flash binary on samr21-xpro boards choosing serial number Jul 6, 2023
@dylad
Copy link
Member

dylad commented Jul 11, 2023

Hello @LizzieDE110, thanks for your report. I can confirm the issue on my side.
I'll provide a fix during the week.

@dylad dylad added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jul 11, 2023
@dylad
Copy link
Member

dylad commented Jul 11, 2023

@LizzieDE110 Note that you can use DEBUG_ADAPTER_ID instead of SERIAL.
SERIALseems to exist only for backwards compatibility nowadays so if you're fine with switching to DEBUG_ADAPTER_ID this would solve your issue.

@bors bors bot closed this as completed in b482a71 Jul 13, 2023
bors bot added a commit that referenced this issue Jul 14, 2023
19831: dist/tools/usb-serial: call ttys.py with its path [backport 2023.07] r=benpicco a=maribu

# Backport of #19823

### Contribution description
This PR provides a fix for #19805
When calling `SERIAL=xxx make flash` the command failed because the script `dist/tools/usb-serial/find-ttys.sh` tries to call `ttys.py` but it doesn't find it. So pass the full path to `ttys.py` to get rid of the problem.

### Testing procedure
Connect at least two boards to your computer
run `make list-ttys ` to get the ID of your boards
Try to flash one of them with (replace SERIAL with the one you get with the previous command):
`BOARD=xxx SERIAL=xxx make -C tests/leds flash`
It fails on master.
It should works with this PR.

### Issues/PRs references

Fixes #19805


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants