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

Port selection of Portenta H7 (M4 Core) is lost on every upload #43

Closed
3 tasks done
ubidefeo opened this issue Feb 25, 2021 · 2 comments · Fixed by #2165
Closed
3 tasks done

Port selection of Portenta H7 (M4 Core) is lost on every upload #43

ubidefeo opened this issue Feb 25, 2021 · 2 comments · Fixed by #2165
Assignees
Labels
conclusion: resolved Issue was resolved criticality: low Of low impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ubidefeo
Copy link

ubidefeo commented Feb 25, 2021

Describe the problem

When uploading to the M4 core of the Arduino Portenta H7 board, the port selection is lost.

🐛 It is inconvenient for the user to have to reselect the port after every upload, and may cause confusion if they didn't notice this happened.

To reproduce

Equipment

Steps

  1. Use Boards Manager to install version 3.5.4 of the "Arduino Mbed OS Portenta Boards" platform.
    Versions 4.0.2 and newer do not provide the required conditions to reproduce the fault due to arduino/ArduinoCore-mbed@29184e9
  2. Select File > New from the Arduino IDE menus.
  3. Connect a "Portenta H7" board to your computer.
  4. Select Tools > Board > Arduino Portenta H7 (M4 Core) from the Arduino IDE menus.
    image
  5. Select the port of the board from the Tools > Port menu.
  6. Select Sketch > Upload from the Arduino IDE menus.
  7. Wait for the upload to finish.
  8. Open the Tools > Port menu.

🐛 The port is no longer selected. You must select the port from the menu again after every single upload to this board.

image

Expected behavior

The port selected by the user remains selected after uploading.

Arduino IDE version

Original report

2.0.0-beta.2-snapshot.f9730ab

Last verified with

2.0.0-rc9.2.snapshot-ca47e8a

Operating system

Windows

Operating system version

10

Additional context

I suspect this is related to the behavior of the port of the native USB boards, where the USB CDC serial port disappears and reappears during the switch from the bootloader to the sketch application.

The Portenta H7 is unique in that it has two different board definitions, but only one of these ("Arduino Portenta H7 (M7 Core)") is associated with the USB VID/PID of the port:

https://github.com/arduino/ArduinoCore-mbed/blob/3.2.0/boards.txt#L104-L111

envie_m7.upload_port.0.vid=0x2341
envie_m7.upload_port.0.pid=0x025b
envie_m7.upload_port.1.vid=0x2341
envie_m7.upload_port.1.pid=0x035b
envie_m7.upload_port.2.vid=0x2341
envie_m7.upload_port.2.pid=0x045b
envie_m7.upload_port.3.vid=0x2341
envie_m7.upload_port.3.pid=0x055b

This causes the Arduino IDE's automatic board selection to lose the port selection when the selected board doesn't match the VID/PID of the port that appears at the end of the upload process.


Originally reported at: https://forum.arduino.cc/t/0-1-0-portenta-wonders-ide-released/671634/7

I am able to build these and get them both onto the board and run, but it seems in this arrangement, the IDE windows commonly wind up reporting "not connected" in the lower right status bar.
I'm completely new to this IDE so I am curious if I should have the expectation that the connection status should be live whether the target sketch is running or not..
I also noticed that the second session I opened for the M4 sketch, I had to tell it over and over which board and port to target. I got the impression that having both sketches open might be causing a fight for the link.


Another variant of this bug was reported at #82

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@ubidefeo ubidefeo added type: bug priority: low Resolution is a low priority labels Feb 25, 2021
@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 29, 2021
@rsora rsora added criticality: low Of low impact and removed priority: low Resolution is a low priority labels Nov 2, 2021
@salasidis
Copy link

I realize this is an old thread, but did you ever fix the issue.

I have a new Portenta H7, that does exactly what yours was doing.

I can uplad a sketch when putting the Portenta into Bootloader mode (two pushes on reset button).

Once the sketch is uploaded, the serial port disappears, and I cannot connect with the serial monitor as a result. The program runs though.

I have to push the reset twice again to make the port reappear to reload the sketch.

@per1234
Copy link
Contributor

per1234 commented Apr 20, 2022

@salasidis that is a different problem than what is tracked here. This issue is about the port selection in the IDE being lost, not the loss of the port itself on the board.

The former is a bug in the Arduino IDE. The latter is a bug in the firmware running on your Portenta H7, and so off topic for this repository dedicated to the Arduino IDE code base. I see you have already posted to the appropriate place on the Arduino forum and are receiving assistance there:

https://forum.arduino.cc/t/serial-com-port-issues-with-portenta-h7/982875

@per1234 per1234 linked a pull request Aug 17, 2023 that will close this issue
4 tasks
kittaakos pushed a commit that referenced this issue Aug 17, 2023
Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos added a commit that referenced this issue Aug 18, 2023
Use Arduino CLI revision `38479dc`

Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Ref: arduino/arduino-cli@38479dc

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: low Of low impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants