Cannot compile blink sketch for MKR1000

Posted by: GCArkenbout 4 February 2018
I used a number of IDE’s
At last the Arduino-Nightly one from the 3rd of Januari 2018.
I installed near the whole Library and refresh parts of them with restart the IDE.The MKR1000 board is connected via COM 7 port and found in Windows10. Also the IDE: 1.8.5 delivered continually the following error

The error message
Code: [Select]
Arduino: Nightly (Windows 10), Board: "Arduino/Genuino Zero/MKR1000 (Programming Port)"

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

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

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

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

from C:\Users\User\AppData\Local\Temp\arduino_build_752269\sketch\sketch_feb02a.ino.cpp:1:

C:\Users\User\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/Genuino Zero (Programming Port).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Must I use an older IDE and how include <core_cm0plus.h>? Thanks

This is strange:

GCArkenbout:

Arduino: Nightly (Windows 10), Board: "Arduino/Genuino Zero/MKR1000 (Programming Port)"

...
Error compiling for board Arduino/Genuino Zero (Programming Port).

Why does it first call the board "Arduino/Genuino Zero/MKR1000 (Programming Port)", then later call it "Arduino/Genuino Zero (Programming Port)". The former is not part of the latest version of Arduino SAMD Boards, the latter is. Is that the exact output you received?

This is the output of the compiling try:
I at first used a not exact copy for my output.

Arduino: 1.8.6 Hourly Build 2018/01/03 03:33 (Windows 10), Board:"Arduino/Genuino MKR1000

"C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10806 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino MKR1000"' "-IC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.17\cores\arduino" "-IC:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.17\variants\mkr1000" "C:\Users\User\AppData\Local\Temp\arduino_build_95302\sketch\sketch_feb02a.ino.cpp" -o "C:\Users\User\AppData\Local\Temp\arduino_build_95302\preproc\ctags_target_for_gcc_minus_e.cpp"

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

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

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

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

from C:\Users\User\AppData\Local\Temp\arduino_build_95302\sketch\sketch_feb02a.ino.cpp:1:

C:\Users\User\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
Fout bij het compileren voor board Arduino/Genuino MKR1000

Is the whole error report necessary?
Sorry, thanks for your reaction

Well I can tell you that I am able to compile File > Examples > 01.Basics > Blink for Arduino/Genuino MKR1000 without any error using Arduino IDE 1.8.5 and the latest version of Arduino SAMD Boards (1.6.17).

Maybe reinstalling Arduino SAMD Boards will solve the problem.

Try this:

  • Tools > Board > Boards Manager
  • Wait for downloads to finish
  • Click on "Arduino SAMD Boards"
  • Click "Remove"
  • Wait for the hardware package to be uninstalled
  • Click "Install"
  • Wait for the installation to finish
  • Click "Close"
  • Try compiling again

Pert thank you so much. I successeeded in compiling the blink sketch. I hope the upload to the board will go without the error. I was so happy. So I report you at first the result of handling the compiling error.

Thank you, Gerald from the Netherlands

Pert I was to quick with my happiness. I saw the board type was changed to Arduino Yun. This had happened during the use of the boardmanager to remove and install the Arduino SAMD boards.
After the change of the board type to Arduino/Genuino MKR1000 and compiling the sketch, I got the above mentioned error AGAIN. Will you think over the error again.

Thank you

What security do you have ?
Maybe try turning anything off just to test the blink example.

Same as Pert I have no issues with any of the IDE's under various windows OS.
It does seem to be particular to your installation.

Ballscrewbob and Pert.
Yes my installation of software caused the trouble. An extra Antivirus software package: Sophos Anti-Virus was the bad boy I think. I can compile now the blinking sketch, but te upload did not succeed. I get the following message:

De schets gebruikt 4124 bytes (14%) programmaopslagruimte. Maximum is 28672 bytes.
Globale variabelen gebruiken 149 bytes (5%) van het dynamisch geheugen. Resteren 2411 bytes voor lokale variabelen. Maximum is 2560 bytes.

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "þ"; type = ¸
Software Version = h.
What is not right now, you think. Thank so much

You need to add some file locations to your Antivirus exclusions / white list.

C:\Program Files (x86)\Arduino
C:\Users\yourname\AppData\Local\Arduino15 depends on IDE
C:\Users\yourname\AppData\Roaming\Arduino15 depends on IDE

Change the drive letter to suit your install of the IDE etc.

It could still be the AV blocking access.

When I recieved the same error "#include <core_cm0plus.h>" I installed an older version of the board package for an Ardunio Zero with an SAMD and restarted the program. This resolved the error.

Glad you git it all sorted.
Enjoy your Arduino adventures.

Bob.