xxxajk
Well-known member
Here is the compile results of the Blink example using the Arduino IDE with teensyduino installed:
Can we do better? Yes we can!
How is this possible? It all has to do with updating one set of tools, and linking things properly.
Basically there are a whole bunch of variables, unused routines, and even unused code sections linked into your program, even though the linker is told to throw them out, because they were explicitly contained in the object files linked. Hopefully Paul will fix this in the future...
1: You will need to recompile your tools and install them over the top of your install. You can get it here: https://github.com/xxxajk/ARM-Toolchain
2: install this where you have your sketches (see the readme) https://github.com/xxxajk/Arduino_Makefile_master
3: Use create a Makefile containing the following, and change BOARD to teensy3 if you are using that.:
then type make and you can see the results for your self.
Note: This has been tested on Linux, will be tested on MacOS fairly soon, and should work on Windows if you got Cygwin installed.
Code:
text data bss dec hex filename
12776 1460 1992 16228 3f64 /tmp/build9046952037514765870.tmp/Blink.cpp.elf
Can we do better? Yes we can!
Code:
text data bss dec hex filename
5568 164 1444 7176 1c08 build/Blink.elf
How is this possible? It all has to do with updating one set of tools, and linking things properly.
Basically there are a whole bunch of variables, unused routines, and even unused code sections linked into your program, even though the linker is told to throw them out, because they were explicitly contained in the object files linked. Hopefully Paul will fix this in the future...
1: You will need to recompile your tools and install them over the top of your install. You can get it here: https://github.com/xxxajk/ARM-Toolchain
2: install this where you have your sketches (see the readme) https://github.com/xxxajk/Arduino_Makefile_master
3: Use create a Makefile containing the following, and change BOARD to teensy3 if you are using that.:
Code:
BOARD = teensy31
# set your Arduino tty port here
PORT = /dev/ttyACM0
# And finally, the part that brings everything together for you.
include ../Arduino_Makefile_master/_Makefile.master
then type make and you can see the results for your self.
Note: This has been tested on Linux, will be tested on MacOS fairly soon, and should work on Windows if you got Cygwin installed.