user21004: 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

user21004: 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.

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.
Make a copy of the platform.txt file (I called it platform_backup.txt).
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
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
Restart the IDE so it can re-read the file you just edited. You'll now be able to upload to the Due.


21004: <p>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:</p>

<p><code>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</code></p>
 21004: <p>I finally figured out the problem. This occurred on both a Mac and PC (Windows 10).</p>

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

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

<p><code>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</code></p></li>
<li><p>This was 3rd line from the bottom for me, and remove the text between the quotes "{upload.verify}". It should now look like this:</p>

<p><code>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</code></p></li>
<li><p>Restart the IDE so it can re-read the file you just edited. You'll now be able to upload to the Due.</p></li>
</ol>
