Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Teens3 Makefile

  1. #1

    Teens3 Makefile

    I'm trying to get my program building via Makefile. I've stripped it down to this amalgamation of modified sample code.#include <unistd.h>
    Code:
    #include "mk20dx128.h"
    #include "usb_serial.h"
    #include "core_pins.h"
    
    extern "C" int main(void)
    {
    	// To use Teensy 3.0 without Arduino, simply put your code here.
    	// For example:
    
    	pinMode(13, OUTPUT);
    	while (1) {
    		digitalWriteFast(13, HIGH);
    		delay(500);
    		digitalWriteFast(13, LOW);
    		delay(500);
    	}
    }
    Makefile
    Code:
    TARGET = main
    OPTIONS = -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH
    
    ARDUINO_SDK  = /usr/local/arduino/
    PLATFORM     = $(ARDUINO_SDK)/hardware/teensy/cores/teensy3
    TOOLSPATH    = $(ARDUINO_SDK)/hardware/tools
    LIBRARYPATH  = $(ARDUINO_SDK)/libraries
    COMPILERPATH = $(TOOLSPATH)/arm-none-eabi/bin
    
    CPPFLAGS = -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD $(OPTIONS) -I. -I$(PLATFORM)
    CXXFLAGS = -std=gnu++0x -felide-constructors -fno-exceptions -fno-rtti
    CFLAGS =
    
    LDFLAGS = -Os -Wl,--gc-sections -mcpu=cortex-m4 -mthumb -T$(PLATFORM)/mk20dx128.ld
    LIBS = -lm
    
    CC = $(abspath $(COMPILERPATH))/arm-none-eabi-gcc
    CXX = $(abspath $(COMPILERPATH))/arm-none-eabi-g++
    OBJCOPY = $(abspath $(COMPILERPATH))/arm-none-eabi-objcopy
    SIZE = $(abspath $(COMPILERPATH))/arm-none-eabi-size
    
    C_FILES := $(wildcard *.c)
    CPP_FILES := $(wildcard *.cpp)
    OBJS := $(C_FILES:.c=.o) $(CPP_FILES:.cpp=.o)
    
    all: $(TARGET).hex
    
    $(TARGET).elf: $(OBJS) 
    	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(PLATFORM)/mk20dx128.ld
    
    %.hex: %.elf
    	$(SIZE) $<
    	$(OBJCOPY) -O ihex -R .eeprom $< $@
    	$(abspath $(TOOLSPATH))/teensy_post_compile -file=$(basename $@) -path=$(shell pwd) -tools=$(abspath $(TOOLSPATH))
    	-$(abspath $(TOOLSPATH))/teensy_reboot
    
    
    -include $(OBJS:.o=.d)
    
    clean:
    	rm -f *.o *.d $(TARGET).elf $(TARGET).hex
    Which results in:
    Code:
    /usr/local/arduino/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc -Os -Wl,--gc-sections -mcpu=cortex-m4 -mthumb -T/usr/local/arduino//hardware/teensy/cores/teensy3/mk20dx128.ld -o main.elf  main.o /usr/local/arduino//hardware/teensy/cores/teensy3/mk20dx128.ld
    /usr/local/arduino-1.0.4/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld:/usr/local/arduino//hardware/teensy/cores/teensy3/mk20dx128.ld:3: warning: redeclaration of memory region `FLASH'
    /usr/local/arduino-1.0.4/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld:/usr/local/arduino//hardware/teensy/cores/teensy3/mk20dx128.ld:4: warning: redeclaration of memory region `RAM'
    /usr/local/arduino//hardware/teensy/cores/teensy3/mk20dx128.ld:11 cannot move location counter backwards (from 000004d8 to 00000000)
    collect2: error: ld returned 1 exit status
    make: *** [main.elf] Error 1
    I'm assuming mk20dx128.ld to be a library build from hardware/tools/teensy3 source, and that it shouldn't be recompiled each and every time I build my project. Is that accurate? I've been able (after ripping out more of the windows make kludges) to get it to compile, but it doesn't run anything, and the hex filie is way smaller in relation to the elf file than I would normally expect. Anyone have Teensy3 stuff building for Linux/Makefile setup?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,026
    Quote Originally Posted by swarfrat View Post
    I'm assuming mk20dx128.ld to be a library build from hardware/tools/teensy3 source, and that it shouldn't be recompiled each and every time I build my project. Is that accurate?
    No, it's actually a linker script file. Think of it like command line parameters for the linker to tell it how to build the executable, except in a file instead of a giant list on the command line.


    I've been able (after ripping out more of the windows make kludges) to get it to compile, but it doesn't run anything, and the hex filie is way smaller in relation to the elf file than I would normally expect. Anyone have Teensy3 stuff building for Linux/Makefile setup?
    Maybe this is due to removing mk20dx128.c, which contains the necessary vector table and startup code?

    Does the example makefile work if you simply use it without modifications?

  3. #3
    It works, but only in the installed directory (in this case /usr/local/arduino-1.04/hardware/teensy/cores/teensy3). Thanks - that's helpful. I see now (with a bit o sleep and that clue I had missed) that this here isn't even the issue I'd been grappling with, but rather a simple path/build issue. I was trying to get my test case back to ALMOST as simple as the example, back to the first step that didn't work, and obscured the issue I was trying to debug in the process. But the last comment about vector table/startup I believe is still pertinent to the original issue.

    BTW - I can't find it now, but there is a version of teensy_loader_cli.c floating around the site with mk20dx128 support. But neither -w nor -r seem to work. It can't find the reboot vector, even if running sample code. Isn't -r supposed to kick the rebooter over if it's not already running the bootloader?

  4. #4
    http://www.pjrc.com/teensy/loader_cli.html version 2.0 doesn't look like it supports Teensy 3.0

    http://www.pjrc.com/teensy/beta/load_linux_only.c looks like it does Teensy 3.0, but linux-only.

    I think the teensy_loader_cli.c -r rebooter flag triggers a second properly-programmed teensy to toggle a pin on the teensy to be programmed.

  5. #5
    Junior Member
    Join Date
    May 2013
    Posts
    1
    I started with an Arduino Makefile and bent it to work with Teensy3.
    Enjoy

    Code:
    ifndef ARDUINODIR
    ARDUINODIR := $(firstword $(wildcard ~/opt/arduino /usr/share/arduino))
    endif
    
    # default arduino version
    ARDUINOCONST ?= 103
    
    # default hardware
    ifndef BOARD
    BOARD := teensy3
    endif
    
    # obtain board parameters from the arduino boards.txt file
    BOARDSFILE := $(ARDUINODIR)/hardware/teensy/boards.txt
    readboard = $(shell sed -ne "s/$(BOARD).$(1)=\(.*\)/\1/p" $(BOARDSFILE))
    BOARD_BUILD_MCU := $(call readboard,build.mcu)
    BOARD_BUILD_CPU := $(call readboard,build.cpu)
    BOARD_BUILD_OPTION1 := $(call readboard,build.option1)
    BOARD_BUILD_OPTION2 := $(call readboard,build.option2)
    BOARD_BUILD_OPTION3 := $(call readboard,build.option3)
    BOARD_BUILD_CPPOPTION1 := $(call readboard,build.cppoption1)
    BOARD_BUILD_CPPOPTION2 := $(call readboard,build.cppoption2)
    BOARD_BUILD_CPPOPTION3 := $(call readboard,build.cppoption3)
    BOARD_BUILD_LINKOPTION1 := $(call readboard,build.linkoption1)
    BOARD_BUILD_LINKSCRIPT := $(call readboard,build.linkscript)
    BOARD_BUILD_FCPU := $(call readboard,menu.speed.96.build.f_cpu)
    BOARD_BUILD_CORE := $(call readboard,build.core)
    BOARD_BUILD_ARCH := $(call readboard,build.architecture)
    BOARD_BUILD_CMD_GCC := $(call readboard,build.command.gcc)
    BOARD_BUILD_CMD_GPP := $(call readboard,build.command.g++)
    BOARD_BUILD_CMD_AR := $(call readboard,build.command.ar)
    BOARD_BUILD_CMD_OBJCOPY := $(call readboard,build.command.objcopy)
    BOARD_BUILD_CMD_OBJDUMP := $(call readboard,build.command.objdump)
    BOARD_BUILD_CMD_SIZE := $(call readboard,build.command.size)
    BOARD_UPLOAD_SPEED := $(call readboard,upload.speed)
    BOARD_UPLOAD_PROTOCOL := $(call readboard,upload.protocol)
    
    # default path for tools
    TOOLSPATH ?= $(subst :, , $(PATH)) $(ARDUINODIR)/hardware/tools \
    	$(ARDUINODIR)/hardware/tools/$(BOARD_BUILD_ARCH)/bin
    
    # auto mode?
    INOFILE := $(wildcard *.ino)
    
    # automatically determine sources and targeet
    TARGET := $(basename $(INOFILE))
    SOURCES := $(INOFILE) \
    	$(wildcard *.c *.cc *.cpp *.C) \
    	$(wildcard $(addprefix util/, *.c *.cc *.cpp *.C)) \
    	$(wildcard $(addprefix utility/, *.c *.cc *.cpp *.C))
    
    # automatically determine included libraries
    LIBRARIES := $(filter $(notdir $(wildcard $(addsuffix /*, $(LIBRARYPATH)))), \
    	$(shell sed -ne "s/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p" $(SOURCES)))
    
    # software
    findsoftware = $(firstword $(wildcard $(addsuffix /$(1), $(TOOLSPATH))))
    CC := $(call findsoftware,$(BOARD_BUILD_CMD_GCC))
    CXX := $(call findsoftware,$(BOARD_BUILD_CMD_GPP))
    LD := $(call findsoftware,$(BOARD_BUILD_CMD_LD))
    AR := $(call findsoftware,$(BOARD_BUILD_CMD_AR))
    OBJCOPY := $(call findsoftware,$(BOARD_BUILD_CMD_OBJCOPY))
    OBJDUMP := $(call findsoftware,$(BOARD_BUILD_CMD_OBJDUMP))
    OBJSIZE := $(call findsoftware,$(BOARD_BUILD_CMD_OBJSIZE))
    
    # directories
    COREDIR := $(ARDUINODIR)/hardware/teensy/cores/$(BOARD_BUILD_CORE)
    
    # files
    TARGET := $(if $(TARGET),$(TARGET),a.out)
    OBJECTS := $(addsuffix .o, $(basename $(SOURCES)))
    DEPFILES := $(patsubst %, .dep/%.dep, $(SOURCES))
    ARDUINOLIB := .lib/arduino.a
    ARDUINOLIBOBJS := $(foreach dir, $(COREDIR) $(LIBRARYDIRS), \
    	$(patsubst %, .lib/%.o, $(wildcard $(addprefix $(dir)/, *.c *.cpp))))
    
    # flags
    CPPFLAGS += -Os -Wall -ffunction-sections -fdata-sections
    CPPFLAGS += -funsigned-char -fshort-enums
    CPPFLAGS += -mcpu=$(BOARD_BUILD_CPU) $(LINKOPTION1)
    CPPFLAGS += $(BOARD_BUILD_OPTION1) $(BOARD_BUILD_OPTION2) $(BOARD_BUILD_OPTION3)
    CPPFLAGS += -DF_CPU=$(BOARD_BUILD_FCPU) -DARDUINO=$(ARDUINOCONST)
    CPPFLAGS += -DUSB_SERIAL -DLAYOUT_US_ENGLISH
    CPPFLAGS += -I. -I $(COREDIR) -I $(ARDUINODIR)/hardware/teensy/cores/$(BOARD_BUILD_CORE)
    CXXFLAGS += -std=gnu++0x -fno-exceptions -felide-constructors 
    CXXFLAGS += $(BOARD_BUILD_CPPOPTION1) $(BOARD_BUILD_CPPOPTION2) $(BOARD_BUILD_CPPOPTION3)
    CPPDEPFLAGS = -MMD -MP -MF .dep/$<.dep
    CPPINOFLAGS := -x c++ -include $(COREDIR)/Arduino.h
    LINKFLAGS += -Os -Wl,--gc-sections
    LINKFLAGS += -mcpu=$(BOARD_BUILD_CPU) $(BOARD_BUILD_LINKOPTION1) -T$(COREDIR)/$(BOARD_BUILD_LINKSCRIPT)
    
    # include dependencies
    ifneq "$(MAKECMDGOALS)" "clean"
    -include $(DEPFILES)
    endif
    
    # default rule
    .DEFAULT_GOAL := all
    
    # targets
    .PHONY:	all target flash clean boards monitor size
    
    all: target
    
    target: $(TARGET).hex
    
    flash: target
    	@echo "Uploading to board..."
    	../loader/loader -mmcu=$(BOARD_BUILD_MCU) -w -v $(TARGET).hex
    
    clean:
    	rm -f $(OBJECTS)
    	rm -f $(TARGET).elf $(TARGET).hex $(ARDUINOLIB) *~
    	rm -rf .lib .dep
    
    boards:
    	@echo "Available values for BOARD:"
    	@sed -nEe '/^#/d; /^[^.]+\.name=/p' $(BOARDSFILE) | \
    		sed -Ee 's/([^.]+)\.name=(.*)/\1            \2/' \
    			-e 's/(.{12}) *(.*)/\1 \2/'
    
    monitor:
    	picocom -c /dev/ttyACM0
    
    size: $(TARGET).elf
    	echo && $(OBJSIZE) --format=avr --mcu=$(BOARD_BUILD_MCU) $(TARGET).elf
    
    # building the target
    
    $(TARGET).hex: $(TARGET).elf
    	$(OBJCOPY) -O ihex -R .eeprom $< $@
    
    $(TARGET).elf: $(ARDUINOLIB) $(OBJECTS)
    	$(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
    
    %.o: %.c
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.c) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.cpp
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.cc
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.C
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.ino
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
    
    # building the arduino library
    
    $(ARDUINOLIB): $(ARDUINOLIBOBJS)
    	$(AR) rcs $@ $?
    
    .lib/%.c.o: %.c
    	mkdir -p $(dir $@)
    	$(COMPILE.c) -o $@ $<
    
    .lib/%.cpp.o: %.cpp
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<
    
    .lib/%.cc.o: %.cc
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<
    
    .lib/%.C.o: %.C
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<

  6. #6
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    I'm having trouble getting my program to compile with the makefile

    Here's my version:
    Code:
    ifndef ARDUINODIR
    ARDUINODIR := $(firstword $(wildcard ~/arduino17))
    endif
    
    # default arduino version
    ARDUINOCONST ?= 105
    
    # default hardware
    ifndef BOARD
    BOARD := teensy3
    endif
    
    # obtain board parameters from the arduino boards.txt file
    BOARDSFILE := $(ARDUINODIR)/hardware/teensy/boards.txt
    readboard = $(shell sed -ne "s/$(BOARD).$(1)=\(.*\)/\1/p" $(BOARDSFILE))
    BOARD_BUILD_MCU := $(call readboard,build.mcu)
    BOARD_BUILD_CPU := $(call readboard,build.cpu)
    BOARD_BUILD_OPTION1 := $(call readboard,build.option1)
    BOARD_BUILD_OPTION2 := $(call readboard,build.option2)
    BOARD_BUILD_OPTION3 := $(call readboard,build.option3)
    BOARD_BUILD_CPPOPTION1 := $(call readboard,build.cppoption1)
    BOARD_BUILD_CPPOPTION2 := $(call readboard,build.cppoption2)
    BOARD_BUILD_CPPOPTION3 := $(call readboard,build.cppoption3)
    BOARD_BUILD_LINKOPTION1 := $(call readboard,build.linkoption1)
    BOARD_BUILD_LINKSCRIPT := $(call readboard,build.linkscript)
    BOARD_BUILD_FCPU := $(call readboard,menu.speed.96.build.f_cpu)
    BOARD_BUILD_CORE := $(call readboard,build.core)
    BOARD_BUILD_ARCH := $(call readboard,build.architecture)
    BOARD_BUILD_CMD_GCC := $(call readboard,build.command.gcc)
    BOARD_BUILD_CMD_GPP := $(call readboard,build.command.g++)
    BOARD_BUILD_CMD_AR := $(call readboard,build.command.ar)
    BOARD_BUILD_CMD_OBJCOPY := $(call readboard,build.command.objcopy)
    BOARD_BUILD_CMD_OBJDUMP := $(call readboard,build.command.objdump)
    BOARD_BUILD_CMD_SIZE := $(call readboard,build.command.size)
    BOARD_UPLOAD_SPEED := $(call readboard,upload.speed)
    BOARD_UPLOAD_PROTOCOL := $(call readboard,upload.protocol)
    
    # obtain preferences from the IDE's preferences.txt
    PREFERENCESFILE := $(firstword $(wildcard \
    	$(HOME)/.arduino/preferences.txt $(HOME)/Library/Arduino/preferences.txt))
    ifneq "$(PREFERENCESFILE)" ""
    readpreferencesparam = $(shell sed -ne "s/$(1)=\(.*\)/\1/p" $(PREFERENCESFILE))
    SKETCHBOOKDIR := $(call readpreferencesparam,sketchbook.path)
    endif
    
    # default path to find libraries
    LIBRARYPATH ?= $(SKETCHBOOKDIR)/libraries $(ARDUINODIR)/libraries
    
    # default path for tools
    TOOLSPATH ?= $(subst :, , $(PATH)) $(ARDUINODIR)/hardware/tools \
    	$(ARDUINODIR)/hardware/tools/$(BOARD_BUILD_ARCH)/bin
    
    # auto mode?
    INOFILE := $(wildcard *.ino)
    
    # automatically determine sources and target
    TARGET := $(basename $(INOFILE))
    SOURCES := $(INOFILE) \
    	$(wildcard *.c *.cc *.cpp *.C) \
    	$(wildcard $(addprefix util/, *.c *.cc *.cpp *.C)) \
    	$(wildcard $(addprefix utility/, *.c *.cc *.cpp *.C))
    
    # automatically determine included libraries
    LIBRARIES := $(filter $(notdir $(wildcard $(addsuffix /*, $(LIBRARYPATH)))), \
    	$(shell sed -ne "s/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p" $(SOURCES)))
    
    # software
    findsoftware = $(firstword $(wildcard $(addsuffix /$(1), $(TOOLSPATH))))
    CC := $(call findsoftware,$(BOARD_BUILD_CMD_GCC))
    CXX := $(call findsoftware,$(BOARD_BUILD_CMD_GPP))
    LD := $(call findsoftware,$(BOARD_BUILD_CMD_LD))
    AR := $(call findsoftware,$(BOARD_BUILD_CMD_AR))
    OBJCOPY := $(call findsoftware,$(BOARD_BUILD_CMD_OBJCOPY))
    OBJDUMP := $(call findsoftware,$(BOARD_BUILD_CMD_OBJDUMP))
    OBJSIZE := $(call findsoftware,$(BOARD_BUILD_CMD_OBJSIZE))
    
    # directories
    COREDIR := $(ARDUINODIR)/hardware/teensy/cores/$(BOARD_BUILD_CORE)
    LIBRARYDIRS := $(foreach lib, $(LIBRARIES), \
    	$(firstword $(wildcard $(addsuffix /$(lib), $(LIBRARYPATH)))))
    LIBRARYDIRS += $(addsuffix /utility, $(LIBRARYDIRS))
    
    # files
    TARGET := $(if $(TARGET),$(TARGET),a.out)
    OBJECTS := $(addsuffix .o, $(basename $(SOURCES)))
    DEPFILES := $(patsubst %, .dep/%.dep, $(SOURCES))
    ARDUINOLIB := .lib/arduino.a
    ARDUINOLIBOBJS := $(foreach dir, $(COREDIR) $(LIBRARYDIRS), \
    	$(patsubst %, .lib/%.o, $(wildcard $(addprefix $(dir)/, *.c *.cpp))))
    
    # flags
    CPPFLAGS += -Os -Wall -ffunction-sections -fdata-sections
    CPPFLAGS += -funsigned-char -fshort-enums
    CPPFLAGS += -mcpu=$(BOARD_BUILD_CPU) $(LINKOPTION1)
    CPPFLAGS += $(BOARD_BUILD_OPTION1) $(BOARD_BUILD_OPTION2) $(BOARD_BUILD_OPTION3)
    CPPFLAGS += -DF_CPU=$(BOARD_BUILD_FCPU) -DARDUINO=$(ARDUINOCONST)
    CPPFLAGS += -DUSB_SERIAL -DLAYOUT_US_ENGLISH
    CPPFLAGS += -I. -I $(COREDIR) -I $(ARDUINODIR)/hardware/teensy/cores/$(BOARD_BUILD_CORE)
    CXXFLAGS += -std=gnu++0x -fno-exceptions -felide-constructors 
    CXXFLAGS += $(BOARD_BUILD_CPPOPTION1) $(BOARD_BUILD_CPPOPTION2) $(BOARD_BUILD_CPPOPTION3)
    CPPDEPFLAGS = -MMD -MP -MF .dep/$<.dep
    CPPINOFLAGS := -x c++ -include $(COREDIR)/Arduino.h
    LINKFLAGS += -Os -Wl,--gc-sections
    LINKFLAGS += -mcpu=$(BOARD_BUILD_CPU) $(BOARD_BUILD_LINKOPTION1) -T$(COREDIR)/$(BOARD_BUILD_LINKSCRIPT)
    
    # include dependencies
    ifneq "$(MAKECMDGOALS)" "clean"
    -include $(DEPFILES)
    endif
    
    # default rule
    .DEFAULT_GOAL := all
    
    # targets
    .PHONY:	all target flash clean boards monitor size
    
    all: target
    
    target: $(TARGET).hex
    
    flash: target
    	@echo "Uploading to board..."
    	../loader/loader -mmcu=$(BOARD_BUILD_MCU) -w -v $(TARGET).hex
    
    clean:
    	rm -f $(OBJECTS)
    	rm -f $(TARGET).elf $(TARGET).hex $(ARDUINOLIB) *~
    	rm -rf .lib .dep
    
    boards:
    	@echo "Available values for BOARD:"
    	@sed -nEe '/^#/d; /^[^.]+\.name=/p' $(BOARDSFILE) | \
    		sed -Ee 's/([^.]+)\.name=(.*)/\1            \2/' \
    			-e 's/(.{12}) *(.*)/\1 \2/'
    
    monitor:
    	picocom -c /dev/ttyACM0
    
    size: $(TARGET).elf
    	echo && $(OBJSIZE) --format=avr --mcu=$(BOARD_BUILD_MCU) $(TARGET).elf
    
    # building the target
    
    $(TARGET).hex: $(TARGET).elf
    	$(OBJCOPY) -O ihex -R .eeprom $< $@
    
    $(TARGET).elf: $(ARDUINOLIB) $(OBJECTS)
    	$(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
    
    %.o: %.c
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.c) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.cpp
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.cc
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.C
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
    
    %.o: %.ino
    	mkdir -p .dep/$(dir $<)
    	$(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
    
    # building the arduino library
    
    $(ARDUINOLIB): $(ARDUINOLIBOBJS)
    	$(AR) rcs $@ $?
    
    .lib/%.c.o: %.c
    	mkdir -p $(dir $@)
    	$(COMPILE.c) -o $@ $<
    
    .lib/%.cpp.o: %.cpp
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<
    
    .lib/%.cc.o: %.cc
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<
    
    .lib/%.C.o: %.C
    	mkdir -p $(dir $@)
    	$(COMPILE.cpp) -o $@ $<
    and when I try to compile using make I get:
    Code:
    jimm@deb-main:~/sketchbook/TeensyNet_WIZ_LCD$ make clean
    rm -f TeensyNet_WIZ_LCD.o
    rm -f TeensyNet_WIZ_LCD.elf TeensyNet_WIZ_LCD.hex .lib/arduino.a *~
    rm -rf .lib .dep
    jimm@deb-main:~/sketchbook/TeensyNet_WIZ_LCD$ make
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/analog.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/analog.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/eeprom.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/eeprom.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/keylayouts.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/keylayouts.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/math_helper.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/math_helper.c
    In file included from /home/jimm/arduino17/hardware/teensy/cores/teensy3/math_helper.h:33:0,
                     from /home/jimm/arduino17/hardware/teensy/cores/teensy3/math_helper.c:39:
    /home/jimm/arduino17/hardware/teensy/cores/teensy3/arm_math.h: In function 'arm_pid_q15':
    /home/jimm/arduino17/hardware/teensy/cores/teensy3/arm_math.h:5329:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/mk20dx128.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/mk20dx128.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/nonstd.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/nonstd.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/pins_teensy.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/pins_teensy.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/serial1.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/serial1.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/serial2.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/serial2.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/serial3.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/serial3.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/touch.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/touch.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_desc.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_desc.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_dev.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_dev.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_joystick.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_joystick.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_keyboard.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_keyboard.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_mem.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_mem.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_midi.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_midi.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_mouse.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_mouse.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_rawhid.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_rawhid.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_seremu.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_seremu.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_serial.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_serial.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc  -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/yield.c.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/yield.c
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/AudioStream.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/AudioStream.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/avr_emulation.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/avr_emulation.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial1.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial1.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial2.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial2.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial3.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/HardwareSerial3.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/IntervalTimer.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/IntervalTimer.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/IPAddress.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/IPAddress.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/main.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/main.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/Print.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/Print.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/Stream.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/Stream.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/Tone.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/Tone.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_flightsim.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_flightsim.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_inst.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/usb_inst.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/WMath.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/WMath.cpp
    mkdir -p .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/hardware/teensy/cores/teensy3/WString.cpp.o /home/jimm/arduino17/hardware/teensy/cores/teensy3/WString.cpp
    mkdir -p .lib//home/jimm/sketchbook/libraries/PID_v1/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/sketchbook/libraries/PID_v1/PID_v1.cpp.o /home/jimm/sketchbook/libraries/PID_v1/PID_v1.cpp
    mkdir -p .lib//home/jimm/arduino17/libraries/EEPROM/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/libraries/EEPROM/EEPROM.cpp.o /home/jimm/arduino17/libraries/EEPROM/EEPROM.cpp
    mkdir -p .lib//home/jimm/arduino17/libraries/OneWire/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/libraries/OneWire/OneWire.cpp.o /home/jimm/arduino17/libraries/OneWire/OneWire.cpp
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::reset()':
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp:139:14: warning: unused variable 'mask' [-Wunused-variable]
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)':
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp:173:14: warning: unused variable 'mask' [-Wunused-variable]
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::read_bit()':
    /home/jimm/arduino17/libraries/OneWire/OneWire.cpp:201:14: warning: unused variable 'mask' [-Wunused-variable]
    mkdir -p .lib//home/jimm/arduino17/libraries/SPI/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/libraries/SPI/SPI.cpp.o /home/jimm/arduino17/libraries/SPI/SPI.cpp
    mkdir -p .lib//home/jimm/arduino17/libraries/Ethernet/
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp.o /home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp
    In file included from /home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp:4:0:
    /home/jimm/arduino17/libraries/Ethernet/utility/w5100.h:14:17: fatal error: SPI.h: No such file or directory
    compilation terminated.
    make: *** [.lib//home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp.o] Error 1
    The code compile fine with the IDE, so I'm obviously missing something, any help?

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,026
    Please try the latest from github. I recently fixed that typo and other issues.

    https://github.com/PaulStoffregen/cores/

    I'm planning to publish 1.17-rc2 soon, and hopefully a final 1.17 release within the next couple weeks.

  8. #8
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Same error
    Code:
    /home/jimm/arduino17/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ -std=gnu++0x -fno-exceptions -felide-constructors  -fno-rtti   -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -fshort-enums -mcpu=cortex-m4  -mthumb -nostdlib -D__MK20DX128__ -DF_CPU=96000000 -DARDUINO=105 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -I /home/jimm/arduino17/hardware/teensy/cores/teensy3 -I /home/jimm/arduino17/hardware/teensy/cores/teensy3  -c -o .lib//home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp.o /home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp
    In file included from /home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp:4:0:
    /home/jimm/arduino17/libraries/Ethernet/utility/w5100.h:14:17: fatal error: SPI.h: No such file or directory
    compilation terminated.
    make: *** [.lib//home/jimm/arduino17/libraries/Ethernet/Dhcp.cpp.o] Error 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •