summaryrefslogtreecommitdiff
path: root/avr/Tupfile
diff options
context:
space:
mode:
Diffstat (limited to 'avr/Tupfile')
-rw-r--r--avr/Tupfile12
1 files changed, 12 insertions, 0 deletions
diff --git a/avr/Tupfile b/avr/Tupfile
index 6c40649..9fc0739 100644
--- a/avr/Tupfile
+++ b/avr/Tupfile
@@ -16,6 +16,9 @@ SRC += $(FATFS) $(TOP)/fatfs/src/option/unicode.c
#TODO: time lib
SRC += ../time/asctime_r.c ../time/gmtime_r.c ../time/mk_gmtime.c
SRC += ../time/print_lz.c ../time/isLeap.c
+SRC += ../time/system_time.c ../time/set_system_time.c
+
+ASRC += ../time/system_tick.S
SRC_Z = ../z180/hdrom.c
@@ -74,17 +77,26 @@ CFLAGS += $(INCLUDES)
CPPFLAGS += $(DEFS)
+#ASFLAGS += -Wa,-adhlns=$(<:.S=.lst),-gstabs
+ASFLAGS += -mmcu=$(MCU_TARGET) -x assembler-with-cpp $(ASFLAGS)
+
# Linker flags
LDFLAGS += -Wl,--gc-sections
LDFLAGS += -Wl,--cref
+# Assemble: create object files from assembler source files.
+#.S.o:
+# $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+!as = |> ^ AS %f^ $(CC) $(ASFLAGS) -c %f -o %o |> %B.o
!cc = |> ^ CC %f^ $(CC) $(CFLAGS) $(CPPFLAGS) $(CFLAGS_%f) -c %f -o %o |> %B.o
!LINK = |> ^ LINK %o^ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-Map=%O.map %f $(LDLIBS) -o %o |> | %O.map
!OBJCOPY= |> ^ OBJCOPY %o^ $(OBJCOPY) -Oihex %f %o |>
!OBJDUMP= |> ^ OBJDUMP %o^ $(OBJDUMP) -h -S %f > %o |> %O.lss
!SIZE = |> ^ SIZE^ $(SIZE) %f |>
+: foreach $(ASRC) |> !as |> {objs}
: foreach $(SRC) | ../z180/hdrom.h |> !cc |> {objs}
: $(SRC_Z) |> !cc -D'const=const __flash' |> {objs}