From 16d4cd12cb4bdfc3eda3ec6019d093f971d8aca8 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Tue, 9 Jun 2020 12:40:35 -0400 Subject: Moved nanopb files to library dir; changed main filenames --- makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 640d80d..43f5d4d 100644 --- a/makefile +++ b/makefile @@ -36,13 +36,13 @@ BUILD_DIR = build ###################################### # C sources C_SOURCES = \ -src/main-master.c \ +src/master.c \ src/stm32f4xx_it.c \ src/stm32f4xx_hal_msp.c \ src/system_stm32f4xx.c \ -src/pb_decode.c \ -src/pb_encode.c \ -src/pb_common.c \ +lib/nanopb/pb_decode.c \ +lib/nanopb/pb_encode.c \ +lib/nanopb/pb_common.c \ src/handshake.pb.c \ src/data.pb.c \ lib/f4/stm32f4xx_hal_i2c.c \ @@ -123,7 +123,8 @@ C_INCLUDES = \ -Ilib/f4 \ -Ilib/f4/Legacy \ -Ilib/cmsis \ --Ilib/cmsis/f4 +-Ilib/cmsis/f4 \ +-Ilib/nanopb -- cgit v1.2.3 From b113916a5df90673bbe56fe7a0fd09ea3516d124 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Tue, 9 Jun 2020 13:47:28 -0400 Subject: Added ports dir --- makefile | 84 ++++++++++------------------------------------------------------ 1 file changed, 13 insertions(+), 71 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 43f5d4d..b53a7a5 100644 --- a/makefile +++ b/makefile @@ -1,18 +1,4 @@ -########################################################################################################################## -# File automatically-generated by tool: [projectgenerator] version: [3.5.2] date: [Mon Mar 23 16:58:19 EDT 2020] -########################################################################################################################## - -# ------------------------------------------------ -# Generic Makefile (based on gcc) -# -# ChangeLog : -# 2017-02-10 - Several enhancements + project update mode -# 2015-07-22 - first version -# ------------------------------------------------ - -###################################### -# target -###################################### +# Target also determines which file is being compiled TARGET = master @@ -34,40 +20,16 @@ BUILD_DIR = build ###################################### # source ###################################### -# C sources +# C sources for all ports C_SOURCES = \ -src/master.c \ -src/stm32f4xx_it.c \ -src/stm32f4xx_hal_msp.c \ -src/system_stm32f4xx.c \ lib/nanopb/pb_decode.c \ lib/nanopb/pb_encode.c \ lib/nanopb/pb_common.c \ src/handshake.pb.c \ src/data.pb.c \ -lib/f4/stm32f4xx_hal_i2c.c \ -lib/f4/stm32f4xx_hal_i2c_ex.c \ -lib/f4/stm32f4xx_hal_rcc.c \ -lib/f4/stm32f4xx_hal_rcc_ex.c \ -lib/f4/stm32f4xx_hal_flash.c \ -lib/f4/stm32f4xx_hal_flash_ex.c \ -lib/f4/stm32f4xx_hal_flash_ramfunc.c \ -lib/f4/stm32f4xx_hal_gpio.c \ -lib/f4/stm32f4xx_hal_dma_ex.c \ -lib/f4/stm32f4xx_hal_dma.c \ -lib/f4/stm32f4xx_hal_pwr.c \ -lib/f4/stm32f4xx_hal_pwr_ex.c \ -lib/f4/stm32f4xx_hal_cortex.c \ -lib/f4/stm32f4xx_hal.c \ -lib/f4/stm32f4xx_hal_exti.c \ -lib/f4/stm32f4xx_hal_tim.c \ -lib/f4/stm32f4xx_hal_tim_ex.c \ -lib/f4/stm32f4xx_hal_uart.c - -# ASM sources -ASM_SOURCES = \ -startup_stm32f401xc.s +# set the main C source based on whether we're compiling the master or slave +C_SOURCES+=$(addprefix src/, $(TARGET).c) ####################################### # binaries @@ -88,47 +50,29 @@ SZ = $(PREFIX)size endif HEX = $(CP) -O ihex BIN = $(CP) -O binary -S - + ####################################### # CFLAGS ####################################### -# cpu -CPU = -mcpu=cortex-m4 - -# fpu -FPU = -mfpu=fpv4-sp-d16 - -# float-abi -FLOAT-ABI = -mfloat-abi=hard - -# mcu -MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI) - # macros for gcc # AS defines AS_DEFS = -# C defines -C_DEFS = \ --DUSE_HAL_DRIVER \ --DSTM32F401xC - - # AS includes AS_INCLUDES = -# C includes +# General C includes for all ports. Since CMSIS is being included, that means this is restricted to ARM ports C_INCLUDES = \ -Isrc \ --Ilib/f4 \ --Ilib/f4/Legacy \ -Ilib/cmsis \ --Ilib/cmsis/f4 \ -Ilib/nanopb - - +# Define the chip we're building for and include its makefile +PORT = stm32f4 +PORT_DIR = ports/$(PORT) +include $(PORT_DIR)/makefile +ASM_SOURCES=$(PORT_DIR)/$(ASM_FILE) # compile gcc flags ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections @@ -139,21 +83,19 @@ ifeq ($(DEBUG), 1) CFLAGS += -g -gdwarf-2 endif - # Generate dependency information CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" - ####################################### # LDFLAGS ####################################### # link script -LDSCRIPT = STM32F401CCUx_FLASH.ld +# LDSCRIPT = STM32F401CCUx_FLASH.ld # libraries LIBS = -lc -lm -lnosys LIBDIR = -LDFLAGS = $(MCU) -specs=nosys.specs -specs=nano.specs -u _printf_float -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections +LDFLAGS = $(MCU) -specs=nosys.specs -specs=nano.specs -u _printf_float -T$(PORT_DIR)/$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections # default action: build all all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin -- cgit v1.2.3 From 8883bdbccf223824935f36a77566d7af19ab4908 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Mon, 15 Jun 2020 13:07:34 -0400 Subject: I2C speed upgrade for master and slave --- makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'makefile') diff --git a/makefile b/makefile index b53a7a5..22224c0 100644 --- a/makefile +++ b/makefile @@ -69,6 +69,7 @@ C_INCLUDES = \ # Define the chip we're building for and include its makefile +# Variable ASM_FILE will be defined in the included port makefile PORT = stm32f4 PORT_DIR = ports/$(PORT) include $(PORT_DIR)/makefile -- cgit v1.2.3 From 0746618ebe57ba8d452ad5cc907ddd478b512898 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Wed, 17 Jun 2020 16:55:22 -0400 Subject: This CL adds support for dataflow branch 2, which includes master processing of DOC 1, 2, 3 for SOR 1 and SOR 3, adding support for master command processing and routing. Slave command generators and receivers are also added for testing master command functionality. CL also adds minor changes to debug scripts and overall cleanup; changes to dataflow structures to support command functionality; dedicated function for handling CTS reception from slaves. Task list: b1d2ba1914ab4621bd004ad0a636e09d 2c17aeea4e73433fa5a49d310c7526b1 5e15eda1eecb482a9bd4e6ec4ef2af0e 75b4f8b2792a4be69caf830c720d3e7c --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefile') diff --git a/makefile b/makefile index 22224c0..c71087a 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ # Target also determines which file is being compiled -TARGET = master +TARGET = slave-cmd ###################################### -- cgit v1.2.3 From 2acabd3ce6ed5522a2b3ce6728facc74bbbbd23a Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Thu, 18 Jun 2020 17:24:49 -0400 Subject: Optimizations for master data and command routing handling and corresponding changes for slave data and command decoding. Master no longer decodes data in order send individual datapoints in a packed data_message field individually, but stores and forwards the encoded data message and MDR to the slaves during routing. This significantly optimizes data routing by reducing the time taken to decode and encode every single packed datapoint. Task List: None --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefile') diff --git a/makefile b/makefile index c71087a..22224c0 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ # Target also determines which file is being compiled -TARGET = slave-cmd +TARGET = master ###################################### -- cgit v1.2.3