HI all,
I have a question about the Arduino USBCORE.CPP, Why the USBCORE.CPP overwrites my bootloader descriptor (Serial number product name and Vednor)
I am using caterina bootloader
And how can I make it use the bootloader descriptor
thanks
HI all,
I have a question about the Arduino USBCORE.CPP, Why the USBCORE.CPP overwrites my bootloader descriptor (Serial number product name and Vednor)
I am using caterina bootloader
And how can I make it use the bootloader descriptor
thanks
The bootloader only runs for a short time after reset. Are you sure you're looking at the serial number and vendor while the bootloader is running?
HUh what?
I think You missing the point,
All what I am asking is
The USBCore.cpp that is used when burning the Sketch to the board, overwrites my bootloader SN, VID, PID
I don't like that and I don't want this to happened .
My bootloader shows the right serial number and VID AND PID until the sketch start running
then it gets overwritten
bemin:
HUh what?I think You missing the point,
All what I am asking isThe USBCore.cpp that is used when burning the Sketch to the board, overwrites my bootloader SN, VID, PID
I don't like that and I don't want this to happened .My bootloader shows the right serial number and VID AND PID until the sketch start running
then it gets overwritten
Please share your hardware profile.
No, I got the point exactly. As you've discovered, the bootloader has a VID/PID and the sketch has VID/PID and the two are unrelated. That's just how it works. The board wouldn't be much good if the bootloader was running all the time, now would it? If you don't like the sketch VID/PID, then you just need to change it!
pert:
If you don't like the sketch VID/PID, then you just need to change it!
that is what I am trying to do, to change it but not manually programmatically.
In another words ,I am trying to find a way so the USBCore.cpp uses the same VID and PID as the sketch.
Goes and read the vid and the pid of the bootloader and then update itself.
Perehama:
Please share your hardware profile.
It is arduino MICRO board
bemin:
It is arduino MICRO board
Yet, you are using a different bootloader and wanting do do different things with it, so perhaps you want to create a custom hardware profile for it.
I figured it out
I added an If statment in the usbcore.cpp
fixed the problem