Pages: [1]   Go Down
Author Topic: No device found on COM5 with Bossac on Winwdows 7  (Read 3397 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
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.
Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 12
Posts: 430
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh sorry !

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

Code:
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:
Send auto-baud
Set binary mode
No device found on COM5

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

Nassa.

Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 12
Posts: 430
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
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.
Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 12
Posts: 430
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Here's a script for Windows to send erase flash request and upload program :
Code:
@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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Nassa.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Not necessary to set your com port with this sript :

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

Nassa.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: