Go to file
Markus Hitter 072e3f8ae5 ARM: also set GPIO function and mode.
This also implements more of the FastIO infrastructure.
Unfortunately, definitions aren't exactly straightforward, so we
need lots of tabular data. For example, for the pin function I
I had to step through the user manual, pin by pin.

We also learned a lesson here: Cortex-M0 has a 4 word ( = 16 bytes)
prefetch engine. Loops not starting at such a boundary take
additional 4 clock cycles, making them slower. The tight loop used
for testing previously happened to be 16-byte aligne by accident.
Adding just one line of code in the SET_OUTPUT() macro misaligned
it, so loop repetition rate dropped from 5.3 MHz to 3.7 MHz.

There are many measures to align code to 16-byte boundaries:

 - -falign-functions=16 as gcc flag.

 - -falign-loops=16 as gcc flag, found to not work.

 - -falign-labels=16 as gcc flag, worked for aligning the loop,
   but also bloated the binary by 10%.

 - __attribute__ ((aligned(16))) attached to functions (not
   tested)

 - Adding this just before the loop worked fine and increased the
   binary by just 16 bytes:

     __ASM (".balign 16");

Take care of this when relying on exact execution times, e.g. when
implementing delay_us()!
2015-08-12 14:26:35 +02:00
attic SD card: store sample code for the hardware layer. 2015-07-05 23:32:48 +02:00
config SD card: commit SD_CARD_SELECT_PIN to all the board files. 2015-07-30 15:31:57 +02:00
configtool boardpanel.py: fix getCPUInfo(), don't report tuples. 2015-08-12 14:18:40 +02:00
extruder pinio.h: remove TOGGLE(), GET_INPUT(), GET_OUTPUT() macros. 2015-08-12 14:26:35 +02:00
research Add gnuplot script to explore simulator output 2013-12-06 19:24:58 +01:00
simulator Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
testcases run-in-simulavr.sh: report LED on time in clocks instead of ns. 2015-08-04 23:03:51 +02:00
tools Tools: add git-regtest. 2015-07-30 17:15:57 +02:00
.gitattributes Enforce Unix line endings (LF). 2015-02-04 00:10:37 +01:00
.gitignore .gitignore: make room for private stuff. 2015-08-04 13:48:30 +02:00
Doxyfile Remove LUFA. 2012-12-03 19:48:54 +01:00
LICENSE licensing- GPL-2 at the moment 2010-10-20 18:15:09 +11:00
Makefile-ARM ARM: get sersendf.c/.h in. 2015-08-12 14:26:34 +02:00
Makefile-AVR Makefiles: add a hint on how to list these predefined macros. 2015-08-12 14:26:34 +02:00
Makefile-SIM Makefiles: add a hint on how to list these predefined macros. 2015-08-12 14:26:34 +02:00
Makefile-common SD card: commit SD_CARD_SELECT_PIN to all the board files. 2015-07-30 15:31:57 +02:00
Makefile-example Makefile-example: add shortcut targets. 2015-07-17 13:29:22 +02:00
README Makefiles: adjust comments. 2015-04-21 02:51:31 +02:00
README.sim Teach simulator to process gcode files directly 2013-12-06 19:24:58 +01:00
Teacup_Firmware.pde arduino ide: .pde must have the same name as the folder. 2011-02-27 22:08:41 +01:00
analog.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
analog.h analog.h: document and clean up. 2015-05-11 01:17:25 +02:00
arduino.h ARM: get FastIO for writing into place. 2015-08-12 14:26:34 +02:00
arduino_32U4.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arduino_168_328p.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arduino_644.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arduino_1280.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arduino_lpc1114.h ARM: also set GPIO function and mode. 2015-08-12 14:26:35 +02:00
arduino_usb1286.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arduino_usb1287.h SD card: establish spi.c/.h and sd.c/.h and get SPI running. 2015-07-05 23:32:46 +02:00
arm-lpc1114.ld ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
arm-startup_lpc11xx.s ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
calc.pl setting up new branch 2 2010-08-10 14:26:24 +10:00
clock.c clock.c: make stuff used only in clock.c static to this file. 2015-08-01 16:22:10 +02:00
clock.h clock.c: make stuff used only in clock.c static to this file. 2015-08-01 16:22:10 +02:00
config.default.h Configtool: convert template for Teensy++ 2.0. 2015-04-21 02:51:31 +02:00
config_wrapper.h config_wrapper.h: move #include "arduino.h" here. 2015-05-30 18:40:05 +02:00
configtool.default.ini Configtool: move thermistor presets into distribution file. 2015-05-20 23:31:38 +02:00
configtool.py Configtool: work around a URL-open bug on some Linuxes. 2015-07-01 16:42:38 +02:00
cpu-arm.c ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
cpu-avr.c ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
cpu.c ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
cpu.h ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
crc.c Replace SIMULATOR with __AVR__ in several places. 2015-07-29 21:05:38 +02:00
crc.h use CRC16 to verify heater PID settings in eeprom 2011-02-20 17:13:09 +11:00
createTemperatureLookup.py createTemperatureLookup.py: deal with precision limitation on R0. 2015-04-21 02:51:32 +02:00
dda.c Replace SIMULATOR with __AVR__ in several places. 2015-07-29 21:05:38 +02:00
dda.h Solve the pgmspace.h problem centrally. 2015-08-12 14:26:34 +02:00
dda_kinematics.c CoreXY, dda_kinematics.c/.h: introduce KINEMATICS_COREXY. 2014-12-26 19:41:37 +01:00
dda_kinematics.h CoreXY, dda_kinematics.c/.h: introduce KINEMATICS_COREXY. 2014-12-26 19:41:37 +01:00
dda_lookahead.c dda_lookahead.c: remove unused code. 2015-07-30 23:14:01 +02:00
dda_lookahead.h Add config.h wrapper to simplify test automation 2014-03-04 19:56:23 +01:00
dda_maths.c Rename all these new PROGMEM variables to end in _P. 2014-08-31 19:05:25 +02:00
dda_maths.h DDA: have an acceleration constant for each axis individually. 2014-08-31 19:10:14 +02:00
dda_queue.c Messages: more newlines needed. 2015-08-07 16:15:17 +02:00
dda_queue.h Remove __attribute__((hot)). 2014-03-04 19:56:13 +01:00
debug.c setting up new branch 2 2010-08-10 14:26:24 +10:00
debug.h Configtool: don't make DEBUG configuration user-visible. 2015-05-08 20:38:23 +02:00
delay.c delay.c: delay_us() and delay_ms() are now calibrated. 2015-04-28 13:05:21 +02:00
delay.h delay.h: re-add falsely removed #include. 2013-03-24 16:19:25 +01:00
extract.py Added gcode documentation and extraction tool 2011-06-03 02:02:46 +10:00
func.sh func.sh: Fix a potential infinite loop in mendel_readsym_target 2011-05-08 00:36:55 +10:00
gcode_parse.c Serial: postpone sending "ok" until a slot is free. 2015-08-04 23:03:51 +02:00
gcode_parse.h Fix typos: "whether" and whitespace. 2015-07-17 16:16:42 +02:00
gcode_process.c gcode_process.c: replace some sersendf() with serial_writestr(). 2015-08-07 16:16:05 +02:00
gcode_process.h G-code parser: move gcode_source stuff ... 2015-07-17 13:31:10 +02:00
graycode.c disable greycode by default in arduino IDE 2011-02-17 21:52:15 +11:00
heater.c Solve the pgmspace.h problem centrally. 2015-08-12 14:26:34 +02:00
heater.h heater.c/.h: get rid of heaters_all_off(). 2015-08-07 16:16:05 +02:00
home.c home.c, dda.c: consider endstops on both axis ends when homing. 2015-01-09 13:11:01 +01:00
home.h Fixed single inclusion of file. Added missing define. 2011-08-16 14:09:49 +02:00
intercom.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
intercom.h Add config.h wrapper to simplify test automation 2014-03-04 19:56:23 +01:00
mbed-LPC11xx.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
mbed-PinNames.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
mbed-bitfields.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
mbed-cmsis.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
mbed-cmsis_nvic.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
mbed-core_cm0.h ARM: get rid of mbed-core_cmFunc.h and mbed-core_cmInstr.h. 2015-08-12 14:26:34 +02:00
mbed-pinmap.c ARM: get rid of mbed-mbed_error.h and mbed-error.c. 2015-08-12 14:26:34 +02:00
mbed-pinmap.h ARM: simplify serial and get rid of mbed-pinmap_common.c. 2015-08-12 14:26:34 +02:00
mbed-system_LPC11xx.c ARM: silence warning in mbed-system_LPC11xx.c. 2015-08-12 14:26:34 +02:00
mbed-system_LPC11xx.h ARM: get serial working based on MBED code. 2015-08-12 14:26:34 +02:00
memory_barrier.h Replace SIMULATOR with __AVR__ in several places. 2015-07-29 21:05:38 +02:00
mendel.c ARM: get FastIO for writing into place. 2015-08-12 14:26:34 +02:00
mendel_cmd Merge release-candidate-triffid branch 2011-01-07 23:09:13 +11:00
pff.c SD card: move parsing closer to the metal. 2015-07-17 13:31:03 +02:00
pff.h Add simulator SD card (and SPI, PFF) support. 2015-07-17 16:02:59 +02:00
pff_conf.h SD card: measures sizes and additionally enable FAT32 support. 2015-07-07 19:07:37 +02:00
pff_diskio.c Fix typos: "whether" and whitespace. 2015-07-17 16:16:42 +02:00
pff_diskio.h SD card: move parsing closer to the metal. 2015-07-17 13:31:03 +02:00
pinio.c DDA: Move axis calculations into loops, part 6b. 2014-08-31 19:07:59 +02:00
pinio.h ARM: also set GPIO function and mode. 2015-08-12 14:26:35 +02:00
preprocessor_math.h preprocessor_math.h: fix errorneous comment. 2014-08-31 19:32:09 +02:00
sd.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
sd.h SD card: don't read into a buffer, parse directly instead. 2015-07-17 13:30:55 +02:00
sender-mac.sh sender-mac.sh: another minor fix. 2011-09-30 21:02:25 +02:00
sender.sh sender.sh: Allow for "ok" to be surrounded by DEBUG output. 2011-03-04 19:42:00 +11:00
serial-arm.c ARM: move serial handling code directly into serial-arm.c. 2015-08-12 14:26:34 +02:00
serial-avr.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
serial.c ARM: get a minimum amount of Teacup compiled for ARM. 2015-08-12 14:26:33 +02:00
serial.h Solve the pgmspace.h problem centrally. 2015-08-12 14:26:34 +02:00
sermsg.c sermesg.c: Add documentation tag for variable floating point. 2014-08-31 19:07:21 +02:00
sermsg.h M114 returns millimeters instead of steps 2011-04-26 14:44:17 +10:00
sersendf.c sersendf.c/.h: remove sersendf() (not sersendf_P()). 2015-08-12 14:26:34 +02:00
sersendf.h sersendf.c/.h: remove sersendf() (not sersendf_P()). 2015-08-12 14:26:34 +02:00
simulator.h Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
spi.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
spi.h Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
temp.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
temp.h temp.h: remove indirection temp_tick(). 2015-04-21 02:51:31 +02:00
timer.c Move pin I/O macros from arduino.h to pinio.h. 2015-08-12 14:26:34 +02:00
timer.h timer.h: remove some obsolete stuff, replace char with uint8_t. 2015-08-03 12:11:19 +02:00
usb_serial.c Add config.h wrapper to simplify test automation 2014-03-04 19:56:23 +01:00
usb_serial.h Import USB Serial from http://www.pjrc.com/teensy/usb_serial.html 2012-11-08 16:36:48 +01:00
watchdog.c According to avr-libc documentation, ISR() handles SREG its self. 2013-10-27 20:01:51 +01:00
watchdog.h Add config.h wrapper to simplify test automation 2014-03-04 19:56:23 +01:00

