arm: async echo app
This commit is contained in:
25
arm/makefile
25
arm/makefile
@@ -15,14 +15,16 @@ LDFLAGS = -march=armv6-m \
|
||||
-Wl,--gc-sections -Os \
|
||||
-Wl,--print-memory-usage -flto
|
||||
|
||||
includes += -Ihal/cmsis
|
||||
|
||||
sources += hal/lib/common/xil_assert.c
|
||||
includes += -Ihal/lib/common
|
||||
|
||||
sources += hal/uart/xuartlite.c hal/uart/xuartlite_stats.c
|
||||
sources += hal/uart/xuartlite.c hal/uart/xuartlite_stats.c hal/uart/xuartlite_intr.c
|
||||
includes += -Ihal/uart
|
||||
|
||||
bootloader_objects = uart.o bootloader.o vector_table.o $(sources:.c=.o)
|
||||
app_objects = app_init.o main.o
|
||||
app_objects = app_init.o crash.o main.o uart.o stdlib.o async.o trace.o $(sources:.c=.o)
|
||||
|
||||
CPPFLAGS += $(includes)
|
||||
|
||||
@@ -37,10 +39,21 @@ bootloader.elf: $(bootloader_objects) bootloader.ld
|
||||
app.elf: $(app_objects) app.ld
|
||||
$(LD) -Wl,-Tapp.ld $(LDFLAGS) -o $@ $(app_objects)
|
||||
|
||||
%.elf:
|
||||
$(LD) -Wl,-Tapp.ld $(LDFLAGS) -o $@ $^
|
||||
.PHONY: clean test
|
||||
|
||||
.PHONY: clean
|
||||
deps = $(app_objects:.o=.d) $(bootloader_objects:.o=.d)
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.bin $(app_objects) $(bootloader_objects)
|
||||
rm -rf *.elf *.bin $(tests) $(app_objects) $(bootloader_objects) $(deps)
|
||||
|
||||
HOSTCXX = clang++
|
||||
|
||||
tests = ring_buffer_test
|
||||
|
||||
test: $(tests)
|
||||
|
||||
ring_buffer_test: ring_buffer_test.cc
|
||||
$(HOSTCXX) -std=c++2a -o $@ $< -lgmock -lgtest -lgtest_main
|
||||
./$@
|
||||
|
||||
-include $(deps)
|
||||
|
Reference in New Issue
Block a user