I have the trouble of the USB serial port with Arduboy.
The serial port disappears when the transfer is started.
Please let me know how to recover that.
(1) Turn on Arduboy
(2) Push the reset button of Arduboy
(3) (The serial port can be found at the time)
(4) (Red and orange LED turn on)
(5) Open Arduino IDE and read the sketch “Helloworld”.
(6) Push send button of IDE
(7) (When IDE start transfer, the serial port disappears immediately.)
(8) (After that, the green and yellow LED flash randomly.)
Here is the video:
A note on the serial port, it will always disappear after the unit resets. As the unit turns off to prepare for the upload, and then back on, the operating system must repoll and reassign the port.
You have to time things exactly when you use the reset button. You only have about 8 seconds. Make sure you load the sketch into the IDE and compile it using the verify button before pressing reset and starting the upload.
It may also help if you use a small sketch to try to recover, such as the HelloWorld example from: File > Examples > Arduboy > HelloWorld
Yes I always use the reset button because the serial port can be no longer recognized without the reset button at first.
I tried many times and I tried any timing between pushing unit reset and pushing IDE send button, Immediately or 0.5–6 sec.
I push the reset button too much so that the reset button was broken today:)
On IDE, does pushing the transfer button after pushing the compile button makes transfer without compile?
It looks always compile occurs before transfer when I see detail console output.
(1) pushing compile button
(2) (compile is done)
(3) pushing transfer button
(4) (somehow compile starts again)
(5) (transfer begins after that)
The upload or transfer button will always recompile the code I believe, it does this to build the final binary (.hex) file before it is uploaded to the unit.
The operating system does not need the Arduboy to show up in the device manager as a com port for the unit to work with the IDE. I think Windows 10 is most notorious for this behavior.
So even if the com port doesn’t show up in the device manager, you should still be able to use the Arduino IDE to upload a sketch.
Also, if your unit is bricked, you will only need to press the reset button one time to upload a new sketch and fix the unit. After using the reset button successfully once, the unit should work as normal, and you shouldn’t have to press the reset button again.
What happens when you upload a sketch that is too large is the unit will look for the instructions to start operating at a specific address, and a sketch that is too large will put something else in that usual location, causing the unit to no longer function until a correctly sized sketch is used.
I think the libraries are only compiled once if they haven’t changed and you haven’t changed board types. If it’s not the libraries, then it’s something else, resulting in the second (third, etc…) verify or upload compile process being shorter.
You can see this for yourself:
Select from the menus: File > Preferences
I the Settings tab, set the check box for Show verbose output during: compilation
Click on the OK button at the bottom right to save the preferences.
Shut down the IDE and then restart it.
Load a small sketch into the IDE, such as: File > Examples > Arduboy > HelloWorld
Click on the Verify button and note the amount of output during the compile. You can expand the output box by clicking and dragging its top border upwards.
Click on the Verify button again (or the Upload button if you want to upload the sketch).
Note that there will be less output, and the build time will be shorter, the second time .
If you’re ambitious, figure out what steps weren’t performed the second time .
I wonder if the bootloader may have been corrupted? I don’t know if it’s been confirmed whether the factory failed to set the bootloader lock bits properly.
It is likely the bootloader has been corrupted, users of a earlier version of Platformio uploaded a sketch that was too large for the device and they had to use another arduino hooked up to the programming pins to revive it.
Oh I think it works as an open issue better than a development technique. Any given developer could run into this problem if they try some wild style programming.
What I propose is: when we have created a topic/reply that is a series of steps a user can follow in the case they need to rewrite the bootloader we publish the steps as a guide and close this issue by linking to that guide.
YEP !! it is all about the right timing to find for yourself to get the bricked arduboy back to “life” again… maybe painful for the newbies BUT this is how we learn new things
The only way to fix a corrupted bootloader is to burn it again using a programmer attached to the MOSI, MISO, SCK and RESET lines. (Actually you can also use a parallel programmer, but that’s even more complicated.)
You can’t do it through the USB port, so I’d say no, there’s no easy way for the “not-so-technical-guys” to do it.
The fact is, it’s very difficult to corrupt the bootloader if the proper lock fuses have been set after its been burned. However, as has already been mentioned earlier, it seems like there’s a possibility that the lock fuses weren’t set properly on the Kickstarter Arduboys (yet to be confirmed).
PS: You also need a programmer to set the lock fuses.