Today I tried out the command line version of arduino.
I had succes with just a single ino file. I could compile, upload, use the monitor and clean the project.
I have an other project which has more source and header files, both next to the .ino as in the src sub directory. The arduino IDE itself does compile and upload the project without error.
The make file:
ARDUINO_DIR = /usr/share/arduino
ARDUINO_PORT = /dev/ttyUSB*
USER_LIB_PATH = /home/bask185/sketchbook/libraries
BOARD_TAG = nano328
include /usr/share/arduino/Arduino.mk
The last output of the compiler:
/tmp/ccbk3hRk.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0xfc): undefined reference to `initIO()'
<artificial>:(.text.startup+0x100): undefined reference to `initTimers()'
<artificial>:(.text.startup+0x252): undefined reference to `leftShortCircuitT'
<artificial>:(.text.startup+0x260): undefined reference to `leftShortCircuitT'
<artificial>:(.text.startup+0x270): undefined reference to `rightShortCircuitT'
<artificial>:(.text.startup+0x2ce): undefined reference to `blinkT'
<artificial>:(.text.startup+0x2d6): undefined reference to `blinkT'
collect2: error: ld returned 1 exit status
/usr/share/arduino/Arduino.mk:1442: recipe for target 'build-nano328/amerikaBaan.elf' failed
make: *** [build-nano328/amerikaBaan.elf] Error 1
All the functions and variables with 'undefined reference' are all somewhere within the src subdirectory.
How is this fix-able? Must I add something to the Makefile?
Also side question, I am not going to use the library folder.. not ever. Is it safe to remove the line from the makefile?
Kin regards,
Bas