Error compiling blink to MKRZero

I just bought a MKRZero which arrived today. I installed the necessary board from the boards manager. My board gets recognized, but when compiling the sketch I get this error that I’ve been trying to fix for hours:

In file included from C:\Users\ryanh\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

                 from C:\Users\ryanh\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/samd.h:105,

                 from C:\Users\ryanh\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/sam.h:470,

                 from C:\Users\ryanh\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.19\cores\arduino/Arduino.h:48,

                 from C:\Users\ryanh\AppData\Local\Temp\arduino_build_369469\sketch\Blink.ino.cpp:1:

C:\Users\ryanh\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:237:26: fatal error: core_cm0plus.h: No such file or directory

 #include <core_cm0plus.h>

                          ^

compilation terminated.

exit status 1
Error compiling for board Arduino MKRZERO.

I tried removing and reinstalling the board more than once, with my antivirus software turned off. Still no luck. I’ve seen a few other posts with this same problem but none of them have been solved, just a few suggestions thrown around (which I tried). Does anyone have any suggestions?

Good suggestion is to maybe take a good look around the forum first than you could have asked in the correct section :wink:

Which windows are you on ?

Also turn on VERBOSE for COMPILE in preferences.

I dont see those types of message here on win 7 in IDE 1.8.6 so lets know what you are using ?

With verbose you should see a whole lot more.

BTW just turning off your AV may not completely turn it off !
Last time I saw that error in here it did turn out to overly aggressive AV and adding the Arduino locations to the AV exclusions list fixed it.

SEE HERE

Sorry for the late response. I am using arduino 1.8.7 and I'm running windows version 10.0.17134 Build 17134. Just whitelisted the three folders suggested except for the last one. C:\Users\yourname\AppData\Roaming\Arduino15 does not exist for me. what now?

I tried installing the core again and I got the same message

The last one may be a HIDDEN folder so you should enable the “show hidden folders” option to see it.

Hidden is turned on. I have the roaming folder, but no arduino folder within it

Unless you have an odd installation of windows or the IDE it should be there.

Which IDE are you using ?

app data folder.jpg

I used the installer for 1.8.7. The only thing I could think of is it might be in the admin's directory (which I don't have access to) but I have no idea how that would happen or how probable it is. Does this mean I need to uninstall and reinstall arduino?

I dont think chasing the folder will matter too much as you found the others and I realised that sometimes its just two out of three (my bad).

A re-install may help and is not hard to do.
There is a help file for that attached.

CLEAN UP BEFORE INSTALLING ANOTHER COPY OF THE IDE OR ARDUINO CREATE.pdf (347 KB)