diff --git a/Core/Inc/main.h b/Core/Inc/main.h index 9f6c7db..beb171b 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -97,8 +97,8 @@ void Error_Handler(void); #define STATUS3_GPIO_Port GPIOB #define STATUS4_Pin GPIO_PIN_7 #define STATUS4_GPIO_Port GPIOB -#define AMS_ERROR_Pin GPIO_PIN_8 -#define AMS_ERROR_GPIO_Port GPIOB +#define AMS_NERROR_Pin GPIO_PIN_8 +#define AMS_NERROR_GPIO_Port GPIOB /* USER CODE BEGIN Private defines */ diff --git a/Core/Src/main.c b/Core/Src/main.c index 90dcfb0..521d565 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -110,6 +110,7 @@ int main(void) { shunt_init(); ts_sm_init(); soc_init(); + HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_SET); /* USER CODE END 2 */ /* Infinite loop */ @@ -315,7 +316,8 @@ static void MX_GPIO_Init(void) { SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin | SLAVE_POWER_DEN_Pin | SLAVE_POWER_0_Pin | POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin | - STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_ERROR_Pin, + STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | + AMS_NERROR_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ @@ -340,11 +342,11 @@ static void MX_GPIO_Init(void) { /*Configure GPIO pins : SLAVE_POWER_1_Pin SLAVE_POWER_DSEL_Pin SLAVE_POWER_DEN_Pin SLAVE_POWER_0_Pin POS_AIR_CTRL_Pin NEG_AIR_CTRL_Pin - STATUS1_Pin STATUS2_Pin STATUS3_Pin STATUS4_Pin AMS_ERROR_Pin */ - GPIO_InitStruct.Pin = SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin | - SLAVE_POWER_DEN_Pin | SLAVE_POWER_0_Pin | - POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin | - STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_ERROR_Pin; + STATUS1_Pin STATUS2_Pin STATUS3_Pin STATUS4_Pin AMS_NERROR_Pin */ + GPIO_InitStruct.Pin = + SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin | SLAVE_POWER_DEN_Pin | + SLAVE_POWER_0_Pin | POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin | + STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_NERROR_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; diff --git a/Makefile b/Makefile index ecf1f2c..a3b15bc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ########################################################################################################################## -# File automatically-generated by tool: [projectgenerator] version: [3.19.2] date: [Sun Mar 12 19:36:18 CET 2023] +# File automatically-generated by tool: [projectgenerator] version: [3.19.2] date: [Sun Apr 02 01:03:50 CEST 2023] ########################################################################################################################## # ------------------------------------------------ diff --git a/STM32Make.make b/STM32Make.make index b398e59..908631a 100644 --- a/STM32Make.make +++ b/STM32Make.make @@ -199,8 +199,14 @@ vpath %.cpp $(sort $(dir $(CPP_SOURCES))) # list of C objects OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) vpath %.c $(sort $(dir $(C_SOURCES))) + # list of ASM program objects -OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) +# list of ASM program objects +UPPER_CASE_ASM_SOURCES = $(filter %.S,$(ASM_SOURCES)) +LOWER_CASE_ASM_SOURCES = $(filter %.s,$(ASM_SOURCES)) + +OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(UPPER_CASE_ASM_SOURCES:.S=.o))) +OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(LOWER_CASE_ASM_SOURCES:.s=.o))) vpath %.s $(sort $(dir $(ASM_SOURCES))) $(BUILD_DIR)/%.o: %.cpp STM32Make.make | $(BUILD_DIR) @@ -215,6 +221,9 @@ $(BUILD_DIR)/%.o: %.c STM32Make.make | $(BUILD_DIR) $(BUILD_DIR)/%.o: %.s STM32Make.make | $(BUILD_DIR) $(AS) -c $(CFLAGS) $< -o $@ +$(BUILD_DIR)/%.o: %.S STM32Make.make | $(BUILD_DIR) + $(AS) -c $(CFLAGS) $< -o $@ + $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) STM32Make.make $(CC) $(OBJECTS) $(LDFLAGS) -o $@ $(SZ) $@ diff --git a/ams-master-23.ioc b/ams-master-23.ioc index 25faf02..799e80b 100644 --- a/ams-master-23.ioc +++ b/ams-master-23.ioc @@ -185,7 +185,7 @@ PB7.GPIO_Label=STATUS4 PB7.Locked=true PB7.Signal=GPIO_Output PB8.GPIOParameters=GPIO_Label -PB8.GPIO_Label=AMS_ERROR +PB8.GPIO_Label=AMS_NERROR PB8.Locked=true PB8.Signal=GPIO_Output PF0-OSC_IN.Mode=HSE-External-Oscillator