22 Comments

  1. HypeFrcr

    As of 2020-09-22, it works perfect as indicated.

    Reply
  2. Salam

    This was very helpful.
    the bossac.exe file in my case was not located in the “program files” but in the “appdata” folder under the “users”, so I changed the file address accordingly.

    Reply
  3. Luisda

    Hello.
    First of all, thanks for sharing this tutorial 🙂 . I have an Arduino Due, but I would like to program it using Atmel Studio and not erasing the bootloader (I mean, I would also like to have the possibility of keep programming the MCU using the Arduino IDE), should I use the Programming port instead of the Native port? Usually, when I program this board from Arduino IDE, I use the Programming port, not the Native one.

    Thanks in advance.

    PD: Please, if possible, send me your answer to my email, therefore I will be able to see it more easily.

    Reply
    • Z-Ster

      You still be able to program your DUE in ARDUINO IDE using Native USB port or Programming USB port, witchever you like. The bootloader is factory burned and it is not erased.

      Reply
  4. Jer

    I get an error message saying: Cannot execute empty custom programming tool command. Please provide a command to execute and try again. Has this happened to anyone else?

    Reply
    • Salam

      the bossac.exe file in my case was not located in the “program files” but in the “appdata” folder under the “users”, so I changed the file address accordingly.

      Reply
  5. geeky

    which device is to be selected from the device selection menu.. atmel324p ?

    Reply
  6. gaurav

    after i erase the controller can i program it with arduino due again

    Reply
    • Z-Ster

      Yes, you can.

      Reply
  7. jmcarval

    spot on. thanks

    Reply
  8. jmcarval

    Hi,
    Build and flash procedure seems to complete properly
    ——————————–
    Verify successful
    Set boot flash true
    […]
    Total Size : 512KB
    Planes : 2
    Lock Regions : 32
    Locked : none
    Security : false
    Boot Flash : true
    CPU reset.”
    —————————-
    Opened a terminal on the same COM port @115200 baud (8bits/1stop/no parity) with the cable still on the native port. Reset the board and the terminal several times.
    Nothing.

    What am I doing wrong?

    Reply
    • Elecrom

      You have to open the terminal on the other COM port, which gets enumerated by the other USB port.

      COM port enumerated by the “Native USB SAM3X” usb port is only for programming the Due board.

      Reply
  9. Delecromnic

    Hello, I got an error, “The filename, directory name, or volume label syntax is incorrect.”
    This is the complete output log:

    C:\Users\Rob\Documents\GccBoardProjectTA\GccBoardProjectTA\Debug>mode COM8:1200,n,8,1,p

    Status for device COM8:
    ———————–
    Baud: 115200
    Parity: None
    Data Bits: 8
    Stop Bits: 1
    Timeout: OFF
    XON/XOFF: OFF
    CTS handshaking: ON
    DSR handshaking: ON
    DSR sensitivity: OFF
    DTR circuit: HANDSHAKE
    RTS circuit: HANDSHAKE

    C:\Users\Rob\Documents\GccBoardProjectTA\GccBoardProjectTA\Debug>“E:\arduino\hardware\tools\bossac.exe” –port=COM8 -i -e -w -v -b “C:\Users\Rob\Documents\GccBoardProjectTA\GccBoardProjectTA\Debug\GccBoardProjectTA.bin” -R
    The filename, directory name, or volume label syntax is incorrect.

    Reply
    • Elecrom

      Please cross check if your “.bin” file exists at a given path.

      Also check your Quotation marks used in the tool configuration. Sometimes during copy pasting you copy this – Opening and closing quotes (“”), which are not correct. They should be double quote character on the keyboard only.

      Reply
      • Elecrom

        So did this work ?

        Reply
  10. Elecrom

    What is your command line? Are you sure you are not missing anything in the batch file? Can you provide your batch file here?

    Reply
    • Ahmet

      C:\Users\Ahmet\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino/bossac.exe -i -d –port=%1 -U true -e -w -v -b %2 -R

      This one works upto writing being stop. Also if i add mode %1:1200,n,8,1,p to beginning of bat file still same result

      -U true part has no affect but arduino puts that too so i added.

      Reply
      • Ahmet

        Also with your bat file i cannot work that is also weird

        mode %1:1200,n,8,1,p
        “C:\Users\Ahmet\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino\bossac.exe” –port=%1 -i -e -w -v -b %2 -R

        Output:
        C:\Users\Ahmet\Documents\Atmel Studio\7.0\GccApplication1\GccApplication1\Debug>mode COM4:1200,n,8,1,p

        Status for device COM4:
        ———————–
        Baud: 115200
        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

        C:\Users\Ahmet\Documents\Atmel Studio\7.0\GccApplication1\GccApplication1\Debug>”C:\Users\Ahmet\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino\bossac.exe” –port=COM4 -i -e -w -v -b “C:\Users\Ahmet\Documents\Atmel Studio\7.0\GccApplication1\GccApplication1\Debug\GccApplication1.bin” -R
        bossac.exe: extra arguments found
        Try ‘bossac.exe -h’ or ‘bossac.exe –help’ for more information

        Reply
        • Elecrom

          It seems you are using different version of the Arduino software (you are using 1.6.1)… I have faced problems with the newer versions. You will specifically need – “Arduino 1.6.0” , please use bossac.exe from this particular version.

          Reply
  11. Ahmet

    Hi

    My output says SAM-BA operation failed but i can perfectly code arduino due with arduino ide do you know what is this

    Reply
    • Elecrom

      – Check if you are following step 2 and step 3 mentioned in ‘Burning/Downloading Code’ section.

      Can you paste here the full console log ?

      Reply
      • Elecrom

        So did this work ?

        Reply

Leave a Reply to Delecromnic Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.