diff options
Diffstat (limited to 'controller/fw/Makefile')
-rw-r--r-- | controller/fw/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/controller/fw/Makefile b/controller/fw/Makefile index 89960d2..0fea8ae 100644 --- a/controller/fw/Makefile +++ b/controller/fw/Makefile @@ -60,6 +60,7 @@ MUSL_SOURCES += $(MUSL_DIR)/src/math/tanhf.c $(MUSL_DIR)/src/math/atanhf.c MUSL_SOURCES += $(MUSL_DIR)/src/math/expm1f.c $(MUSL_DIR)/src/math/log1pf.c MUSL_SOURCES += $(MUSL_DIR)/src/math/expf.c $(MUSL_DIR)/src/math/exp2f_data.c MUSL_SOURCES += $(MUSL_DIR)/src/math/powf.c +MUSL_SOURCES += $(MUSL_DIR)/src/math/sqrtf.c MUSL_SOURCES += $(MUSL_DIR)/src/math/fabsf.c MUSL_SOURCES += $(MUSL_DIR)/src/stdlib/abs.c MUSL_SOURCES += $(MUSL_DIR)/src/string/memset.c @@ -84,6 +85,8 @@ LDSCRIPT := stm32f407.ld PREFIX ?= arm-none-eabi- +DEBUG ?= 1 + CC := $(PREFIX)gcc CXX := $(PREFIX)g++ LD := $(PREFIX)gcc @@ -121,7 +124,7 @@ CFLAGS += -I$(abspath musl_include_shims) COMMON_CFLAGS += -I$(BUILDDIR) -Isrc -Itinyaes CFLAGS += -I$(CUBE_DIR)/Drivers/CMSIS/Device/ST/STM32F4xx/Include -COMMON_CFLAGS += -O0 -std=gnu11 -g -DSTM32F407xx -DSTM32F4 +COMMON_CFLAGS += -O0 -std=gnu11 -g -DSTM32F407xx -DSTM32F4 -DDEBUG=$(DEBUG) CFLAGS += $(ARCH_FLAGS) $(SYSTEM_FLAGS) #SIM_CFLAGS += -mthumb -mcpu=cortex-m4 -mfloat-abi=soft CFLAGS += -fno-common -ffunction-sections -fdata-sections @@ -248,6 +251,11 @@ $(BUILDDIR)/tools/crypto_test: tools/crypto_test.c src/crypto.c tinyaes/aes.c $( mkdir -p $(@D) $(HOST_CC) $(COMMON_CFLAGS) $(SIM_CFLAGS) -lsodium -o $@ $^ +tools: $(BUILDDIR)/tools/e2e_test +$(BUILDDIR)/tools/e2e_test: tools/e2e_test.c src/freq_meas.c levmarq/levmarq.c $(BUILDDIR)/generated/fmeas_fft_window.c $(CMSIS_SOURCES) src/dsss_demod.c $(BUILDDIR)/generated/dsss_cwt_wavelet.c $(BUILDDIR)/generated/gold_code_$(DSSS_GOLD_CODE_NBITS).c + mkdir -p $(@D) + $(HOST_CC) $(COMMON_CFLAGS) $(SIM_CFLAGS) -o $@ $^ + $(BUILDDIR)/src/%.o: src/%.s mkdir -p $(@D) $(CC) $(COMMON_CFLAGS) $(CFLAGS) $(INT_CFLAGS) -o $@ -c $< |