Author Topic: Moteino M0 compile error [SOLVED]  (Read 3240 times)

akstudios

  • NewMember
  • *
  • Posts: 28
Moteino M0 compile error [SOLVED]
« on: June 21, 2019, 09:45:20 PM »
I'm sure this is common, and has a simple solution that I'm glossing over, but I wasn't able to compile any code by selecting Moteino M0 as the board.

Keep getting this compile error:



Tried removing the boards from board manager, reinstalling them - same problem.
Selecting Arduino Zero (Native USB Port) as the board however works just fine and I'm able to upload to the board.
Interestingly - the very first time I plugged the board to the computer, it recognized it as a Moteino M0 and that Windows 10 thingy popped up "Setting up Moteino M0..." and "Device is ready to use".
But couldn't upload to it due to the code not compiling. Now when I selected Arduino Zero and uploaded to it, everytime I plug in the board, it's being recognized as an Arduino Zero instead.

I'm assuming this is something to do with Windows not recognizing that the board definition is installed or is unable to locate the directory somehow?

Using Arduino 1.8.7. Running Arduino as Admin doesn't work either, if that helps.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #1 on: June 22, 2019, 04:14:49 PM »
You just have to have the latest Moteino SAMD boards installed.

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #2 on: June 24, 2019, 03:47:41 AM »
You mean in board manager? Yes, I've already installed that and as I mentioned, I tried uninstalling and reinstalling them again. Still same problem.

Boards manager screenshot:

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #3 on: June 24, 2019, 04:14:57 AM »
Sorry, I take that back - there was a v1.2.0 update that wasn't installed. I installed that and now there's a different error:

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



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #4 on: June 24, 2019, 09:23:09 AM »
I don't know why this might be happening. With a good install of the Arduino IDE and the SAMD Boards by LPL (all which looks OK).
I just tried it on 1.8.9, all works, no compile issues whatsoever.
Any possibility you could try 1.8.9 or on a different computer?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #5 on: June 25, 2019, 09:05:19 AM »
I completely forgot to ask - did you install (or have it installed previously) the official Arduino SAMD Boards package?

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #6 on: June 25, 2019, 01:21:02 PM »
Yes, I do have the official Arduino SAMD boards package installed.

If I don't have that installed, I'm getting this error:

Quote
exec: "/bin/arm-none-eabi-g++": file does not exist
Error compiling for board Moteino M0.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #7 on: June 25, 2019, 03:11:13 PM »
I had an older version installed which worked. 1.6.19. Try installing that version, it should work.
I will try to figure out what breaking changes they made in the new release that cause this compile error.

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #8 on: June 25, 2019, 04:47:50 PM »
Ah there you go. It works if I downgrade to 1.6.19! Thanks.

It works with 1.6.20 also btw. Doesn't work with 1.6.21 or 1.8.1.

So Moteino board definitions are dependent on Arduino SAMD Boards being installed as well?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #9 on: June 25, 2019, 07:31:09 PM »
So Moteino board definitions are dependent on Arduino SAMD Boards being installed as well?
Yes, unless (not sure) you already have the right gcc compiler version installed. I think it's safe to say at least that with the current 1.2.0 release of Moteino SAMD Boards, the Arduino SAMD Boards v1.6.19 is required.

I'm already testing changes for a 1.3.0 release of Moteino SAMD Boards, which would fix all this and you could run all latest everything and it would all work. Just bear with me until I tie all the loose ends and I can publish a release, hopefully within a day or so.

Thanks for the patience.

FWIW there were no versions between 1.6.20 and 1.8.1, weird huh?  :o
That kinda tripped me assuming all is good, but 1.8.1 was just released 5 days ago, go figure. :P

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #10 on: June 25, 2019, 07:58:47 PM »
Got it! Thanks for addressing the issue - no rush, we wanna make sure it works!

Since we tend to stick with a version of Arduino for a while due to stability reasons and aren't always on bleeding edge, it's probably a good idea to add last known working version numbers of IDE, board definitions, etc. in the guide -- just in case someone new stumbles on this with a new install. Also for current and future LowPowerLab products (SAMD51?!)

FWIW there were no versions between 1.6.20 and 1.8.1, weird huh?  :o
That kinda tripped me assuming all is good, but 1.8.1 was just released 5 days ago, go figure. :P

Probably some intern messed up so bad in v1.7, they had to redact it entirely :P

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino M0 compile error
« Reply #11 on: June 25, 2019, 08:07:59 PM »
Hey I actually just published Moteino SAMD Boards 1.3.0. Please restart your IDE and it should popup a notification showing you that there are Boards to update.
Or just go to Boards Manager and update it from there.
Also note this is going to require going back to latest Arduino SAMD Boards 1.8.1.

Please try it and let me know if there is any issue compiling now.

akstudios

  • NewMember
  • *
  • Posts: 28
Re: Moteino M0 compile error
« Reply #12 on: June 25, 2019, 10:27:44 PM »
yep, just tested it, works perfectly! (IDE v1.8.9)

Thanks for the quick update Felix :) You can mark this thread as solved.