Go Down

Topic: No device found on COM5 with Bossac on Winwdows 7 (Read 5210 times) previous topic - next topic

Nassarane

Hi all !

I tried to upload a program in my Arduino Due with Bossac, but it does not work.

My command line is as follows:
Code: [Select]
C:\ARM\arduino-1.5.1r2\hardware\tools\bossac.exe -port=COM5 -U false -e -w -v -b C:\Users\Me\AppData\Local\Temp\build8940831537078293554.tmp\Blink.cpp.bin -R

Bossac displays the following message:
Code: [Select]
No device found on COM5

However, whenever I run the command line, the TX LED blink for about one second.

I work under Windows 7 and I use bossac.exe provided with Arduino Due IDE.

When I use the Arduino IDE Due, on COM5 there is no problem. But the command line I get the message "No device found on COM5".

I do not understand what happens !

I uplaod successful program only 2 times only with the command line.

Thank you for your help.

Nassa.

Palliser

Hello Nassarane. Try
Code: [Select]
--port=COM5 instead of
Code: [Select]
-port=COM5. It could be a syntax issue.

Nassarane

Oh sorry !

I made ??a mistake in this post.
In fact my command line is:

Code: [Select]
C:\ARM\arduino-1.5.1r2\hardware\tools\bossac.exe --port=COM5 -U false -e -w -v -b C:\Users\Me\AppData\Local\Temp\build8940831537078293554.tmp\Blink.cpp.bin -R

I try to add 2 options -d et the messages displayed are :
Code: [Select]
Send auto-baud
Set binary mode
No device found on COM5


I don't understand why this command line doesn't work...

Nassa.


Palliser

Next thing I would recommend is to do the following: With the board powered, press the erase button and after a second, press also the reset button. Keep them pressed for another second. Then power cycle the board and try again the bossac. Good luck!

Nassarane

Palliser, thanks very much for your help !

I erased and reset your my board and I relaunch my commad line.
The messages displayed are :
Code: [Select]
Erase flash
Write 9748 bytes to flash
[==============================] 100% (39/39 pages)
Verify 9748 bytes of flash
[==============================] 100% (39/39 pages)
Verify successful
Set boot flash true
CPU reset.


The program uploaded is running correctly ! Yes !

But if I try to relaunch my command line, It doesn't work !!!
I must erase and reset my board before upload my program...

But, I don't understand why the message displayed is different of Arduino IDE:
Code: [Select]
Erase flash
Write 9748 bytes to flash

[                              ] 0% (0/39 pages)
[=======                       ] 25% (10/39 pages)
[===============               ] 51% (20/39 pages)
[=======================       ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify 9748 bytes of flash

[                              ] 0% (0/39 pages)
[=======                       ] 25% (10/39 pages)
[===============               ] 51% (20/39 pages)
[=======================       ] 76% (30/39 pages)
[==============================] 100% (39/39 pages)
Verify successful
Set boot flash true
CPU reset.


And why I must erase and reset my board each time I want to upload a program ?

Thanks.

Nassa.

Palliser

I learned from this forum that it is mandatory to have the memory erased to make the Bossac bootloader run. In the case of the Arduino, the Due executes a soft erase command when the IDE opens and closes the COM port. May be someone here have grasp more details on this matter.

Nassarane

Thanks very much Palliser,

I found the interesting information on the Arduino Due web page :

http://arduino.cc/en/Main/ArduinoBoardDue

Quote
+ 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.


Thanks.

Nassa.


jangofei

In my experience, We should use Native USB on Deu to upload sketch into Due on Windows 7&8. Also, need to press the erase button for a few seconds before uploading.

Nassarane

Hi,

Here's a script for Windows to send erase flash request and upload program :
Code: [Select]
@mode com5:1200,n,8,1
@sleep 1
@C:\arduino-1.5.1r2\hardware\tools\bossac.exe %*


Copy this MS-DOS script in the "upload.bat" file and replace bossac.exe by upload.bat in your Eclipse External Tools.
(Here, it is the com5 is used, change the value and the bossac path if necessary)

Nassa.

Nassarane


Oops : you can use this simplified command line :
Code: [Select]
@mode com5:1200
@sleep 1
@C:\arduino-1.5.1r2\hardware\tools\bossac.exe %*


Nassa.

Nassarane


Not necessary to set your com port with this sript :

Code: [Select]
@mode %2:1200
@sleep 1
@C:\arduino-1.5.1r2\hardware\tools\bossac.exe %*


Nassa.

digidot

This problem disappeared for me when I removed DC power to the DUE and let the board be powered only by the USB port.

I originally connected power to the Due as well as plugging in the USB port.

Go Up