ARM: get gcode_parse.c in.

Just did it, no code changes neccessary. Except ajusting the
boundaries to not yet ported code.

Successful tests: controller answers with "ok", just like an AVR.

Binary size raised, of course:

    SIZES          ARM...     lpc1114
    FLASH  :  3064 bytes          10%
    RAM    :   194 bytes           5%
    EEPROM :     0 bytes           0%
This commit is contained in:
Markus Hitter 2015-07-30 21:14:30 +02:00
parent ab910ee1c4
commit e5729d6743
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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.

View File

@ -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) {