Commit Graph

19 Commits

Author SHA1 Message Date
Markus Hitter ce40b678f6 Solve the pgmspace.h problem centrally.
We previously put replacements for the von Neuman architecture
into arduino.h already, now let's complete this by having only
one #include <avr/pgmspace.h> in arduino.h. Almost all sources
include arduino.h anyways, so this is mostly a code reduction.
2015-08-12 14:26:34 +02:00
Markus Hitter 575174940f ARM: get a minimum amount of Teacup compiled for ARM.
Makefile can't even upload, yet.

    SIZES          ARM...     lpc1114
    FLASH  :   944 bytes           3%
    RAM    :   132 bytes           4%
    EEPROM :     0 bytes           0%
2015-08-12 14:26:33 +02:00
Phil Hord c7150445af Zungmann's fixes to compile simulator on Mac OS X, part 2.
Here: .bss section syntax is different.
2014-03-04 19:57:48 +01:00
Phil Hord 452e2e5cd9 Restore simulation build target.
This code was accidentally removed long ago in a botched merge. This
patch recovers it and makes it build again. I've done minimal testing
and some necessary cleanup. It compiles and runs, but it probably still
has a few dust bunnies here and there.

I added registers and pin definitions to simulator.h and
simulator/simulator.c which I needed to match my Gen7-based config.
Other configs or non-AVR ports will need to define more or different
registers. Some registers are 16-bits, some are 8-bit, and some are just
constant values (enums). A more clever solution would read in the
chip-specific header and produce saner definitions which covered all
GPIOs. But this commit just takes the quick and easy path to support my
own hardware.

Most of this code originated in these commits:

	commit cbf41dd4ad
	Author: Stephan Walter <stephan@walter.name>
	Date:   Mon Oct 18 20:28:08 2010 +0200

	    document simulation

	commit 3028b297f3
	Author: Stephan Walter <stephan@walter.name>
	Date:   Mon Oct 18 20:15:59 2010 +0200

	    Add simulation code: use "make sim"

Additional tweaks:

Revert va_args processing for AVR, but keep 'int' generalization
for simulation. gcc wasn't lying. The sim really aborts without this.

Remove delay(us) from simulator (obsolete).

Improve the README.sim to demonstrate working pronterface connection
to sim. Also fix the build instructions.

Appease all stock configs.

Stub out intercom and shush usb_serial when building simulator.

Pretend to be all chip-types for config appeasement.

Replace sim_timer with AVR-simulator timer:

The original sim_timer and sim_clock provided direct replacements
for timer/clock.c in the main code. But when the main code changed,
simcode did not. The main clock.c was dropped and merged into timer.c.
Also, the timer.c now has movement calculation code in it in some
cases (ACCELERATION_TEMPORAL) and it would be wrong to teach the
simulator to do the same thing. Instead, teach the simulator to
emulate the AVR Timer1 functionality, reacting to values written to
OCR1A and OCR1B timer comparison registers.

Whenever OCR1A/B are changed, the sim_setTimer function needs to be
called. It is called automatically after a timer event, so changes
within the timer ISRs do not need to bother with this.

A C++ class could make this requirement go away by noticing the
assignment. On the other hand, a chip-agnostic timer.c would help
make the main code more portable. The latter cleanup is probably
better for us in the long run.
2013-12-06 19:24:58 +01:00
Markus Hitter aece36f6a2 Add support for the AT90USB1286.
Contribution by DaveX. Thank you very much, Dave. See
http://forums.reprap.org/read.php?147,33082,182206#msg-182206
2013-03-24 16:17:54 +01:00
Markus Hitter d03b754b08 arduino.h: add the AT90USB1286.
Thanks for the patch, DaveX.
2013-03-24 16:17:24 +01:00
David Forrest 52ce6b5f52 More enablement of ATmega32U chip.
- ATmega32U timer 4 register handling differs from other AVRs:
  Change heater.c and mendel.c.
- LUFA USB recognition expanded in Makefile.
- Add section for __AVR_ATmega32U4__ in arduino.h.
2012-10-14 22:56:09 +02:00
Markus Hitter 18f63ccf8e Add support for the ATmega1284/1284P.
As we don't need exclusive features of these chips, simply re-use
the definitions for the ATmega644.
2012-05-13 20:14:12 +02:00
Michael Moon 0dc7d77885 Massive Doxygen documentation addition
'make doc' then point your browser at doc/html/

Needs plenty of cleanup and polishing, but the main bulk is here

even documents your configuration! ;)
2011-03-22 01:34:36 +11:00
Ben Jackson 870be1f39d arduino.h: Add support for AT90USB1287 in arduino_usb1287.h.
Only the absolutely #defines exist.  The other platforms define symbols
that are not used by Teacup and those were not mapped for the '1287.
2011-03-04 19:42:39 +11:00
plasmator 0ab6e0bb6e Added Arduino Mega2560 support to arduino.h
Signed-off-by: plasmator <public@plasmatoruniversi.com>
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
2011-01-27 20:31:40 +11:00
Michael Moon 096d7dfdf3 Merge release-candidate-triffid branch 2011-01-07 23:09:13 +11:00
Michael Moon 6169dadae7 split arduino pin definitions out into different files 2010-10-20 17:52:55 +11:00
dps.lwk d83c80e383 Added ATmega1280 pin map for Arduino Mega 2010-10-10 13:51:00 +01:00
Michael Moon 9b894de669 fixed some defines that were spitting errors 2010-10-10 19:55:10 +11:00
Michael Moon 99c03b8d26 fixed typo pointed out by dazed.dnc in forum thread 2010-10-08 21:03:29 +11:00
Michael Moon f1e318ac1a clarify some macros 2010-10-08 21:00:48 +11:00
Michael Moon 99f2593321 UNTESTED support for sanguino 2010-09-13 17:40:21 +10:00
Michael Moon 595b66a341 setting up new branch 2 2010-08-10 14:26:24 +10:00