I'm sort of astonished that every post out there concerning C compilation for the Teensy 3.0 says some variation on, "Just look at the makefile comments." Well I did, and this is what I think should work (last half of the makefile remains unaltered):
In the standard installation of Teensyduino, in the /hardware/teensy/cores/teensy3/ directory, I run "make" (which points to /hardware/tools/arm-none-eabi/bin/ from my PATH variable). Here's where the weirdness starts.
Upon first run, I get this: http://pastebin.com/aWFmpJDR
There's an error at the end, but the hex file gets created correctly, I upload it with the teensy loader, and my teensy 3.0 starts blinking correctly. Great.
I can then go in and delete all the .o, .d, and the elf and hex files (essentially what 'make clean' does right?) and run 'make' again. This time, I get:
After that, it doesn't matter what main.cpp contains, I will get this error.
Besides this method of compiling, the closest I've come is using the Coocox CoIDE. When I Build, the console always ends with "BUILD SUCCESSFUL" but my hex files are essentially empty (two lines), no matter the code in my main.c.
I don't mind any method of compilation if it works. I've been through tutorials for setting up CoIDE, Eclipse w/ some plugins, Visual Studio, etc, etc and have not been able to cross the finish line.
ANY and ALL insight into my issue(s) would be appreciated!!!
Code:
# The name of your project (used to name the compiled .hex file)
TARGET = main
# configurable options
OPTIONS = -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH
# options needed by many Arduino libraries to configure for Teensy 3.0
OPTIONS += -D__MK20DX128__ -DARDUIO=104
#************************************************************************
# Location of Teensyduino utilities, Toolchain, and Arduino Libraries.
# To use this makefile without Arduino, copy the resources from these
# locations and edit the pathnames. The rest of Arduino is not needed.
#************************************************************************
# path location for Teensy Loader, teensy_post_compile and teensy_reboot
#TOOLSPATH = ../../../tools # on Linux
TOOLSPATH = E:\Program Files (x86)\Arduino\hardware\tools\avr\bin
# path location for Arduino libraries (currently not used)
#LIBRARYPATH = ../../../../libraries
# path location for the arm-none-eabi compiler
COMPILERPATH = E:\Program Files (x86)\Arduino\hardware\tools\arm-none-eabi\bin
In the standard installation of Teensyduino, in the /hardware/teensy/cores/teensy3/ directory, I run "make" (which points to /hardware/tools/arm-none-eabi/bin/ from my PATH variable). Here's where the weirdness starts.
Upon first run, I get this: http://pastebin.com/aWFmpJDR
There's an error at the end, but the hex file gets created correctly, I upload it with the teensy loader, and my teensy 3.0 starts blinking correctly. Great.
I can then go in and delete all the .o, .d, and the elf and hex files (essentially what 'make clean' does right?) and run 'make' again. This time, I get:
Code:
E:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy3>make
E:/Program Files (x86)/Arduino/hardware/teensy/cores/teensy3/E:\Program E:/Program Files (x86)/Arduino/hardware/teensy/cores/teensy3/Files E:/Program Files (x86)/Arduino/hardware/teensy/cores/teensy3/
(x86)\Arduino\hardware\tools\arm-none-eabi\bin/arm-none-eabi-gcc -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -D__MK20DX128__ -DARDUIO=104 -I.
-c -o analog.o analog.c
process_begin: CreateProcess(NULL, E:/Program Files (x86)/Arduino/hardware/teensy/cores/teensy3/E:\Program E:/Program Files (x86)/Arduino/hardware/teensy/cores/teensy3/Files E:/Program Files (x86)/Ard
uino/hardware/teensy/cores/teensy3/(x86)\Arduino\hardware\tools\arm-none-eabi\bin/arm-none-eabi-gcc -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLIS
H -D__MK20DX128__ -DARDUIO=104 -I. -c -o analog.o analog.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [analog.o] Error 2
Besides this method of compiling, the closest I've come is using the Coocox CoIDE. When I Build, the console always ends with "BUILD SUCCESSFUL" but my hex files are essentially empty (two lines), no matter the code in my main.c.
I don't mind any method of compilation if it works. I've been through tutorials for setting up CoIDE, Eclipse w/ some plugins, Visual Studio, etc, etc and have not been able to cross the finish line.
ANY and ALL insight into my issue(s) would be appreciated!!!