Go Down

Topic: Upload To Native Port (Read 5645 times) previous topic - next topic

RayLivingston

I've been using the Due for over a year, but have never been able to get the Native Port to work for upload.  What is the trick?  I'm using v1.6.5.  I select "Arduino Due (Native USB Port)" as the board.  When I attempt an upload, I get this rather perplexing output:

Quote
Compiling 'SuperATC' for 'Arduino Due (Native USB Port)'
Build folder: file:///C:/Users/RayL/AppData/Local/V.Micro/Arduino/Builds/SuperATC/arduino_due_x
Binary sketch size: 244,284 bytes (used 47% of a 524,288 byte maximum) (1.73 secs)
 
Uploading to I/O board using 'COM11'
Unable to auto-reset: COM11. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.

PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
Couldn't find Leonardo 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.
Regards,
Ray L.

bbx10node

I just tried upload via the Native port on Ubuntu Linux 14.04 and IDE 1.6.6. No trouble here.

Sketch uses 10,092 bytes (1%) of program storage space. Maximum is 524,288 bytes.
Forcing reset using 1200bps open/close on port /dev/ttyACM0
PORTS {/dev/ttyACM0, /dev/ttyS0, } / {/dev/ttyS0, } => {}
PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}
PORTS {/dev/ttyS0, } / {/dev/ttyACM0, /dev/ttyS0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0
/home/me/.arduino15/packages/arduino/tools/bossac/1.6.1-arduino/bossac -i -d --port=ttyACM0 -U true -e -w -v -b /tmp/build100cd442213b82cc4265ca32481a5c7e.tmp/Blink.ino.bin -R
Set binary mode
readWord(addr=0)=0x20001000
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0
readWord(addr=0x400e0940)=0x285e0a60
version()=v1.1 Dec 15 2010 19:25:04
chipId=0x285e0a60
Connected at 921600 baud
readWord(addr=0)=0x20001000
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0
readWord(addr=0x400e0940)=0x285e0a60
Atmel SMART device 0x285e0a60 found
write(addr=0x20001000,size=0x34)
writeWord(addr=0x20001030,value=0x40)
writeWord(addr=0x20001020,value=0x20010000)
writeWord(addr=0x400e0a00,value=0x600)
writeWord(addr=0x400e0c00,value=0x600)
Device       : ATSAM3X8
readWord(addr=0)=0x20001000
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0
readWord(addr=0x400e0940)=0x285e0a60
Chip ID      : 285e0a60
version()=v1.1 Dec 15 2010 19:25:04
Version      : v1.1 Dec 15 2010 19:25:04
Address      : 524288
Pages        : 2048
Page Size    : 256 bytes
Total Size   : 512KB
Planes       : 2
Lock Regions : 32
Locked       : readWord(addr=0x400e0a08)=0x1
readWord(addr=0x400e0c08)=0x1
writeWord(addr=0x400e0a04,value=0x5a00000a)
readWord(addr=0x400e0a08)=0x1
readWord(addr=0x400e0c08)=0x1
readWord(addr=0x400e0a0c)=0
readWord(addr=0x400e0a08)=0x1
readWord(addr=0x400e0c08)=0x1
writeWord(addr=0x400e0a04,value=0x5a00000a)
readWord(addr=0x400e0a08)=0x1
readWord(addr=0x400e0c08)=0x1
readWord(addr=0x400e0a0c)=0
readWord(addr=0x400e0a08)=0x1
readWord(addr=0x400e0c08)=0x1
writeWord(addr=0x400e0a04,value=0x5a00000a)

digimorf

I am under Windows and I can easily program the Due board from the native USB.

You can do this test, go to the Control panel/device manager, and plug the Arduino Due through the native port. Two situations can happen:

- The PC sees a "Bossa Programming port"

 This is the case that the boot loader in the SAM chip let the user to program the chip from the native port. This is allowed only after the FLASH has been erased manually by pushing the"Erase" button.



- The PC sees an "Arduino Due" device with its own COM port.

 This is the case that there is a firmware running in the SAM chip. You can't program now the chip from this port unless you erase the FLASH memory manually again.



After you erase the chip, you should reset also the board, so that the PC unplugs the USB device and plugs the new one. This works for me.

NOTE: if you use the Serial library you have to use the programming port USB, not the Native.

RayLivingston

I am under Windows and I can easily program the Due board from the native USB.

You can do this test, go to the Control panel/device manager, and plug the Arduino Due through the native port. Two situations can happen:

- The PC sees a "Bossa Programming port"

 This is the case that the boot loader in the SAM chip let the user to program the chip from the native port. This is allowed only after the FLASH has been erased manually by pushing the"Erase" button.



- The PC sees an "Arduino Due" device with its own COM port.

 This is the case that there is a firmware running in the SAM chip. You can't program now the chip from this port unless you erase the FLASH memory manually again.



After you erase the chip, you should reset also the board, so that the PC unplugs the USB device and plugs the new one. This works for me.

NOTE: if you use the Serial library you have to use the programming port USB, not the Native.
You bring up several things I've never heard or read before!  I've always been baffled at how the Native port enumerates two different ways, and never understood what controlled which way it came up.  But, my experience does not seem to completely agree with what you've said.  I find I CAN sometimes program using the Native port, even though I have never once pressed the erase button.  I also find the programming speed varies.  Sometimes, it is no faster than using the Programming Port, while other times, it is about 10X faster than the Programming Port. 

So, I am still confused....  I would like the Native Port to be the means by which my customers re-FLASH the board, but WITHOUT having to physically access the board, as it is not easily accessible.  Is there a way to programmatically erase the FLASH, so the "Bossa" Native port is enabled?

Regards,
Ray L.

digimorf

I am using the Arduino IDE, and I can program from the native port only f the chip s erased. I will do more test because I also am interested in the use of the native port.

ghlawrence2000

It sounds to me that between you, you have some dodgy Due boards.

I have 2 clones, one which behaves itself 'properly', the other I need to press the reset button 'at the critical moment'.

Ray, in a correctly functioning DUE, the native Bossac port is kicked into action by opening serial port with speed of 1200baud. Furthermore, a correctly functioning Due Native port can be programmed from the IDE without the need to erase.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

RayLivingston

It sounds to me that between you, you have some dodgy Due boards.

I have 2 clones, one which behaves itself 'properly', the other I need to press the reset button 'at the critical moment'.

Ray, in a correctly functioning DUE, the native Bossac port is kicked into action by opening serial port with speed of 1200baud. Furthermore, a correctly functioning Due Native port can be programmed from the IDE without the need to erase.

Regards,

Graham
Well...  then I have a butt-load of bad boards, because I've seen the same problems on every one of the dozen or more I've tried, and they came from multiple sources.  They function perfectly otherwise.

So is it normal for the port to come up with one COM number at some times, and a different COM number at other times?  If I so something like a "mode COMn BAUD=1200" in cmd.exe force it to enumerate the "bossac" port?

Regards,
Ray L.

ghlawrence2000

Hi Ray,

Under normal use, it should enumerate as 'Arduino Due' in programming mode will be 'Bossa program  Port' each will have its own COM number. Some clone (and early genuine?) Dues have a slow reset issue which means they power up in Bossa program port mode, various fixes exist to deal with this. https://forum.arduino.cc/index.php?topic=256771.0.

Yes
Code: [Select]
mode comx baud=1200 Does initiate bossa port.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

RayLivingston

Hi Ray,

Under normal use, it should enumerate as 'Arduino Due' in programming mode will be 'Bossa program  Port' each will have its own COM number. Some clone (and early genuine?) Dues have a slow reset issue which means they power up in Bossa program port mode, various fixes exist to deal with this. https://forum.arduino.cc/index.php?topic=256771.0.

Regards,

Graham
That is very interesting.  I'm going to give that a try!  Thanks!

Regards,
Ray L.

RayLivingston

Unfortunately, all the boards I have are R3-E, so should, in theory, have the updated reset logic.  In any case, they do not match the photos in that other thread, and do already have a 10K resistor from Reset to Ground.

Regards,
Ray L.

ghlawrence2000

That's a little disappointing. Have you tried going into device manager to see how they power up? Are they coming up as bossa programming port or arduino due?

This might at least give a clue to where else to try looking for a solution.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

RayLivingston

That's a little disappointing. Have you tried going into device manager to see how they power up? Are they coming up as bossa programming port or arduino due?

This might at least give a clue to where else to try looking for a solution.

Regards,

Graham
They come up as either a "Bossa Programming Port" or "Arduino Due Native Port" at different times.  I've found no rhyme or reason as to when or why it does either.  It just appears random, hence my confusions and frustration.  I've actually started using Telnet instead, as it seems more predictable (though not without its own, completely different, peculiarities...).  I'd love the get the Native port working reliably, if only for programming, as it is so much faster.

Regards,
Ray L.

Saumil

Bringing up the topic again..

Myi have designed a custom ATSAM3x8E baord.

On Powering, The baord shows up in device manager as BOSSA PROGRAMMING PORT only after pressing both RESET  & ERASE Button and removing the RESET button first.

Then I go to Arduino IDE, upload my program, all well. but hey!! now the program doesn't works.

I checked it out with a ready made Arduino Due. Found out that in this case the BOSSA PROGRAMMING PORT in device manager resets to ARDUINO DUE NATIVe PORT upon upload of codel

This behaviour does no thappen with mine custom ATSAM3x8E board. I think this is the reason my firmware never works( even LED blinking or Serial USB)

Please HELP !!!!





Go Up