Skip to content

Uploading the sketch to another board then expected #1885

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

Closed
3 tasks done
VincentR1 opened this issue Sep 20, 2022 · 6 comments
Closed
3 tasks done

Uploading the sketch to another board then expected #1885

VincentR1 opened this issue Sep 20, 2022 · 6 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@VincentR1
Copy link

Describe the problem

The sketch is uploaded to the wrong board on dieffrent port then specifyed

To reproduce

I have 2 simulare boards
the first on port /dev/ttyACM1
the second one is on port /dev/ttyACM2

I tryed to upload my sketch to the 2. board using: arduino-cli upload -p /dev/ttyACM2 -b Infineon:arm:XMC1100_XMC2GO
It's run succesfully but the sketch gets uploaded to the 1. board, the 2. board, i targeted, is uneffected

Expected behavior

the second board should be updated

Arduino CLI version

nightly-20220920

Operating system

Linux

Operating system version

debian bullseye

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@VincentR1 VincentR1 added the type: imperfection Perceived defect in any part of project label Sep 20, 2022
@VincentR1 VincentR1 changed the title Port on uploding Uploading the sketch to another board then expected Sep 20, 2022
@cmaglie
Copy link
Member

cmaglie commented Sep 21, 2022

Could you provide a copy of the verbose output of the upload (with the -v flag)?
Do you know if the same setup working as expected with Arduino IDE 1.8.x?

@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Sep 21, 2022
@VincentR1
Copy link
Author

I tried it with the ide 1.8.19.
It updated the sensor on on the first port regardless wich port i choosed in "Tools->Ports"

@VincentR1
Copy link
Author

java -jar "/home/v/.arduino15/packages/Infineon/tools/XMCFlasher/1.2.1/XMCFlasher.jar" -p "/tmp/arduino-sketch-47D7AF5586EB509566B17F69DFB282A0/HallSensor.ino.hex"  -device "XMC1100-0064"
--------------------------
Infineon XMC Flasher Lite
Copyright Infineon Technologies 2017
--------------------------
Linux
Operating System: Linux

Initialisation
--------------------------
Linux
Loading JLink Library... 
JLink Library Version: V7.66b

Configuring Device
Device Name : XMC1100-0064
Interface   : SWD
Speed       : 4000
File Upload
--------------------------
Uploading /tmp/arduino-sketch-47D7AF5586EB509566B17F69DFB282A0/HallSensor.ino.hex
... Done
--------------------------
... Finished Succesfully

@cmaglie
Copy link
Member

cmaglie commented Sep 28, 2022

In your board's platform, the serial port is not used to select the upload target (I guess they use it only for the serial monitor), you can see it because the port is not used at all in the command line:

java -jar "/home/v/.arduino15/packages/Infineon/tools/XMCFlasher/1.2.1/XMCFlasher.jar" -p "/tmp/arduino-sketch-47D7AF5586EB509566B17F69DFB282A0/HallSensor.ino.hex"  -device "XMC1100-0064"

It seems that they are using the SWD protocol to upload that "autodetect" the board to upload to. In this case, it is just uploading to the first available board.
I don't think there is much we can do from the Arduino-CLI side.

@per1234
Copy link
Contributor

per1234 commented Sep 28, 2022

We are tracking the request for a capability to specify which board to target under these conditions here: #770

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2022
@per1234 per1234 self-assigned this Sep 28, 2022
@per1234 per1234 added conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself and removed status: waiting for information More information must be provided before work can proceed labels Sep 28, 2022
@per1234
Copy link
Contributor

per1234 commented Sep 28, 2022

Actually, thinking about it more, this is already available for uploads (but not for burn-bootloader as requested at #770):

https://arduino.github.io/arduino-cli/dev/platform-specification/#user-provided-fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants