Go Down

Topic: program upload issues (Read 1 time) previous topic - next topic

spencoid

i have a stack of shields on top of the DUE and can not get to the erase button. i have not quite figured out the mysterious combination of button presses that reliably allows uploading a new program. previously i would press the erase button and then reset and it worked reliably. since i can not get to the erase button now, i can some times succeed with various combinations of short and long presses of the reset button alone. i have not yet discovered exactly how long to wait and how many times to press etc.

if the program does not load successfully, the error message is that the com port is not found. then i do some random reset button pressing and it usually works the next time.

if the IDE were to check for the com port before compiling the code, this would save a lot of time. the way it is now, i have to wait for the successful compilation each time only to be told the com port is not there. is there some way to attempt to load the program without re-compiling each time? if not, i highly recommend that the IDE be modified to allow this or to check the com port first before compiling a program that can't be loaded.

or, is the best solution to bring out the erase button? unfortunately it does not seem to be on any pins that carry through to the shields so i would have to solder on a new button and let it dangle somewhere. it would certainly be nice if the button were more accessible or brought out on some pins or if erase was done by firmware when loading a program as part of the load sequence.

any ideas on how to make this work better?

shteii01

The COM port is shown in the bottom right corner of the IDE window.

You can select the COM port in the Tool drop down menu of the IDE.

You can see which COM port your computer is using to talk to Due in the Windows Device Manager.

spencoid

actually, it shows the last connection. there is no guarantee that the DUE will connect if the right sequence of buttons is not pressed. it is not a problem of not having the right port selected. it is a problem with getting the DUE to be recognized without an impossible or difficult to reproduce sequence of button presses.

this really should not have to be difficult. the teensy is the most friendly in this regard. there is a single button to press that loads the last compiled program. a single button, is all it takes.

i am going to bring the erase button out of the board so i don't have to deal with this but it really is something that could be handled better in both the bootloader firmware and the IDE.

spencoid

the only explanation i can find about programming the DUE from the Arduino IDE is the following. it clearly says that the 16U2 is supposed to do whatever is needed to insure programming. what exactly is meant by "Opening and closing the Programming port connected at 1200bps" ? where do you set the programming speed, in the serial monitor speed selection or is it always at 1200 bps? what is meant by opening and closing? do you have to de-select the port and re-select it or is there some other secret? unplug and replug?

i don't understand why something so basic is so badly documented.

Programming port: To use this port, select "Arduino Due (Programming Port)" as your board in the Arduino IDE. Connect the Due's programming port (the one closest to the DC power jack) to your computer. The programming port uses the 16U2 as a USB-to-serial chip connected to the first UART of the SAM3X (RX0 and TX0). The 16U2 has two pins connected to the Reset and Erase pins of the SAM3X. Opening and closing the Programming port connected at 1200bps triggers a "hard erase" procedure of the SAM3X chip, activating the Erase and Reset pins on the SAM3X before communicating with the UART. This is the recommended port for programming the Due. It is more reliable than the "soft erase" that occurs on the Native port, and it should work even if the main MCU has crashed.

chriskner

Quote
the only explanation i can find about programming the DUE from the Arduino IDE is the following. it clearly says that the 16U2 is supposed to do whatever is needed to insure programming...
Programming port: To use this port, select "Arduino Due (Programming Port)" as your board in the Arduino IDE. Connect the Due's programming port (the one closest to the DC power jack) to your computer.


This is all the direction that I've ever needed.  I suggest that you take a good look at your USB connection, and maybe the DUE pcb itself, to look for hardware issues.

I have had no issues uploading new code.

I have never had to press any button on the DUE to get things going...  Matter of fact, I've never used either of the two buttons on the pcb.

I find that it is easier to have the DUE USB plugged in before you start the IDE.

Are you sure that your connecting the USB cable to the programming jack right next to the DC power input?


-Chris

Go Up