Go Down

Topic: flashing DUE with the help of bossac (Read 2526 times) previous topic - next topic


Hey guys,
I see flashing the Arduino Due works with bossac, what is a great tool. So I want to flash the DUE only with this tool(without Arduino IDE, because for bigger projects this is not (I'm afraid to say this) the best way to work. So I call the programm bossac on the shell with the option to read from the arduino. I think it should work so, but it doesn't. There is always the exception: "Auto scan for device faliure"... So I want to give the port manually ( bossac -r0x10000 --port=/dev/ttyUSB3(I take this port from the arduino IDE) image.bin). Then I work with superuser rights, it also doesn't work

So my question is:
How do the Arduino IDE call bossac to flash the DUE(I use Linux)? Does it already use bossac?
Or can anyone tell me where the code in java, which calls bossac, is?

Thanks for your help


OK found it. If anybody have the same problem,
I've wrote a very simple programm, to get all the overgiven parameters, so: now it works... Oh my god, it's to early in the morning. So if you want to know what bossac gets:
1) Write a simple C-programm callec "bossac": The Code is also very simple:
Code: [Select]
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
    while(argc--) {
        printf("%s\n ", *argv++);
  return 0;

2) go to -> arduino->hardware->tools
3) rename the programm "bossac" to "~bossac"
4) copy the executable from your programm(also must be called bossac) to this folder your rename the other programm
5) start the arduino-IDE from the shell and write any code to the DUE( real flashing must not work!!)
6)in the shell you see the parameters given to bossac from the Arduino IDE...


on windows with due native usb:

bossac.exe -i -d --port=COM20 -U true -e -w -v -R -b test.ino.bin


This is also found in the platform.txt file (if you can find it). On my install, it is in
C:\Program Files (x86)\Arduino\portable\packages\arduino\hardware\sam\1.6.4

The lines are at the end of the file, and look like this:
Code: [Select]

# SAM3 Uploader tools
# -------------------


tools.bossac.upload.params.verbose=-i -d
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -v -b "{build.path}/{build.project_name}.bin" -R

Go Up