diff --git a/Makefile-ARM b/Makefile-ARM index 3ce77e9..ac779c9 100644 --- a/Makefile-ARM +++ b/Makefile-ARM @@ -98,6 +98,7 @@ TARGET = $(PROGRAM).hex # Until the generic ARM port is completed, we'd have to wrap all sources # in #ifdef __AVR__. To avoid this, build only a selection for now: SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c +SOURCES += gcode_parse.c ifeq ($(MCU), lpc1114) SOURCES += cmsis-system_lpc11xx.c endif diff --git a/gcode_parse.c b/gcode_parse.c index 56c38e2..0c8de8c 100644 --- a/gcode_parse.c +++ b/gcode_parse.c @@ -387,7 +387,9 @@ uint8_t gcode_parse_char(uint8_t c) { #endif ) { // process + #ifndef __ARMEL_NOTYET__ process_gcode_command(); + #endif /* __ARMEL_NOTYET__ */ // Acknowledgement ("ok") is sent in the main loop, in mendel.c. diff --git a/mendel.c b/mendel.c index 51aef49..e636b9c 100644 --- a/mendel.c +++ b/mendel.c @@ -33,7 +33,9 @@ #include "serial.h" #ifndef __ARMEL_NOTYET__ #include "dda_queue.h" +#endif /* __ARMEL_NOTYET__ */ #include "gcode_parse.h" +#ifndef __ARMEL_NOTYET__ #include "timer.h" #include "temp.h" #include "watchdog.h" @@ -82,10 +84,10 @@ void init(void) { // set up serial serial_init(); - #ifndef __ARMEL_NOTYET__ // set up G-code parsing gcode_init(); + #ifndef __ARMEL_NOTYET__ // set up inputs and outputs pinio_init(); @@ -139,18 +141,17 @@ int main (int argc, char** argv) int main (void) { #endif - #ifndef __ARMEL_NOTYET__ uint8_t c, line_done, ack_waiting = 0; - #endif /* __ARMEL_NOTYET__ */ init(); // main loop for (;;) { - #ifndef __ARMEL_NOTYET__ // if queue is full, no point in reading chars- host will just have to wait + #ifndef __ARMEL_NOTYET__ if (queue_full() == 0) { + #endif /* __ARMEL_NOTYET__ */ /** Postpone sending acknowledgement until there's a free slot in the movement queue. This way the host waits with sending the next line @@ -180,6 +181,7 @@ int main (void) } } + #ifndef __ARMEL_NOTYET__ #ifdef SD if (( ! gcode_active || gcode_active & GCODE_SOURCE_SD) && gcode_sources & GCODE_SOURCE_SD) {