I'm trying to get some firmware originally compiled in C for an AVR chip to compile in Arduino IDE as a sketch. I copied over all the code and setup the tabs for each file (*.c and *.h) but when I compile I get this verbose output error:
Using previously compiled file: /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/wmath.c.o
/Users/maureencole/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR -I/Users/maureencole/Desktop/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/maureencole/Desktop/Arduino.app/Contents/Java/hardware/arduino/avr/variants/eightanaloginputs /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/main.c.ino.cpp -o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/main.c.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_cache_67136/core/core_arduino_avr_pro_cpu_16MHzatmega328_0aea8ac1ee3e8efc18f761f97efe0efe.a
Linking everything together...
/Users/maureencole/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/main.c.ino.elf /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/MP3sound.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/fifo.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/i2c.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/realtime.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/sequencer.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/serial.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/servo.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/suart.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/wmath.c.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/sketch/main.c.ino.cpp.o /var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128/../arduino_cache_67136/core/core_arduino_avr_pro_cpu_16MHzatmega328_0aea8ac1ee3e8efc18f761f97efe0efe.a -L/var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T/arduino_build_834128 -lm
/var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T//ccnylTg4.ltrans0.ltrans.o: In function `SendSetupToSlave':
/Users/maureencole/Documents/Arduino/main.c/main.c.ino:2170: undefined reference to `suart_puts(char*)'
/var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T//ccnylTg4.ltrans0.ltrans.o: In function `StartSlaveSequence':
/Users/maureencole/Documents/Arduino/main.c/main.c.ino:2155: undefined reference to `suart_puts(char*)'
/var/folders/zw/ymsbqm_j7nsdp4bp00087zk80000gr/T//ccnylTg4.ltrans0.ltrans.o: In function `HPFlash':
/Users/maureencole/Documents/Arduino/main.c/main.c.ino:1969: undefined reference to `suart_puts(char*)'
I know the functions are defined, what am I doing wrong?