Installing Moteino core in Arduino IDE 1.5x

Started by Robert, February 04, 2015, 10:24:57 AM

Robert

Hi,

I am struggling with version IDE 1.06 which is crashing my Mavericks OSx.
IDE 1.57 is stable (however with funny incompatibles!), but new Hardware integration is not the same as for 1.06.
Does someone  knows how to  integrate Motineo in IDE 1.5x.

Thanks in advance
Robert

Felix

What are the "funny incompatibles" ?
The Moteino core is very lean and there is no code except some pin definitions for the MoteinoMEGA, nothing else, it should work in past IDE versions as well.
If you have simple Moteinos or MoteinoUSB you can just choose Board>Arduino UNO and it will work just fine, no need for the Moteino core.

Robert

With a Moteino MEGA (board selected Arduino Mega or Mega 2560)

Arduino: 1.5.8 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all
In file included from myRF69Send.ino:2:0:
/Users/Robert/Data/Our Documents/Projets Techniques/Domotic/Arduino/Sketch/libraries/RFM69/RFM69.h:83:68: error: 'RF69_IRQ_PIN' was not declared in this scope
     RFM69(uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM) {
                                                                    ^
/Users/Robert/Data/Our Documents/Projets Techniques/Domotic/Arduino/Sketch/libraries/RFM69/RFM69.h:83:125: error: 'RF69_IRQ_NUM' was not declared in this scope
     RFM69(uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM) {
                                                                                                                             ^
myRF69Send.ino:11:7: error: call to 'RFM69::RFM69(uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
myRF69Send.ino:11:7: error: call to 'RFM69::RFM69(uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 4, which is not yet defined
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.


Moteino MEGA with board selected as UNO same script

Sketch uses 5,252 bytes (16%) of program storage space. Maximum is 32,256 bytes.
Global variables use 367 bytes (17%) of dynamic memory, leaving 1,681 bytes for local variables. Maximum is 2,048 bytes.
avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.
Wrong microcontroller found.  Did you select the right board from the Tools > Board menu?

Incompatibilities that I know (enough for me to not use it ):

Typically:
-  IDE 1.57 and 1.58 -  SoftwareSerial is not working anymore (I mean compilation is OK, but data is rubbish)
- IDE 1.58 - WEBDUINO compilation generates tons of Error


Robert

Felix

For MoteinoMEGA you have to install the core files from here.

Robert

Felix

No it doesn't work

What I did
1. I have a working version IDE 1.0.6
With /Users/Robert/Data/Our Documents/Projets Techniques/Domotic/Arduino/Sketch/Hardware/Motineo/...
and I see Motineo and MotineoMEGA under Tools>Board

2. I start concurrently IDE 1.5.x and there is NO Motineo under Tools>Board

3. Looking at IDE 1.5*  I see a new preference.txt file is created under /Users/xxx/Library/Arduino15

4. I couldn't find any major differences between the 1.06 and the 1.5x file, modifying the path for hardware didn't help (even using the old preference.txt under Arduino15)

5. The path for hardware for 1.58 is
last.ide.1.5.8.hardwarepath=/Applications/Arduino 1.58J7.app/Contents/Java/hardware

6. So I have made a copy of the Moteino hardware info under
/Applications/Arduino 1.58J7.app/Contents/Java/hardware/arduino/

7. I see now the new hardware under Tools>Board

8. Trying to compile a sketch I have the following message

Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer.
processing.app.debug.RunnerException
   at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:593)
   at processing.app.debug.Compiler.compileFiles(Compiler.java:271)
   at processing.app.debug.Compiler.compileSketch(Compiler.java:638)
   at processing.app.debug.Compiler.compile(Compiler.java:121)
   at processing.app.Sketch.build(Sketch.java:1588)
   at processing.app.Sketch.build(Sketch.java:1508)
   at processing.app.Editor$DefaultRunHandler.run(Editor.java:1912)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
   at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:97)
   at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:89)
   at processing.app.helpers.StringReplacer.formatAndSplit(StringReplacer.java:37)
   at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:591)
   ... 7 more

I believe Arduino is having the Microsoft syndrome: more complex, less functional.

Robert

Felix


Robert

Felix,

I start a new installation on a virtual Windows XP PC (IDE 1.58)

If  I copy the hardware  definitions (Moteino, Attiny...) under C:\Documents and Settings\Robert\My Documents\Arduino\hardware, the new boards are NOT shown.
The only success I had was by copying the \hardware directory (that contain the Motineo definitions)  under  C:\Program Files\Arduino\hardware\hardware
In this case I can see all the new hardware under the board menu, however while selecting the Motineo I have the following compilation error

Arduino: 1.5.8 (Windows XP), Board: "MoteinoMEGA"

Selected board depends on 'arduino' core (not installed
).

Other configuration such as copying directly the Motineo definitions under :
C:\Program Files\Arduino\hardware\Moteino
Doesn't work at all.

NB: I put a note under Arduino forum, but no answers ...

Robert

Felix

All I can tell you is it works in 1.0.6 as long as you copy the files it in the right place. The IDE needs a restart to pick up changes.
Instructions to install the core and everything else there is to know are posted here: https://lowpowerlab.com/programming/#arduino


Robert

Hi,
Hey, many thanks for that, I see also the JeeLab had the same problem with its Attiny version.
I will take some time to look at the new syntax and post my result once solved.

Again thanks for your help, I the mean time I will use the Codebender which looks more stable than IDE 1.06 on Mavericks

Robert

Robert

The solution is:

Arduino 1.5x  Moteino/MoteinoMEGA Arduino core files for Atmega328P/ATmega1284P based Moteinos.

New Arduino 1.5x structure: see # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

Sketch
      /hardware
                    /Moteino
                               /avr
                                    board.txt
                                    platform.txt
                                    programmers.txt
                                    /bootloaders
                                                     /Moteino
                                                                /DualOptiboot_V5.0_atmega328_BlinkD9.hex
                                                    /MoteinoMEGA
                                                                /DualOptiboot_V5.0_atmega1284p_BlinkD9.hex
                                   /variants
                                               /MoteinoMEGA
                                                                    /pins_arduino.h
                                           
So practically the modify the current files (see https:https://github.com/LowPowerLab/Moteino/tree/master/MEGA/Core).

1. By rearranging the ones of IDE 1.0x to the hierarchy structure of 1.5x (see above)
2. Slightly adapt the board.txt by adding "Moteino.upload.tool=avrdude" which is missing
3. Create a platform.txt file, which is a copy of the standard arduino one but renamed as "Moteino AVR Boards"
4. Create a empty programmers.txt file
or
install the attached ZIP file

NB:

1. I did test it with IDE 1.57 and 1.58 with the verify and upload functions ONLY (NOT with the programmer tool)
2. If IDE 1.0x and IDE 1.5x are to be used; a double hardware description is necessary (the old one and the new one) for instance as:
Sketch
      /hardware
               /Moteino10
                          .... old 1.0x
Sketch
      /hardware
               /Moteino15
                          ... new 1.5x

Robert

kiwisincebirth

Have you tried this with the new Arduino 1.6 ?

rdww60

Just did this for 1.6 and it works too. That's also what they say in the documentation.

TomWS

Quote from: rdww60 on February 14, 2015, 06:39:04 PM
Just did this for 1.6 and it works too. That's also what they say in the documentation.
Thanks for the info. 
Tom

mirko.ugolini

Hello all,

I got a similar error:

Arduino: 1.6.0 (Windows 7), Board: "Moteino"

Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer.

Error while compiling: missing 'recipe.cpp.o.pattern' configuration parameter

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

But I was not able to solve te problem

Mirko