README

##############################################################################
#                                                                            #
# Teacup - lean and efficient firmware for RepRap printers                   #
#                                                                            #
# by Triffid Hunter, Traumflug, jakepoz, many others.                        #
#                                                                            #
##############################################################################

For installation instructions, see
http://reprap.org/wiki/Teacup_Firmware#Simple_Installation and/or
http://reprap.org/wiki/Teacup_Firmware#Developer_Installation

For documentation, see
http://reprap.org/wiki/Teacup_Firmware


##############################################################################
#                                                                            #
# This firmware is Copyright (c) ...                                         #
#   2009 - 2010 Michael Moon aka Triffid_Hunter                              #
#   2010 - 2013 Markus "Traumflug" Hitter <mah@jump-ing.de>                  #
#                                                                            #
# This program is free software; you can redistribute it and/or modify       #
# it under the terms of the GNU General Public License as published by       #
# the Free Software Foundation; either version 2 of the License, or          #
# (at your option) any later version.                                        #
#                                                                            #
# This program is distributed in the hope that it will be useful,            #
# but WITHOUT ANY WARRANTY; without even the implied warranty of             #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
# GNU General Public License for more details.                               #
#                                                                            #
# You should have received a copy of the GNU General Public License          #
# along with this program; if not, write to the Free Software                #
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA #
#                                                                            #
##############################################################################