Closed amcjen closed 12 years ago
seems, you’re missing the cross-compiling toolchain. Make sure, you have avr-gcc and the avr-libc packages installed and cmake finds these.
Hmm, I definitely have gcc-avr, binutils-avr, avr-libc, and avrdude installed (On Ubuntu Oneiric). They were installed via apt, so they're in the typical paths:
/usr/bin/avr-gcc /usr/bin/avrdude
Is there somewhere in the cmake config where I need to update the search path or something?
Thank you for the prompt reply too. Much appreciated!
Ahh, nevermind. I cleared everything in the build directory, and reran cmake ..; make and it all worked.
Well, almost worked. I get an 'undefined reference to loop' error now, but at least it solved this one.
Thanks!
please run cmake again with -DCMAKE_VERBOSE_MAKEFILE=ON
and post the output after running make. This should clarify, what’s going on. (i hope ;))
Ahh, great you have that one fixed :) to fix the undefined reference to loop, a loop function must be implemented and linked before the CORE library. You probably just need to move around your functions in your .ino-file and be fine.
I had my main file named arduino_controller.ino. I renamed it to arduino_controller.cpp, updated the CMakeLists.txt *SRC to point to it, cleaned the build dir and reran cmake ..; make. No more loop error.
I see traditional gcc errors about functions not declared in the current scope, but looks to be from some of the magic the Arduino IDE does when compiling everything in a single file. I need to declare those in a .h file or something it seems.
Thank you for the help!
Yep, declared those functions at the top of the file, and a clean complie! Thanks!
I may be back regarding getting the serial port stuff to work, but will give it a good go first to see if I can get it working.
Love the project, thanks!
In trying to convert my project from the Arduino IDE over to using your cmake package, I get this:
Here is my CMakeLists.txt