rfm_edf_ecomanager code now works with the Arduino IDE

Just a very quick update: my rfm_edf_ecomanager C++ AVR code now should compile within the Arduino IDE.

Comments

At the risk of starting another thread....

Trying to compile the Arduino version, getting errors like this -
Am I missing a library?

Rfm12b.cpp.o: In function `Rfm12b::interrupt_handler()':
C:\Users\Andy\AppData\Local\Temp\build8316089582998724407.tmp/Rfm12b.cpp:82: undefined reference to `spi::select(bool)'
C:\Users\Andy\AppData\Local\Temp\build8316089582998724407.tmp/Rfm12b.cpp:94: undefined reference to `spi::select(bool)'
C:\Users\Andy\AppData\Local\Temp\build8316089582998724407.tmp/Rfm12b.cpp:103: undefined reference to `spi::select(bool)'

Thanks for reporting the error.

Hmm. That looks like an error from the C++ linker (as opposed to the compiler). Normally that would suggest that there's a problem with the makefile but I have no idea how the Arduino IDE constructs a makefile (I tend to avoid the Arduino IDE as much as possible I'm afraid, sorry).

Basically, I suspect the problem is that Rfm12b.cpp.o isn't being correctly linked to spi.cpp.o (perhaps spi.cpp.o isn't even being compiled).

Unfortunately I can't replicate this problem on my version of the Arduino IDE (version 1.0 on Ubuntu 12.04).

Does robomotic's code work for you?

"Does robomotic's code work for you?"

Nope - same error, Im running IDE 1.0.1 - i'll see if I can find 1.0.0 and try that.

OK. I did a bit of googling and found Advanced Arduino - Including Multiple Libraries by Scott Daniels. Scott says it's possible to force the Arduino IDE to compile and link files by including those files directly in the .ino file. I've made this modification to my code on github so please give it a go and let me know if it works. (Also, for future bugs, it's probably best to report bugs on the GitHub issue tracker if you have a GitHub login... also please note that this code is in a VERY early state. pre-pre-pre-alpha sort of thing ;). Hopefully it'll mature over the next week or so but it'll be several weeks at least before it's ready for doing real work.)

Add new comment