summaryrefslogtreecommitdiff
path: root/src/lpc
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-08-05 12:23:22 +0800
committerKeith Packard <keithp@keithp.com>2018-10-13 08:21:58 -0700
commit7c04888cf9809e0c73f0813c74e8dd972facde3a (patch)
treeebb43ee5aa61cc65ce28595c19b4dd3c19812ead /src/lpc
parent56629222711ba3ef7853405c9b07ad614fb29b95 (diff)
altos: Switch to newlib-nano for libc on arm
Stop using pdclib Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc')
-rw-r--r--src/lpc/Makefile-lpc.defs5
-rw-r--r--src/lpc/ao_arch.h8
2 files changed, 3 insertions, 10 deletions
diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs
index c4521620..edeedaf0 100644
--- a/src/lpc/Makefile-lpc.defs
+++ b/src/lpc/Makefile-lpc.defs
@@ -29,15 +29,16 @@ CC=$(ARM_CC)
WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align
AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
+ -DNEWLIB_INTEGER_PRINTF_SCANF \
-I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math -I$(TOPDIR) \
- $(PDCLIB_INCLUDES)
+ -isystem $(NEWLIB_NANO)/arm-none-eabi/include
LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\
-ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS)
NICKLE=nickle
-LIBS=$(PDCLIB_LIBS_M0) -lgcc
+LIBS=-L$(NEWLIB_NANO)/arm-none-eabi/lib/thumb/v6-m -lc -lm -lgcc
V=0
# The user has explicitly enabled quiet compilation.
diff --git a/src/lpc/ao_arch.h b/src/lpc/ao_arch.h
index da21dc9d..f1df14eb 100644
--- a/src/lpc/ao_arch.h
+++ b/src/lpc/ao_arch.h
@@ -59,14 +59,6 @@
#define ao_arch_interrupt(n) /* nothing */
-#undef putchar
-#undef getchar
-#define putchar(c) ao_putchar(c)
-#define getchar ao_getchar
-
-extern void putchar(char c);
-extern char getchar(void);
-
/*
* ao_romconfig.c
*/