Download - Studio 7 ---> Arduino Due

Hi,
I've just migrated to Studio 7 and followed these two guides just to get A project running in Studio 7. I've used S7 for Uno development so didn't foresee any problems.

It builds fine but then spits out:

Send auto-baud
Set binary mode
No device found on COM3

My External Command for this is:

Command: C:\Users\seand\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino\bossac.exe

Arguments: -i -d --port=COM3 -U false -e -w -b $C:\Users\seand\Desktop\VIMH\VIMH$test.bin

I have looked and looked again before posting because I don't want to waste anyone's time. In truth, I have several thousands lines of C++ to convert into optimized Thumb for the Uno but to run it fast enough to replace each function with optimized assembly language, I need a bit more power. It's a sound app so it's also convenient that the Due has a DAC built in. I'm all but useless doing anything but optimizing assembly language so forgive my clunky explainations.

Sean

Did you try to push the Erase button for a few seconds before tying to upload a new sketch with bossac.exe ?

Aha

I built & downloaded Blink in the Arduino Editor and it worked fine. i changed the delay and repeated and it worked fine. I checked the Device Manager and it correctly identified the item on the USB. I opened the serial port monitor.

I then opened the serial monitor and tried to download the Studio 7 project. Rebuilt fine and then on attempt to download, no serial data and the error 'No device found on COM3'

Altered Blink & downloaded it fine.

I then closed the Arduino Editor and attempted to download from Studio 7 again. Slightly different error:

Set binary mode
Send auto-baud
Set binary mode
No device found on COM3

I've been holding down the button on the Due for 5 seconds every attempt.

Are their other options (to Atmel EDGB) as bootloader?

I have sat on this for 4 hours. I didn't want to make some really dumb mistake and waste your time. Any thoughts?

Many thanks,
Sean

Once you have built successfully your project on Studio 7, there is somewhere a .bin file.

To upload directly a .bin file, let’s say image.bin, stepwise (at least on a Windows 7 PC):

1/ Connect your DUE to the PC via the Programming Port

2/ Push the Erase button for 3 seconds

3/ After a cmd command on the PC, write after C:\Users…>

AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino\bossac -U true -e -w -u -b -R image.bin

Of course adapt image.bin from its actual location on your PC.

If you receive an “Auto scan for device failed”, unplug/plug the USB cable several times and try again.

Depending on the board you have, you may have to push the Reset button after the uploading process to make the code run.

Note: This process works too from the Native USB port (and much faster)

Hi,
No change, sad to say. I’ve noted that if you give it a non-existent .bin then it doesn’t find that error. Lack of any argument specifying a file DOES bring up a ‘missing argument’ error. I tried not specifying COM3 and then I get a slightly different error:

Trying to connect on COM3
Set binary mode
Send auto-baud
Set binary mode
Auto scan for device failed
Try specifying a serial port with the ‘-p’ option

Searching for other Due download problems, the question of which version of bossac and if the firmware needs to be updated both pop up frequently. As I have said, the Arduino Editor has no problem communicating and I have tried your suggested arguments and pressing & holding the button each time but to no avail.

Without being prompted, it decided on COM3 which is interesting.

I checked and found that I have the version from 1.6.1 (in use) and the version from 1.7.0. I tried both, no difference.

I’m using Windows 10, is their any OS issues and/or a preferred version of bossac for this setup? Is their an alternative to bossac?

As I have mentioned, It works fine on my Uno M0 Pros?

With -U true you don't have to specify the COM port, there is an automatic scan to find the available COM Port.

Did you try to upload your sketch thru the Native USB Port instead of the Programming Port, with the same process I provided in reply #3 ?

Hi,
Well, I get a different error but it's certainly narrowing things down:

Trying to connect on COM8
Set binary mode
Send auto-baud
Set binary mode
Auto scan for device failed
Try specifying a serial port with the '-p' option

I pushed/held buttons as you said.

So it appears to find the COM port but seems unable to connect. There is nothing weird running in the BG not any weird hardware - it's a stock tower PC; a £600 one. Neither chuggy nor super fast.

Have you got a reference to all the bossac arguments? I just wondered if any of them would be of value narrowing in on the problem.

Did you try to connect your board thru the Native USB port ?

For more explanations about bossac arguments:

After a cmd command on the PC, write after C:\Users…>

AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino\bossac -h

By native do you mean the other micro-USB port? Not the programming one - the one the Due itself can use? If so, yes, that's when I got the error I mentioned.

Trying to connect on COM8
Set binary mode
Send auto-baud
Set binary mode
Auto scan for device failed
Try specifying a serial port with the '-p' option

I've tried more than 1 USB port on my pc as well.

I note that the blink program that is running carries on running. That's why I wondered if I needed to reflash the thing or something. Other devkits I've used need the executing program to stop before downloads are possible but this isn't mentioned in the Arduino docs.

Sorry to be such I trouble but I am spending many hours tinkering; trying to find what is happening. I know the board is working because downloading sketches from the Arduino Editor work; sadly I can't use that due to it's limitations... but could it be used to download & debug?

I've also ensured my version of Windows 10 is up to date and checked that nothing else is playing with the USB ports.

**For informational purposes only **

I note that in Arduino Studio 1.8.8 that the bootloader is Atmel EDBG. It's recognizing the COM3 as the native port as the one closer to the power adaptor. I have placed all of the output from Adruino Studio when it compiles, links, downloads & runs the Blink sketch onto Pastebin.

It IS very slow.

Aha - the port further away from the power supply COM8 won't download from Arduino Studio. Is this normal? It is at least detecting 2 different COM ports and the instructions say use the port closer to the power adaptor AFAIK.

'Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.'

Ah... the thing at the bottom right of AS says 'native' when plugged into either port but in tools it correctly recognizes it.

I've tried Bossac 1.6.3, 1.6.8 & 1.7.0

One thing I'm not quite clear on is that the button is described as 'erase' in some places but after pushing & holding, the blink program is still running.

Te link is to the very guide I initially used but thank you for your efforts.