Moteino M0 compile error [SOLVED]

Started by akstudios, June 21, 2019, 09:45:20 PM

akstudios

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


akstudios

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

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:

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



Felix

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

I completely forgot to ask - did you install (or have it installed previously) the official Arduino SAMD Boards package?

akstudios

Yes, I do have the official Arduino SAMD boards package installed.

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

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


Felix

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

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

Quote from: akstudios on June 25, 2019, 04:47:50 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

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?!)

Quote from: Felix on June 25, 2019, 07:31:09 PM
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

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

yep, just tested it, works perfectly! (IDE v1.8.9)

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