summaryrefslogtreecommitdiff
path: root/controller/fw/Makefile
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-15 14:47:25 +0100
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-15 14:47:25 +0100
commitfed186a49fc8f27a8a31fd40f8c8b26d32a4b932 (patch)
tree5d4c2b8004031c5d13148296a760c896b18ebf83 /controller/fw/Makefile
parent0e8a0d6f78b027d251737adc37f3d56acf251e94 (diff)
downloadmaster-thesis-fed186a49fc8f27a8a31fd40f8c8b26d32a4b932.tar.gz
master-thesis-fed186a49fc8f27a8a31fd40f8c8b26d32a4b932.tar.bz2
master-thesis-fed186a49fc8f27a8a31fd40f8c8b26d32a4b932.zip
Add end-to-end simulation
Diffstat (limited to 'controller/fw/Makefile')
-rw-r--r--controller/fw/Makefile10
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 $<