I can successfully see the Arduino Due when I plug it in. I can compile the code, but when I attempt to upload it to the board I get the following error:

C:\Users\user\AppData\Roaming\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino/bossac.exe -i -d --port=COM4 -U false -e -w true -b C:\Users\user\AppData\Local\Temp\build6683778295083335366.tmp/_50key_driver.cpp.bin -R bossac.exe: extra arguments found Try 'bossac.exe -h' or 'bossac.exe --help' for more information


I finally figured out the problem. This occurred on both a Mac and PC (Windows 10).

This error occurred because of the true after the -w switch. To fix it I modified the package to tell the IDE not to use that switch.

  1. Go to: %USER_PROFILE%\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.8 (where %USER_PROFILE% is your windows user directory, for me it was C:\Users\user) in Windows Explorer.
  2. Make a copy of the platform.txt file (I called it platform_backup.txt).
  3. Open the file platform.txt with Word Pad (it had Unix line endings in my environment), search for the string:

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

  4. This was 3rd line from the bottom for me, and remove the text between the quotes "{upload.verify}". It should now look like this:

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

  5. Restart the IDE so it can re-read the file you just edited. You'll now be able to upload to the Due.

  • On my Windows 10 system, the path to platform.txt contained AppData\Local instead of AppData\Roaming. Full path: %USER_PROFILE%\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.8 Uploads fine to my Due now! – Nate Jun 23 '16 at 16:00

Tim's solution is also applicable to Version 1.6.9 of the SAM tools. I just installed it in my Arduino IDE V1.6.8 and had the same parameter problem as originally reported. Following Tim's solution fixed the problem right away. As this is clearly a configuration issue on the Arduino IDE side, it should happen on any supported Windows platform, mine was Windows 7. The only difference I encountered was the path to the SAM tools directory. On my Enterprise version of Win7, the path was not in AppData\Roaming but in AppData\Local , so %USER_PROFILE%\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.9\ for the full pathname.


There's a better option:

(For Windows)

1/ Download the latest IDE release.

2/ Uninstall the IDE completely.

3/ Reboot PC

4/ Go to %USER_PROFILE%\AppData\Local\Arduino15 and delete it (the entire folder). If the path doesn't match then find it in AppData folder, it's in there somewhere.

5/ Reinstall the IDE, problem fixed.


I tried this solution in linux Fedora, it worked fine, but the location of the file "platform.txt" was /home/{user}/.arduinoxx/packages/arduino/hardware/sam
It is a hidden folder, so make it visible so you can handle it. No sudo access was necessary.

  • From the question, it is obvious the OP uses Windows, not Linux. Providing a linux-based answer may not really help. – jfpoilpret May 23 '17 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.