Hi, I'm working on a custom Arduino-based board for low-power projects. As part of the effort I have added a handful of utility functions to the 'core' for power management. In the hope of creating as little mess as possible, I did it as follows:
- Created new files, mosquino.c/mosquino.h, containing the custom stuff (functions, and macros + prototypes respectively) in the custom core's directory (...My Documents\Arduino\hardware\Mosquino\cores\arduino)
- #include "mosquino.h" from WProgram.h
Although macros defined in these files are 'visible' from the sketch, the functions are not... even if mosquino.h is #include'd into the sketch by hand:
core_test.cpp.o: In function
C:\DOCUME~1\Tim\LOCALS~1\Temp\build5515614687940556259.tmp/core_test.cpp:32: undefined reference topower_full()'
A look in the build temp folder shows at least that a mosquino.c.o file was built and contains references to the function.
Currently using a core derived from 0022 and the 0022 IDE (haven't had time to patch it up to 1.0 yet).
Is this behavior expected? That is, is there some peculiarity/voodoo in the Arduino IDE's build process that causes this to fail, or am I missing something simple? (i.e have been away from c++ too long :p )?