MKR WiFi 1010 Arduino sketch does not compile correctly with Atmel Studio

I tried to port a simple (BareMinimum) Arduino sketch to Atmel Studio (V 7.0.2542).
Board settings (MKR WiFi 1010) were set correctly and the BareMinimum.ino was used as sketch.
The problem is that already the core-project does'nt compile correctly. It generates messages like:

'strlen' was not declared in this scope ArduinoCore D:\Atmel Studio Projects\MKR WifI 1010 projects\ArduinoSketch1\ArduinoSketch1\ArduinoCore\include\core\api**Print.h ** 52

or
'memcpy' was not declared in this scope ArduinoCore D:\Atmel Studio Projects\MKR WifI 1010 projects\ArduinoSketch1\ArduinoSketch1\ArduinoCore\src\core\api**IPAddress.cpp ** 45

So I suspect an error in the autogenerated path settings for the MKR WiFi 1010 in Atmel Studio !
Any help is welcomed
Regards JR

This doesn't appear to be limited to the MKR boards; I'm getting something similar when trying to convert a trivial Adafruit Circuit Playground Express sketch to build with Microchip Studio 7.0.2542 (same as what you're using, by the looks of things). Here's what I get when running 'make' in a Microchip Studio Command Prompt window:

C:\Users\phil2\Documents\Atmel Studio\7.0\readbytes_forever\readbytes_forever\readbytes_forever\Debug>make

Building file: .././Sketch.cpp

Invoking: ARM/GNU C Compiler : 6.3.1

"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe" -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=108013 -DARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS -DARDUINO_ARCH_SAMD -DUSB_VID=0x239A -DUSB_PID=0x8018 -DUSB_PRODUCT=""Circuit Playground Express"" -DUSB_MANUFACTURER=""Adafruit"" -DUSBCON -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\..\ArduinoCore\include\core" -I"..\..\ArduinoCore\include\variants" -I"..\..\ArduinoCore\include\core\api" -I"..\..\ArduinoCore\include\core\samd21" -I"..\..\ArduinoCore\include\core\USB" -I"..\..\ArduinoCore\include\core\api\deprecated" -I"..\..\ArduinoCore\include\core\api\deprecated-avr-comp\avr" -I"..\..\ArduinoCore\include\core\samd21\include" -I"..\..\ArduinoCore\include\core\samd21\include\component" -I"..\..\ArduinoCore\include\core\samd21\include\instance" -I"..\..\ArduinoCore\include\core\samd21\include\pio" -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g3 -w -mcpu=cortex-m0plus -c -std=gnu++11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "Sketch.d" -MT"Sketch.d" -MT"Sketch.o" -o "Sketch.o" ".././Sketch.cpp"

In file included from ..\..\ArduinoCore\include\core/api/ArduinoAPI.h:31:0,

from ..\..\ArduinoCore\include\core/Arduino.h:23,

from .././Sketch.cpp:2:

..\..\ArduinoCore\include\core/api/Print.h: In member function 'size_t arduino::Print::write(const char*)':

..\..\ArduinoCore\include\core/api/Print.h:52:52: error: 'strlen' was not declared in this scope

return write((const uint8_t *)str, strlen(str));

^

Makefile:84: recipe for target 'Sketch.o' failed

make: *** [Sketch.o] Error 1

Same problem.
I build a project, in Microchip Studio, from zero and now I can compile and upload on MKRWiFi1010 via JTAG with Atmel-ICE.
Tell me if you are still looking for a solution.
Bye
Livio

P.S. Hi JR1952. I didn't realize that was you, we already met in another forum.

The solution to import project from ArduinoIDE in Microchip Studio is here: Solution

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.