Not able to compile with SAMD version 1.6.1 with Arduino SAMD 1.8.11

Started by nitinmidha, February 08, 2021, 03:41:37 PM

nitinmidha

I recently updated the Ardunio from 1.18.12 to 1.18.13 and did the below steps to compile for M0 (Empty Sketch)...

1.) Added the Board Manager Url: https://lowpowerlab.github.io/MoteinoCore/package_LowPowerLab_index.json
2.) Installed below Boards from Boards Manager:
    Arduino SAMD Boards (32-bits ARM Cortex-M0+) Version 1.8.11
    LowPowerLab SAMD Boards Version 1.6.1
3.) Selected Moteino M0 for compilation
Received below error with Verbose log for compilation:


C:\Users\####\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:237:10: fatal error: core_cm0plus.h: No such file or directory
#include <core_cm0plus.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Moteino M0.

I have verified that the core_cm0plus.h file exists on below location:
C:\Users\####\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0\CMSIS\Include


Felix

I cannot replicate this with IDE 1.8.11 or 1.8.13.
Does it work if you revert to Moteino SAMD 1.6.0?

nitinmidha


Felix

Can you please try the following:
- change back to latest Moteino SAMD 1.6.1
- go to platform.txt and find these lines:

compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.4.0.path}/CMSIS/DSP/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/"
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.4.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math


Replace those lines with the following, save & you may need to close and restart the IDE.
Let me know if this fixes the compile error you were having before.

compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.2.0.path}/CMSIS/Device/ATMEL/"
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math

Felix

I released a new package 1.6.2 that include this change, I believe this should resolve the compilation error you were having. Let me know if anything else comes up.