diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-04 21:31:31 +0200 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-04 21:31:31 +0200 |
commit | 9918eb505321183e20357221a4dcf2aa9c1e057c (patch) | |
tree | 41e33e84d51ca2aa558ab1dc248ec5109181d6c8 /controller/fw/Makefile | |
parent | 82c1302756d9b8f3d5cfbd4b304411c39651dfa8 (diff) | |
download | master-thesis-9918eb505321183e20357221a4dcf2aa9c1e057c.tar.gz master-thesis-9918eb505321183e20357221a4dcf2aa9c1e057c.tar.bz2 master-thesis-9918eb505321183e20357221a4dcf2aa9c1e057c.zip |
fw: add working reed-solomon encoder/decoder
Diffstat (limited to 'controller/fw/Makefile')
-rw-r--r-- | controller/fw/Makefile | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/controller/fw/Makefile b/controller/fw/Makefile index ab9d66c..b6fa43f 100644 --- a/controller/fw/Makefile +++ b/controller/fw/Makefile @@ -9,6 +9,7 @@ MSPDEBUG_DIR ?= mspdebug LIBSODIUM_DIR ?= libsodium TINYAES_DIR ?= tinyaes MUSL_DIR ?= musl +RSLIB_DIR ?= reed_solomon ######################################################################################################################## # Algorithm parameters @@ -56,34 +57,38 @@ C_SOURCES += tinyprintf/tinyprintf.c C_SOURCES += $(MSPDEBUG_DIR)/drivers/jtaglib.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_init_f32.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_f32.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f32.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f32.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix8_f32.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/CommonTables/arm_const_structs.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/CommonTables/arm_common_tables.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal.c -CMSIS_SOURCES += $(CMSIS_DIR)/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal2.c - -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 -MUSL_SOURCES += $(MUSL_DIR)/src/string/memcpy.c -MUSL_SOURCES += $(MUSL_DIR)/src/math/__math_oflowf.c -MUSL_SOURCES += $(MUSL_DIR)/src/math/__math_uflowf.c -MUSL_SOURCES += $(MUSL_DIR)/src/math/__math_xflowf.c -MUSL_SOURCES += $(MUSL_DIR)/src/math/__math_invalidf.c -MUSL_SOURCES += $(MUSL_DIR)/src/math/powf_data.c - -C_SOURCES += $(CMSIS_SOURCES) $(MUSL_SOURCES) - -CXX_SOURCES += src/ldpc_wrapper.cpp +CMSIS_SOURCES += TransformFunctions/arm_rfft_fast_init_f32.c +CMSIS_SOURCES += TransformFunctions/arm_rfft_fast_f32.c +CMSIS_SOURCES += TransformFunctions/arm_cfft_init_f32.c +CMSIS_SOURCES += TransformFunctions/arm_cfft_f32.c +CMSIS_SOURCES += TransformFunctions/arm_cfft_radix8_f32.c +CMSIS_SOURCES += CommonTables/arm_const_structs.c +CMSIS_SOURCES += CommonTables/arm_common_tables.c +CMSIS_SOURCES += TransformFunctions/arm_bitreversal.c +CMSIS_SOURCES += TransformFunctions/arm_bitreversal2.c +CMSIS_SOURCES := $(addprefix $(CMSIS_DIR)/CMSIS/DSP/Source/,$(CMSIS_SOURCES)) + +MUSL_SOURCES += math/tanhf.c math/atanhf.c +MUSL_SOURCES += math/expm1f.c math/log1pf.c +MUSL_SOURCES += math/expf.c math/exp2f_data.c +MUSL_SOURCES += math/powf.c +MUSL_SOURCES += math/sqrtf.c +MUSL_SOURCES += math/fabsf.c +MUSL_SOURCES += stdlib/abs.c +MUSL_SOURCES += string/memset.c +MUSL_SOURCES += string/memcpy.c +MUSL_SOURCES += math/__math_oflowf.c +MUSL_SOURCES += math/__math_uflowf.c +MUSL_SOURCES += math/__math_xflowf.c +MUSL_SOURCES += math/__math_invalidf.c +MUSL_SOURCES += math/powf_data.c +MUSL_SOURCES := $(addprefix $(MUSL_DIR)/src/,$(MUSL_SOURCES)) + +RSLIB_SOURCES += $(addprefix $(RSLIB_DIR)/src/,rs.c ecc.c berlekamp.c galois.c) + +C_SOURCES += $(CMSIS_SOURCES) $(MUSL_SOURCES) $(RSLIB_SOURCES) + +CXX_SOURCES += BUILDDIR ?= build BINARY := safetyreset.elf @@ -299,8 +304,8 @@ $(BUILDDIR)/tinyaes/aes.o: # mkdir -p $(BUILDDIR)/musl # cd $(BUILDDIR)/musl && CFLAGS="$(SIM_CFLAGS) $(COMMON_CFLAGS)" CC=$(CC) LD=$(LD) AR=$(AR) $(MUSL_DIR_ABS)/configure && $(MAKE) TARGET=arm-linux-musleabihf GCC_CONFIG="-mcpu=cortex-m4 -mfloat-abi=soft" -j $(shell nproc) -build/ldpc_decoder_test.so: src/ldpc_decoder.c - gcc -fPIC -shared -Wall -Wextra -Wpedantic -std=gnu11 -O0 -g -o $@ $^ +build/rslib.so: $(RSLIB_SOURCES) src/rslib.c + gcc -fPIC -shared -Wall -Wextra -Wpedantic -std=gnu11 -O0 -g -o $@ -Isrc -I$(RSLIB_DIR)/src $^ clean: rm -rf $(BUILDDIR)/src |