Add simulation info for SimulAVR.
This shouldn't change the running binary at all, so it shouldn't harm. However, it allows to run Teacup inside SimulAVR and accessing Teacups' serial line through the console/terminal. For detailed instructions, see http://reprap.org/wiki/SimulAVR .
This commit is contained in:
parent
ab65ba6c95
commit
71ae941a09
|
|
@ -127,7 +127,14 @@ CFLAGS += -finline-functions-called-once
|
|||
CFLAGS += -mcall-prologues
|
||||
|
||||
LDFLAGS = -Wl,--as-needed
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
# Doesn't work for simulavr, can't allow dead code removal.
|
||||
#LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
ifneq ($(realpath ../simulavr/src/simulavr_info.h),)
|
||||
# Neccessary for simulavr support, doesn't hurt others.
|
||||
CFLAGS += -DSIMINFO
|
||||
LDFLAGS += -Wl,--section-start=.siminfo=0x900000
|
||||
endif
|
||||
|
||||
LIBS = -lm
|
||||
|
||||
|
|
|
|||
8
mendel.c
8
mendel.c
|
|
@ -50,6 +50,14 @@
|
|||
#include "intercom.h"
|
||||
#include "simulator.h"
|
||||
|
||||
#ifdef SIMINFO
|
||||
#include "../simulavr/src/simulavr_info.h"
|
||||
SIMINFO_DEVICE("atmega644");
|
||||
SIMINFO_CPUFREQUENCY(F_CPU);
|
||||
SIMINFO_SERIAL_IN("D0", "-", BAUD);
|
||||
SIMINFO_SERIAL_OUT("D1", "-", BAUD);
|
||||
#endif
|
||||
|
||||
/// initialise all I/O - set pins as input or output, turn off unused subsystems, etc
|
||||
void io_init(void) {
|
||||
// disable modules we don't use
|
||||
|
|
|
|||
Loading…
Reference in New Issue