adjust Makefile script
This commit is contained in:
parent
bd99728827
commit
2eb9582c88
@ -14,25 +14,25 @@ CDefines=USE_HAL_DRIVER;STM32F103xE;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
||||
[PreviousGenFiles]
|
||||
AdvancedFolderStructure=true
|
||||
HeaderFileListSize=7
|
||||
HeaderFiles#0=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/gpio.h
|
||||
HeaderFiles#1=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/adc.h
|
||||
HeaderFiles#2=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/spi.h
|
||||
HeaderFiles#3=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/usart.h
|
||||
HeaderFiles#4=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/stm32f1xx_it.h
|
||||
HeaderFiles#5=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/stm32f1xx_hal_conf.h
|
||||
HeaderFiles#6=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc/main.h
|
||||
HeaderFiles#0=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/gpio.h
|
||||
HeaderFiles#1=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/adc.h
|
||||
HeaderFiles#2=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/spi.h
|
||||
HeaderFiles#3=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/usart.h
|
||||
HeaderFiles#4=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/stm32f1xx_it.h
|
||||
HeaderFiles#5=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/stm32f1xx_hal_conf.h
|
||||
HeaderFiles#6=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc/main.h
|
||||
HeaderFolderListSize=1
|
||||
HeaderPath#0=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Inc
|
||||
HeaderPath#0=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Inc
|
||||
HeaderFiles=;
|
||||
SourceFileListSize=7
|
||||
SourceFiles#0=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/gpio.c
|
||||
SourceFiles#1=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/adc.c
|
||||
SourceFiles#2=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/spi.c
|
||||
SourceFiles#3=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/usart.c
|
||||
SourceFiles#4=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/stm32f1xx_it.c
|
||||
SourceFiles#5=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/stm32f1xx_hal_msp.c
|
||||
SourceFiles#6=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src/main.c
|
||||
SourceFiles#0=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/gpio.c
|
||||
SourceFiles#1=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/adc.c
|
||||
SourceFiles#2=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/spi.c
|
||||
SourceFiles#3=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/usart.c
|
||||
SourceFiles#4=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/stm32f1xx_it.c
|
||||
SourceFiles#5=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/stm32f1xx_hal_msp.c
|
||||
SourceFiles#6=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src/main.c
|
||||
SourceFolderListSize=1
|
||||
SourcePath#0=/home/wn/Workspaces/MBusGateway3Variant/cube/Core/Src
|
||||
SourcePath#0=/home/wn/Workspaces/mbusgateway3variant/cube/Core/Src
|
||||
SourceFiles=;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Processed by ../tools/insertMyCode.sh
|
||||
# Processed by ../tools/insertMyCode.sh
|
||||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Nov 07 22:24:00 CET 2020]
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Mon Nov 09 10:47:02 CET 2020]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
@ -36,37 +36,37 @@ BUILD_DIR = build
|
||||
# source
|
||||
######################################
|
||||
# C sources
|
||||
C_SOURCES = \
|
||||
User/Src/utils.c User/Src/wizHelper.c User/Src/eeprom.c User/Src/frontend.c User/Src/logger.c User/Src/loopCtrl.c User/Src/main2.c User/Src/mbusComm.c User/Src/ringbuffer.c User/Src/show.c hottislib/PontCoopScheduler.c \
|
||||
libmbus/mbus/mbus-protocol.c \
|
||||
Core/Src/main.c \
|
||||
Core/Src/gpio.c \
|
||||
Core/Src/adc.c \
|
||||
Core/Src/spi.c \
|
||||
Core/Src/usart.c \
|
||||
Core/Src/stm32f1xx_it.c \
|
||||
Core/Src/stm32f1xx_hal_msp.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \
|
||||
C_SOURCES = \
|
||||
User/Src/eeprom.c User/Src/frontend.c User/Src/logger.c User/Src/loopCtrl.c User/Src/main2.c User/Src/mbusComm.c User/Src/ringbuffer.c User/Src/show.c User/Src/utils.c User/Src/wizHelper.c hottislib/PontCoopScheduler.c \
|
||||
libmbus/mbus/mbus-protocol.c \
|
||||
Core/Src/main.c \
|
||||
Core/Src/gpio.c \
|
||||
Core/Src/adc.c \
|
||||
Core/Src/spi.c \
|
||||
Core/Src/usart.c \
|
||||
Core/Src/stm32f1xx_it.c \
|
||||
Core/Src/stm32f1xx_hal_msp.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \
|
||||
Core/Src/system_stm32f1xx.c
|
||||
|
||||
# ASM sources
|
||||
ASM_SOURCES = \
|
||||
ASM_SOURCES = \
|
||||
startup_stm32f103xe.s
|
||||
|
||||
|
||||
@ -110,8 +110,8 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
|
||||
AS_DEFS =
|
||||
|
||||
# C defines
|
||||
C_DEFS = \
|
||||
-DUSE_HAL_DRIVER \
|
||||
C_DEFS = \
|
||||
-DUSE_HAL_DRIVER \
|
||||
-DSTM32F103xE
|
||||
|
||||
|
||||
@ -119,16 +119,16 @@ C_DEFS = \
|
||||
AS_INCLUDES =
|
||||
|
||||
# C includes
|
||||
C_INCLUDES = \
|
||||
-Ihottislib \
|
||||
-Ilibmbus \
|
||||
-IioLibrary_Driver/Ethernet \
|
||||
-IUser/Inc \
|
||||
-ICore/Inc \
|
||||
-IDrivers/STM32F1xx_HAL_Driver/Inc \
|
||||
-IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy \
|
||||
-IDrivers/CMSIS/Device/ST/STM32F1xx/Include \
|
||||
-IDrivers/CMSIS/Include \
|
||||
C_INCLUDES = \
|
||||
-Ihottislib \
|
||||
-Ilibmbus \
|
||||
-IUser/Inc \
|
||||
-IioLibrary_Driver/Ethernet \
|
||||
-ICore/Inc \
|
||||
-IDrivers/STM32F1xx_HAL_Driver/Inc \
|
||||
-IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy \
|
||||
-IDrivers/CMSIS/Device/ST/STM32F1xx/Include \
|
||||
-IDrivers/CMSIS/Include \
|
||||
-IDrivers/CMSIS/Include
|
||||
|
||||
|
||||
@ -167,11 +167,14 @@ all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET
|
||||
# list of objects
|
||||
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
||||
vpath %.c $(sort $(dir $(C_SOURCES)))
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,w5500.a)
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,w5500.a)
|
||||
# list of ASM program objects
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
||||
vpath %.s $(sort $(dir $(ASM_SOURCES)))
|
||||
|
||||
$(BUILD_DIR)/w5500.a:
|
||||
(cd ioLibrary_Driver && $(MAKE) && cp w5500.a ../$(BUILD_DIR) && cd ..)
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
||||
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
|
||||
|
||||
@ -202,4 +205,4 @@ clean:
|
||||
#######################################
|
||||
-include $(wildcard $(BUILD_DIR)/*.d)
|
||||
|
||||
# *** EOF ***
|
||||
# *** EOF ***
|
@ -1,5 +1,5 @@
|
||||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Nov 07 22:24:00 CET 2020]
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Mon Nov 09 10:47:02 CET 2020]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
|
@ -73,10 +73,17 @@ cp $MAKEFILE $MAKEFILE_BAK
|
||||
echo "# $PROCESSED" > $MAKEFILE
|
||||
cat $MAKEFILE_BAK | \
|
||||
sed -e 's%\(# list of ASM program objects\)%OBJECTS += $(addprefix $(BUILD_DIR)/,w5500.a)\n\1%' | \
|
||||
sed -e 's,\($(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)\),$(BUILD_DIR)/w5500.a:\n\t(cd ioLibrary_Driver \&\& $(MAKE) \&\& cp w5500.a ../$(BUILD_DIR) \&\& cd ..)\n\n\1,' | \
|
||||
sed -e 's,\(C_SOURCES = \\\),\1\nlibmbus/mbus/mbus-protocol.c \\,' | \
|
||||
sed -e 's,\(C_SOURCES = \\\),\1\n'"$SRC_EXT"' \\,' | \
|
||||
sed -e 's,\(C_INCLUDES = \\\),\1\n-IioLibrary_Driver/Ethernet \\,' | \
|
||||
sed -e 's,\(C_INCLUDES = \\\),\1\n-IUser/Inc \\,' | \
|
||||
sed -e 's,\(C_INCLUDES = \\\),\1\n-Ilibmbus \\,' | \
|
||||
sed -e 's,\(C_INCLUDES = \\\),\1\n-Ihottislib \\,' >> $MAKEFILE
|
||||
|
||||
# sed -e 's,\(C_INCLUDES = \\\),\1\n-Iw5500 \\,' | \
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user