Fake registers, functions, values, and macros

This commit is contained in:
Todd Fleming 2017-01-02 22:16:43 -05:00
parent 03787d2b28
commit 6e39a08139
6 changed files with 90 additions and 2 deletions

View File

@ -32,7 +32,22 @@ VPATH = ..
GCC_BIN = GCC_BIN =
PROJECT = mbed_blinky PROJECT = mbed_blinky
OBJECTS = src/main.o
OBJECTS = \
src/main.o \
../grbl/protocol.o \
../grbl/stepper.o \
../grbl/eeprom.o \
../grbl/settings.o \
../grbl/planner.o \
../grbl/nuts_bolts.o \
../grbl/limits.o \
../grbl/jog.o \
../grbl/print.o \
../grbl/probe.o \
../grbl/report.o \
../grbl/system.o \
SYS_OBJECTS = mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/analogin_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/analogout_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/can_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/cmsis_nvic.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/ethernet_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/gpio_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/gpio_irq_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/i2c_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/mbed_board.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/pinmap.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/port_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/pwmout_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/retarget.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/rtc_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/serial_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/sleep.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/spi_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/startup_LPC17xx.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/system_LPC17xx.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/us_ticker.o SYS_OBJECTS = mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/analogin_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/analogout_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/can_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/cmsis_nvic.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/ethernet_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/gpio_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/gpio_irq_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/i2c_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/mbed_board.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/pinmap.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/port_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/pwmout_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/retarget.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/rtc_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/serial_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/sleep.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/spi_api.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/startup_LPC17xx.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/system_LPC17xx.o mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/us_ticker.o
INCLUDE_PATHS = -I../. -I../src -I../mbed/. -I../mbed/TARGET_LPC1768 -I../mbed/TARGET_LPC1768/TARGET_NXP -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X/TARGET_MBED_LPC1768 -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X/device -I../mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM -I../mbed/drivers -I../mbed/hal -I../mbed/platform INCLUDE_PATHS = -I../. -I../src -I../mbed/. -I../mbed/TARGET_LPC1768 -I../mbed/TARGET_LPC1768/TARGET_NXP -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X/TARGET_MBED_LPC1768 -I../mbed/TARGET_LPC1768/TARGET_NXP/TARGET_LPC176X/device -I../mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM -I../mbed/drivers -I../mbed/hal -I../mbed/platform
LIBRARY_PATHS = -L../mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM LIBRARY_PATHS = -L../mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM
@ -84,7 +99,7 @@ all: $(PROJECT).bin $(PROJECT).hex size
.c.o: .c.o:
+@$(call MAKEDIR,$(dir $@)) +@$(call MAKEDIR,$(dir $@))
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $< $(CPP) $(CPPC_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $<
.cpp.o: .cpp.o:
+@$(call MAKEDIR,$(dir $@)) +@$(call MAKEDIR,$(dir $@))

3
smoother/avr/interrupt.h Normal file
View File

@ -0,0 +1,3 @@
#define ISR(f) void f()
inline void cli() {}
inline void sei() {}

64
smoother/avr/io.h Normal file
View File

@ -0,0 +1,64 @@
#include <stdint.h>
struct DummyReg {
operator uint8_t() {return 0;}
uint8_t operator=(uint8_t x) {return x;}
uint8_t operator&=(uint8_t x) {return *this = *this & x;}
uint8_t operator|=(uint8_t x) {return *this = *this | x;}
};
extern DummyReg DDRA;
extern DummyReg DDRB;
extern DummyReg DDRC;
extern DummyReg DDRD;
extern DummyReg PORTA;
extern DummyReg PORTB;
extern DummyReg PORTC;
extern DummyReg PORTD;
extern DummyReg PINA;
extern DummyReg PINB;
extern DummyReg PINC;
extern DummyReg PIND;
extern DummyReg EEAR;
extern DummyReg EECR;
extern DummyReg EEDR;
extern DummyReg EEMPE;
extern DummyReg EEPE;
extern DummyReg OCIE0A;
extern DummyReg OCIE0B;
extern DummyReg OCIE1A;
extern DummyReg OCR1A;
extern DummyReg PCICR;
extern DummyReg PCIE0;
extern DummyReg PCIE1;
extern DummyReg PCMSK0;
extern DummyReg PCMSK1;
extern DummyReg SREG;
extern DummyReg TCCR0A;
extern DummyReg TCCR0B;
extern DummyReg TCCR0B;
extern DummyReg TCCR1A;
extern DummyReg TCCR1B;
extern DummyReg TCNT0;
extern DummyReg TIMSK0;
extern DummyReg TIMSK1;
extern DummyReg TOIE0;
static const int COM1A0 = 0;
static const int COM1A1 = 0;
static const int COM1B0 = 0;
static const int COM1B1 = 0;
static const int CS01 = 0;
static const int CS10 = 0;
static const int CS11 = 0;
static const int CS12 = 0;
static const int EEMWE = 0;
static const int EERE = 0;
static const int EEWE = 0;
static const int WGM10 = 0;
static const int WGM11 = 0;
static const int WGM12 = 0;
static const int WGM13 = 0;

3
smoother/avr/pgmspace.h Normal file
View File

@ -0,0 +1,3 @@
#define PSTR(s) s
inline char pgm_read_byte_near(const char* p) {return *p;}

0
smoother/avr/wdt.h Normal file
View File

3
smoother/util/delay.h Normal file
View File

@ -0,0 +1,3 @@
#define F_CPU 1000000UL
inline void _delay_ms(double) {}
inline void _delay_us(double) {}