The following 2 commands will help you upload a .bin file from command line using the programming port
mode com7:1200,n,8,1
bossac.exe --port=COM7 -U false -e -w -v -b Blink.cpp.bin -R
On win7 the solution, that made it work for me, was to add ",p" to the end of the mode line ie. (using com6) :
mode com6:1200,n,8,1,p instead of just mode com6:1200,n,8,1
Now mode com outputs the following :
Status for device COM6:
Baud: 1200
Parity: None
Data Bits: 8
Stop Bits: 1
Timeout: ON
XON/XOFF: OFF
CTS handshaking: ON
DSR handshaking: ON
DSR sensitivity: OFF
DTR circuit: HANDSHAKE
RTS circuit: HANDSHAKE
Instead of :
Status for device COM6:
Baud: 1200
Parity: None
Data Bits: 8
Stop Bits: 1
Timeout: ON
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: ON
RTS circuit: ON
And bossac is uploading w.o. any pressing of the Erase button.