Hi Folks,
I installed the Due board yesterday (SAM package version 1.6.5) and had following error when compiling:
arm-none-eabi-gcc: error: C:\Users[user name]\AppData\Local\Temp\build9100607786597507022.tmp/core/syscalls_sam3.c.o: No such file or directory
Error compiling.
I believe that I found a fix (at least it seems to work for me as it compiles). As I couldn't find any real solution out there despite the fact that the problem seems to be recurring, I decided to share it.
This problem seems to be most frequent with some simulink package from mathworks. The common fix is running and/or installing matlab as administrator, but I am not using matlab. Just the regular Arduino.exe. Running it as an Administrator and reinstalling the SAM package did not help.
Now to the solution which worked for me:
Go to the folder C:\Users[User]\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.5
Then open platform.txt
Press Ctrl+F and search for core/syscalls_sam3.c.o
Delete "core/". You should end up with something like: --start-group "{build.path}/syscalls_sam3.c.o"
Save the file. Restart arduino.exe. Make sure you selected the arduino due board and you're good to compile.
Why delete "core/" ?
Well, the compiler tries to build a sub folder named core in the temp file. But for some reason it fails. The file syscalls_sam3.c.o can however be found in the temp file... but not in a sub folder core. I am assuming that as it failed generating a sub folder, it still dumps the syscalls_sam3.c.o object into the temp file... just not in the sub folder core. Now, when the compiler then tries to locate the syscalls_sam3.c.o file in the sub folder core, it fails. By modifying the platform.txt, you avoid creating a sub folder and the compiler doesn't loose the location of the file syscalls_sam3.c.o
There is certainly a cleaner way to do this and if you have one, please share!