Trouble using Arduino IDE with Lilymini on MacOS

I’m trying to build something with my daughter using the LilyMini. But I’m running into a lot of trouble!

I’m using:

  • either a MacBook running macOS Catalina or a MacBook running macOS Sierra

  • Arduino IDE 1.8.12

  • Arduino SAMD Boards (32-bits ARM Cortex-M0+) 1.8.6

  • Sparkfun SAMD Boards 1.4.0 (and later in the process 1.7.4)

  • The standard LilyMini Blink Example code
  • I followed these steps: https://learn.sparkfun.com/tutorials/pr … e-lilymini

    Problem #1

    The first error I got was:

    fatal error: sam.h: No such file or directory
    

    I fixed it by editing ~/Library/Arduino15/packages/SparkFun/hardware/samd/1.4.0/platform.txt

    and changing

    compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.1.0.path}/CMSIS/Device/ATMEL/"
    

    into

    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/"
    

    Problem #2

    The second error I got was:

    error: conflicting declaration of C function 'char* utoa(long unsigned int, char*, int)'
     extern char* utoa( unsigned long value, char *string, int radix ) ;
    

    Which is apparently fixed in a later version of the SparkFun SAMD Boards version. But updating that from 1.4.0 to 1.7.4 gives me Problem #3.

    Problem #3

    The third and final error I get is:

    No device found
    

    I give up. Please help us!

    Wow, I fixed it!

    I downgraded from 1.7.4 to Sparkfun SAMD Boards 1.4.0

    I installed Arduino SAM Boards (32-bits ARM Cortex-M3)

    And I once again changed ~/Library/Arduino15/packages/SparkFun/hardware/samd/1.4.0/platform.txt

    I changed this:

    compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
    

    to this:

    compiler.path={runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}/bin/
    

    Doublecheck the version of arm-none-eabi-gcc that’s available on your machine in ~/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc

    The version you enter into platform.txt should be the same. If you see more than one, choose the older version. The new one conflicts with itoa.h in Sparkfun SAMD Boards 1.4.0

    Enjoy coding!