From edfb1f04a03adaf15ed9f55a0174043522952f0f Mon Sep 17 00:00:00 2001 From: iLich Date: Mon, 4 Aug 2025 18:02:50 +0300 Subject: [PATCH 01/12] Issue #16: Add files driver.c and driver.h --- KPI_Rover/LEDs/driver.c | 0 KPI_Rover/LEDs/driver.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 KPI_Rover/LEDs/driver.c create mode 100644 KPI_Rover/LEDs/driver.h diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c new file mode 100644 index 0000000..e69de29 diff --git a/KPI_Rover/LEDs/driver.h b/KPI_Rover/LEDs/driver.h new file mode 100644 index 0000000..e69de29 From 8f98290d3f09c21e3ce19b3af65d2bcf2dabe2a4 Mon Sep 17 00:00:00 2001 From: iLich Date: Fri, 8 Aug 2025 15:09:17 +0300 Subject: [PATCH 02/12] Issue #16: Initial implementation of LED driver APIs and tasks for LED control --- KPI_Rover/LEDs/driver.c | 77 +++++++++++++++++++++++++++++++++++++++++ KPI_Rover/LEDs/driver.h | 17 +++++++++ 2 files changed, 94 insertions(+) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index e69de29..23bfed5 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -0,0 +1,77 @@ +#include "driver.h" +#include "cmsis_os.h" +#include + +#define MAX_LEDS 4 + +typedef struct { + uint8_t index; + uint16_t times; + uint16_t on_time; + uint16_t off_time; +} LedTaskParams_t; + +static Led_t leds[MAX_LEDS]; +static uint8_t ledCount = 0; + +void LedDriver_Init(Led_t* inputLeds, uint8_t count) { + if (count > MAX_LEDS) count = MAX_LEDS; + ledCount = count; + for (uint8_t i = 0; i < count; i++) { + leds[i] = inputLeds[i]; + HAL_GPIO_WritePin(leds[i].port, leds[i].pin, GPIO_PIN_RESET); + } +} + +void LedDriver_On(uint8_t ledIndex) { + if (ledIndex < ledCount) + HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_SET); +} + +void LedDriver_Off(uint8_t ledIndex) { + if (ledIndex < ledCount) + HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_RESET); +} + +static void LedControlTask(void* argument) { + LedTaskParams_t* params = (LedTaskParams_t*)argument; + + uint16_t count = params->times; + do { + LedDriver_On(params->index); + osDelay(params->on_time); + LedDriver_Off(params->index); + osDelay(params->off_time); + } while (count == 0 || --count > 0); + + vPortFree(argument); + vTaskDelete(NULL); +} + +void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { + if (ledIndex >= ledCount) return; + + LedTaskParams_t* params = pvPortMalloc(sizeof(LedTaskParams_t)); + if (params == NULL) return; + + params->index = ledIndex; + params->times = times; + params->on_time = 500; // 50% duty cycle: 500ms ON + params->off_time = 500; // 50% duty cycle: 500ms OFF + + xTaskCreate(LedControlTask, "LedBlink", 128, params, osPriorityLow, NULL); +} + +void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { + if (ledIndex >= ledCount) return; + + LedTaskParams_t* params = pvPortMalloc(sizeof(LedTaskParams_t)); + if (params == NULL) return; + + params->index = ledIndex; + params->times = times; + params->on_time = 100; // 10% duty cycle: 100ms ON + params->off_time = 900; // 10% duty cycle: 900ms OFF + + xTaskCreate(LedControlTask, "LedFlash", 128, params, osPriorityLow, NULL); +} diff --git a/KPI_Rover/LEDs/driver.h b/KPI_Rover/LEDs/driver.h index e69de29..42feb8e 100644 --- a/KPI_Rover/LEDs/driver.h +++ b/KPI_Rover/LEDs/driver.h @@ -0,0 +1,17 @@ +#ifndef DRIVER_H +#define DRIVER_H + +#include "stm32f4xx_hal.h" + +typedef struct { + GPIO_TypeDef* port; + uint16_t pin; +} Led_t; + +void LedDriver_Init(Led_t* leds, uint8_t count); +void LedDriver_On(uint8_t ledIndex); +void LedDriver_Off(uint8_t ledIndex); +void LedDriver_Blink(uint8_t ledIndex, uint16_t times); +void LedDriver_Flash(uint8_t ledIndex, uint16_t times); + +#endif // DRIVER_H From cf0cdad9126fbef68b9c3d595bedc849083368a9 Mon Sep 17 00:00:00 2001 From: iLich Date: Sat, 9 Aug 2025 12:33:34 +0300 Subject: [PATCH 03/12] Issue #16: Added verification of settings transferred from the database --- KPI_Rover/LEDs/driver.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index 23bfed5..e533279 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -9,32 +9,38 @@ typedef struct { uint16_t times; uint16_t on_time; uint16_t off_time; -} LedTaskParams_t; +} LedParams_t; static Led_t leds[MAX_LEDS]; static uint8_t ledCount = 0; void LedDriver_Init(Led_t* inputLeds, uint8_t count) { + if (inputLeds == NULL || count == 0) return; + if (count > MAX_LEDS) count = MAX_LEDS; ledCount = count; + for (uint8_t i = 0; i < count; i++) { + if (inputLeds[i].port == NULL) continue; leds[i] = inputLeds[i]; HAL_GPIO_WritePin(leds[i].port, leds[i].pin, GPIO_PIN_RESET); } } void LedDriver_On(uint8_t ledIndex) { + if (leds[ledIndex].port == NULL) return; if (ledIndex < ledCount) HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_SET); } void LedDriver_Off(uint8_t ledIndex) { + if (leds[ledIndex].port == NULL) return; if (ledIndex < ledCount) HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_RESET); } static void LedControlTask(void* argument) { - LedTaskParams_t* params = (LedTaskParams_t*)argument; + LedParams_t* params = (LedParams_t*)argument; uint16_t count = params->times; do { @@ -49,9 +55,9 @@ static void LedControlTask(void* argument) { } void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { - if (ledIndex >= ledCount) return; + if (ledIndex >= ledCount || leds[ledIndex].port == NULL) return; - LedTaskParams_t* params = pvPortMalloc(sizeof(LedTaskParams_t)); + LedParams_t* params = pvPortMalloc(sizeof(LedParams_t)); if (params == NULL) return; params->index = ledIndex; @@ -63,9 +69,9 @@ void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { } void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { - if (ledIndex >= ledCount) return; + if (ledIndex >= ledCount || leds[ledIndex].port == NULL) return; - LedTaskParams_t* params = pvPortMalloc(sizeof(LedTaskParams_t)); + LedParams_t* params = pvPortMalloc(sizeof(LedParams_t)); if (params == NULL) return; params->index = ledIndex; From ccbd2d2f46fb8d2b39e7289ddd415be086887c4f Mon Sep 17 00:00:00 2001 From: iLich Date: Sun, 10 Aug 2025 22:26:40 +0300 Subject: [PATCH 04/12] Issue #16: Add manager task --- KPI_Rover/LEDs/manager.c | 58 ++++++++++++++++++++++++++++++++++++++++ KPI_Rover/LEDs/manager.h | 7 +++++ 2 files changed, 65 insertions(+) create mode 100644 KPI_Rover/LEDs/manager.c create mode 100644 KPI_Rover/LEDs/manager.h diff --git a/KPI_Rover/LEDs/manager.c b/KPI_Rover/LEDs/manager.c new file mode 100644 index 0000000..7edd570 --- /dev/null +++ b/KPI_Rover/LEDs/manager.c @@ -0,0 +1,58 @@ +#include "manager.h" +#include "driver.h" + +#define NUM_LEDS 4 + +typedef enum { + LED_ON, + LED_OFF, + LED_BLINK, + LED_FLASH +} LedMode_t; + +typedef struct { + LedMode_t mode; + uint16_t times; +} LedSettings_t; + +static LedSettings_t settings[NUM_LEDS]; + +void LedManager_Init() { + + Led_t leds[] = { + {GPIOD, GPIO_PIN_12}, + {GPIOD, GPIO_PIN_13}, + {GPIOD, GPIO_PIN_14}, + {GPIOD, GPIO_PIN_15} + }; + + LedDriver_Init(leds, NUM_LEDS); + + settings[0] = (LedSettings_t){LED_ON, 1}; + settings[1] = (LedSettings_t){LED_OFF, 1}; + settings[2] = (LedSettings_t){LED_BLINK, 5}; + settings[3] = (LedSettings_t){LED_FLASH, 7}; +} + +void LedManager_Task(void *argument) { + + for (;;) { + for (uint8_t i = 0; i < NUM_LEDS; i++) { + switch (settings[i].mode) { + case LED_ON: + LedDriver_On(i); + break; + case LED_OFF: + LedDriver_Off(i); + break; + case LED_BLINK: + LedDriver_Blink(i, settings[i].times); + break; + case LED_FLASH: + LedDriver_Flash(i, settings[i].times); + break; + } + } + } + +} diff --git a/KPI_Rover/LEDs/manager.h b/KPI_Rover/LEDs/manager.h new file mode 100644 index 0000000..5b75a6f --- /dev/null +++ b/KPI_Rover/LEDs/manager.h @@ -0,0 +1,7 @@ +#ifndef LEDS_MANAGER_H_ +#define LEDS_MANAGER_H_ + +void LedManager_Init(void); +void LedManager_Task(void *argument); + +#endif /* LEDS_MANAGER_H_ */ From 210661a9ff65ed32bd81486049c4b6c9cd4b875b Mon Sep 17 00:00:00 2001 From: iLich Date: Sun, 10 Aug 2025 22:34:21 +0300 Subject: [PATCH 05/12] Issue #16: Add thread for LED manager task --- Core/Src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Core/Src/main.c b/Core/Src/main.c index d62d1fe..060ea35 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -78,6 +78,8 @@ void StartDefaultTask(void *argument); /* USER CODE BEGIN PFP */ +void LedManager_Task(void *argument); + /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ @@ -103,6 +105,8 @@ int main(void) /* USER CODE BEGIN Init */ + LedManager_Init(); + /* USER CODE END Init */ /* Configure the system clock */ @@ -158,6 +162,12 @@ int main(void) ul_ulog_init(); + const osThreadAttr_t ledControlTask_attributes = { + .name = "LedControl", + .stack_size = 128 * 4, + .priority = (osPriority_t) osPriorityHigh, + }; + (void) osThreadNew(LedManager_Task, NULL, &ledControlTask_attributes); /* USER CODE END RTOS_THREADS */ From 9dfae9c2b33d61882bda5b479024c88127b17e8d Mon Sep 17 00:00:00 2001 From: iLich Date: Sun, 10 Aug 2025 22:35:28 +0300 Subject: [PATCH 06/12] Issue #16: Change priority in Blink and Flash tasks --- KPI_Rover/LEDs/driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index e533279..a3f924f 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -65,7 +65,7 @@ void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { params->on_time = 500; // 50% duty cycle: 500ms ON params->off_time = 500; // 50% duty cycle: 500ms OFF - xTaskCreate(LedControlTask, "LedBlink", 128, params, osPriorityLow, NULL); + xTaskCreate(LedControlTask, "LedBlink", 128, params, osPriorityHigh, NULL); } void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { @@ -79,5 +79,5 @@ void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { params->on_time = 100; // 10% duty cycle: 100ms ON params->off_time = 900; // 10% duty cycle: 900ms OFF - xTaskCreate(LedControlTask, "LedFlash", 128, params, osPriorityLow, NULL); + xTaskCreate(LedControlTask, "LedFlash", 128, params, osPriorityHigh, NULL); } From d80820b158e18d5cb9646abb2bc9c30ebf07c1a3 Mon Sep 17 00:00:00 2001 From: iLich Date: Wed, 13 Aug 2025 13:17:31 +0300 Subject: [PATCH 07/12] Issue #16: Move LED manager initialization from main() to task --- Core/Src/main.c | 2 -- KPI_Rover/LEDs/manager.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 060ea35..bd8251d 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -105,8 +105,6 @@ int main(void) /* USER CODE BEGIN Init */ - LedManager_Init(); - /* USER CODE END Init */ /* Configure the system clock */ diff --git a/KPI_Rover/LEDs/manager.c b/KPI_Rover/LEDs/manager.c index 7edd570..3899b19 100644 --- a/KPI_Rover/LEDs/manager.c +++ b/KPI_Rover/LEDs/manager.c @@ -36,6 +36,8 @@ void LedManager_Init() { void LedManager_Task(void *argument) { + LedManager_Init(); + for (;;) { for (uint8_t i = 0; i < NUM_LEDS; i++) { switch (settings[i].mode) { From 4a97a1c1b0ce2a6f689254a1c483e26cd074e009 Mon Sep 17 00:00:00 2001 From: iLich Date: Wed, 13 Aug 2025 13:36:19 +0300 Subject: [PATCH 08/12] Issue #16: Changed LedControlTask to an endless task --- KPI_Rover/LEDs/driver.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index a3f924f..0c82e04 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -42,16 +42,19 @@ void LedDriver_Off(uint8_t ledIndex) { static void LedControlTask(void* argument) { LedParams_t* params = (LedParams_t*)argument; - uint16_t count = params->times; - do { - LedDriver_On(params->index); - osDelay(params->on_time); - LedDriver_Off(params->index); - osDelay(params->off_time); - } while (count == 0 || --count > 0); - - vPortFree(argument); - vTaskDelete(NULL); + uint16_t count; + + for (;;) { + count = params->times; + do { + LedDriver_On(params->index); + osDelay(params->on_time); + LedDriver_Off(params->index); + osDelay(params->off_time); + } while (count == 0 || --count > 0); + + osDelay(2000); + } } void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { From a59090719908c23194e245105c964a72ae42129f Mon Sep 17 00:00:00 2001 From: iLich Date: Fri, 15 Aug 2025 18:46:04 +0300 Subject: [PATCH 09/12] Issue #16: Changed .gitignore - added makefile --- .gitignore | 10 +- Debug/Core/Src/subdir.mk | 45 ++++++++ Debug/Core/Startup/subdir.mk | 27 +++++ .../STM32F4xx_HAL_Driver/Src/subdir.mk | 93 ++++++++++++++++ Debug/KPI_Rover/LEDs/subdir.mk | 30 +++++ Debug/KPI_Rover/Logger/subdir.mk | 30 +++++ .../Class/CDC/Src/subdir.mk | 27 +++++ .../Core/Src/subdir.mk | 33 ++++++ .../FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk | 27 +++++ .../Source/portable/GCC/ARM_CM4F/subdir.mk | 27 +++++ .../Source/portable/MemMang/subdir.mk | 27 +++++ .../Third_Party/FreeRTOS/Source/subdir.mk | 45 ++++++++ Debug/USB_DEVICE/App/subdir.mk | 33 ++++++ Debug/USB_DEVICE/Target/subdir.mk | 27 +++++ Debug/makefile | 104 ++++++++++++++++++ Debug/objects.mk | 9 ++ Debug/sources.mk | 38 +++++++ 17 files changed, 630 insertions(+), 2 deletions(-) create mode 100644 Debug/Core/Src/subdir.mk create mode 100644 Debug/Core/Startup/subdir.mk create mode 100644 Debug/Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk create mode 100644 Debug/KPI_Rover/LEDs/subdir.mk create mode 100644 Debug/KPI_Rover/Logger/subdir.mk create mode 100644 Debug/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk create mode 100644 Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk create mode 100644 Debug/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk create mode 100644 Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk create mode 100644 Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk create mode 100644 Debug/Middlewares/Third_Party/FreeRTOS/Source/subdir.mk create mode 100644 Debug/USB_DEVICE/App/subdir.mk create mode 100644 Debug/USB_DEVICE/Target/subdir.mk create mode 100644 Debug/makefile create mode 100644 Debug/objects.mk create mode 100644 Debug/sources.mk diff --git a/.gitignore b/.gitignore index ff8b132..5a9d225 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ .metadata/ .settings/ -Debug/ -Release/ +Debug/** +!Debug/makefile +!Debug/**/ +!Debug/**/*.mk +Release/** +!Release/makefile +!Release/**/ +!Release/**/*.mk diff --git a/Debug/Core/Src/subdir.mk b/Debug/Core/Src/subdir.mk new file mode 100644 index 0000000..84d1772 --- /dev/null +++ b/Debug/Core/Src/subdir.mk @@ -0,0 +1,45 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Core/Src/freertos.c \ +../Core/Src/main.c \ +../Core/Src/stm32f4xx_hal_msp.c \ +../Core/Src/stm32f4xx_it.c \ +../Core/Src/syscalls.c \ +../Core/Src/sysmem.c \ +../Core/Src/system_stm32f4xx.c + +OBJS += \ +./Core/Src/freertos.o \ +./Core/Src/main.o \ +./Core/Src/stm32f4xx_hal_msp.o \ +./Core/Src/stm32f4xx_it.o \ +./Core/Src/syscalls.o \ +./Core/Src/sysmem.o \ +./Core/Src/system_stm32f4xx.o + +C_DEPS += \ +./Core/Src/freertos.d \ +./Core/Src/main.d \ +./Core/Src/stm32f4xx_hal_msp.d \ +./Core/Src/stm32f4xx_it.d \ +./Core/Src/syscalls.d \ +./Core/Src/sysmem.d \ +./Core/Src/system_stm32f4xx.d + + +# Each subdirectory must supply rules for building sources it contributes +Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Core-2f-Src + +clean-Core-2f-Src: + -$(RM) ./Core/Src/freertos.cyclo ./Core/Src/freertos.d ./Core/Src/freertos.o ./Core/Src/freertos.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32f4xx_hal_msp.cyclo ./Core/Src/stm32f4xx_hal_msp.d ./Core/Src/stm32f4xx_hal_msp.o ./Core/Src/stm32f4xx_hal_msp.su ./Core/Src/stm32f4xx_it.cyclo ./Core/Src/stm32f4xx_it.d ./Core/Src/stm32f4xx_it.o ./Core/Src/stm32f4xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f4xx.cyclo ./Core/Src/system_stm32f4xx.d ./Core/Src/system_stm32f4xx.o ./Core/Src/system_stm32f4xx.su + +.PHONY: clean-Core-2f-Src + diff --git a/Debug/Core/Startup/subdir.mk b/Debug/Core/Startup/subdir.mk new file mode 100644 index 0000000..85a6b01 --- /dev/null +++ b/Debug/Core/Startup/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +S_SRCS += \ +../Core/Startup/startup_stm32f407vgtx.s + +OBJS += \ +./Core/Startup/startup_stm32f407vgtx.o + +S_DEPS += \ +./Core/Startup/startup_stm32f407vgtx.d + + +# Each subdirectory must supply rules for building sources it contributes +Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk + arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -DDEBUG -c -I../Core/Inc -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<" + +clean: clean-Core-2f-Startup + +clean-Core-2f-Startup: + -$(RM) ./Core/Startup/startup_stm32f407vgtx.d ./Core/Startup/startup_stm32f407vgtx.o + +.PHONY: clean-Core-2f-Startup + diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk new file mode 100644 index 0000000..6d334fe --- /dev/null +++ b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk @@ -0,0 +1,93 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c \ +../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c + +OBJS += \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o + +C_DEPS += \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.d \ +./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.d + + +# Each subdirectory must supply rules for building sources it contributes +Drivers/STM32F4xx_HAL_Driver/Src/%.o Drivers/STM32F4xx_HAL_Driver/Src/%.su Drivers/STM32F4xx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32F4xx_HAL_Driver/Src/%.c Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src + +clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src: + -$(RM) ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.cyclo ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.su + +.PHONY: clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src + diff --git a/Debug/KPI_Rover/LEDs/subdir.mk b/Debug/KPI_Rover/LEDs/subdir.mk new file mode 100644 index 0000000..17ef57e --- /dev/null +++ b/Debug/KPI_Rover/LEDs/subdir.mk @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../KPI_Rover/LEDs/driver.c \ +../KPI_Rover/LEDs/manager.c + +OBJS += \ +./KPI_Rover/LEDs/driver.o \ +./KPI_Rover/LEDs/manager.o + +C_DEPS += \ +./KPI_Rover/LEDs/driver.d \ +./KPI_Rover/LEDs/manager.d + + +# Each subdirectory must supply rules for building sources it contributes +KPI_Rover/LEDs/%.o KPI_Rover/LEDs/%.su KPI_Rover/LEDs/%.cyclo: ../KPI_Rover/LEDs/%.c KPI_Rover/LEDs/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-KPI_Rover-2f-LEDs + +clean-KPI_Rover-2f-LEDs: + -$(RM) ./KPI_Rover/LEDs/driver.cyclo ./KPI_Rover/LEDs/driver.d ./KPI_Rover/LEDs/driver.o ./KPI_Rover/LEDs/driver.su ./KPI_Rover/LEDs/manager.cyclo ./KPI_Rover/LEDs/manager.d ./KPI_Rover/LEDs/manager.o ./KPI_Rover/LEDs/manager.su + +.PHONY: clean-KPI_Rover-2f-LEDs + diff --git a/Debug/KPI_Rover/Logger/subdir.mk b/Debug/KPI_Rover/Logger/subdir.mk new file mode 100644 index 0000000..ac899f9 --- /dev/null +++ b/Debug/KPI_Rover/Logger/subdir.mk @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../KPI_Rover/Logger/ul_ulog.c \ +../KPI_Rover/Logger/ulog.c + +OBJS += \ +./KPI_Rover/Logger/ul_ulog.o \ +./KPI_Rover/Logger/ulog.o + +C_DEPS += \ +./KPI_Rover/Logger/ul_ulog.d \ +./KPI_Rover/Logger/ulog.d + + +# Each subdirectory must supply rules for building sources it contributes +KPI_Rover/Logger/%.o KPI_Rover/Logger/%.su KPI_Rover/Logger/%.cyclo: ../KPI_Rover/Logger/%.c KPI_Rover/Logger/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-KPI_Rover-2f-Logger + +clean-KPI_Rover-2f-Logger: + -$(RM) ./KPI_Rover/Logger/ul_ulog.cyclo ./KPI_Rover/Logger/ul_ulog.d ./KPI_Rover/Logger/ul_ulog.o ./KPI_Rover/Logger/ul_ulog.su ./KPI_Rover/Logger/ulog.cyclo ./KPI_Rover/Logger/ulog.d ./KPI_Rover/Logger/ulog.o ./KPI_Rover/Logger/ulog.su + +.PHONY: clean-KPI_Rover-2f-Logger + diff --git a/Debug/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk b/Debug/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk new file mode 100644 index 0000000..06a49c4 --- /dev/null +++ b/Debug/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c + +OBJS += \ +./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.o + +C_DEPS += \ +./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/%.o Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/%.su Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/%.cyclo: ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/%.c Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-CDC-2f-Src + +clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-CDC-2f-Src: + -$(RM) ./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.cyclo ./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.d ./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.o ./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-CDC-2f-Src + diff --git a/Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk b/Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk new file mode 100644 index 0000000..e0f5697 --- /dev/null +++ b/Debug/Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk @@ -0,0 +1,33 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c \ +../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c \ +../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c + +OBJS += \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o + +C_DEPS += \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.d \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.d \ +./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.o Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.su Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.cyclo: ../Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.c Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src + +clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src: + -$(RM) ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.cyclo ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.su ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.cyclo ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.su ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.cyclo ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src + diff --git a/Debug/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk b/Debug/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk new file mode 100644 index 0000000..6d2726b --- /dev/null +++ b/Debug/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c + +OBJS += \ +./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.o + +C_DEPS += \ +./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/%.o Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/%.su Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/%.cyclo: ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/%.c Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-CMSIS_RTOS_V2 + +clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-CMSIS_RTOS_V2: + -$(RM) ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.d ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.o ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-CMSIS_RTOS_V2 + diff --git a/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk b/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk new file mode 100644 index 0000000..b74c73d --- /dev/null +++ b/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c + +OBJS += \ +./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + +C_DEPS += \ +./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/%.o Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/%.su Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/%.cyclo: ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/%.c Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-GCC-2f-ARM_CM4F + +clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-GCC-2f-ARM_CM4F: + -$(RM) ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-GCC-2f-ARM_CM4F + diff --git a/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk b/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk new file mode 100644 index 0000000..c97e6a0 --- /dev/null +++ b/Debug/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c + +OBJS += \ +./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o + +C_DEPS += \ +./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/%.o Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/%.su Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/%.cyclo: ../Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/%.c Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-MemMang + +clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-MemMang: + -$(RM) ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.d ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source-2f-portable-2f-MemMang + diff --git a/Debug/Middlewares/Third_Party/FreeRTOS/Source/subdir.mk b/Debug/Middlewares/Third_Party/FreeRTOS/Source/subdir.mk new file mode 100644 index 0000000..d571c81 --- /dev/null +++ b/Debug/Middlewares/Third_Party/FreeRTOS/Source/subdir.mk @@ -0,0 +1,45 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/Third_Party/FreeRTOS/Source/croutine.c \ +../Middlewares/Third_Party/FreeRTOS/Source/event_groups.c \ +../Middlewares/Third_Party/FreeRTOS/Source/list.c \ +../Middlewares/Third_Party/FreeRTOS/Source/queue.c \ +../Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.c \ +../Middlewares/Third_Party/FreeRTOS/Source/tasks.c \ +../Middlewares/Third_Party/FreeRTOS/Source/timers.c + +OBJS += \ +./Middlewares/Third_Party/FreeRTOS/Source/croutine.o \ +./Middlewares/Third_Party/FreeRTOS/Source/event_groups.o \ +./Middlewares/Third_Party/FreeRTOS/Source/list.o \ +./Middlewares/Third_Party/FreeRTOS/Source/queue.o \ +./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.o \ +./Middlewares/Third_Party/FreeRTOS/Source/tasks.o \ +./Middlewares/Third_Party/FreeRTOS/Source/timers.o + +C_DEPS += \ +./Middlewares/Third_Party/FreeRTOS/Source/croutine.d \ +./Middlewares/Third_Party/FreeRTOS/Source/event_groups.d \ +./Middlewares/Third_Party/FreeRTOS/Source/list.d \ +./Middlewares/Third_Party/FreeRTOS/Source/queue.d \ +./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.d \ +./Middlewares/Third_Party/FreeRTOS/Source/tasks.d \ +./Middlewares/Third_Party/FreeRTOS/Source/timers.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/FreeRTOS/Source/%.o Middlewares/Third_Party/FreeRTOS/Source/%.su Middlewares/Third_Party/FreeRTOS/Source/%.cyclo: ../Middlewares/Third_Party/FreeRTOS/Source/%.c Middlewares/Third_Party/FreeRTOS/Source/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source + +clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source: + -$(RM) ./Middlewares/Third_Party/FreeRTOS/Source/croutine.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/croutine.d ./Middlewares/Third_Party/FreeRTOS/Source/croutine.o ./Middlewares/Third_Party/FreeRTOS/Source/croutine.su ./Middlewares/Third_Party/FreeRTOS/Source/event_groups.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/event_groups.d ./Middlewares/Third_Party/FreeRTOS/Source/event_groups.o ./Middlewares/Third_Party/FreeRTOS/Source/event_groups.su ./Middlewares/Third_Party/FreeRTOS/Source/list.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/list.d ./Middlewares/Third_Party/FreeRTOS/Source/list.o ./Middlewares/Third_Party/FreeRTOS/Source/list.su ./Middlewares/Third_Party/FreeRTOS/Source/queue.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/queue.d ./Middlewares/Third_Party/FreeRTOS/Source/queue.o ./Middlewares/Third_Party/FreeRTOS/Source/queue.su ./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.d ./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.o ./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.su ./Middlewares/Third_Party/FreeRTOS/Source/tasks.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/tasks.d ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o ./Middlewares/Third_Party/FreeRTOS/Source/tasks.su ./Middlewares/Third_Party/FreeRTOS/Source/timers.cyclo ./Middlewares/Third_Party/FreeRTOS/Source/timers.d ./Middlewares/Third_Party/FreeRTOS/Source/timers.o ./Middlewares/Third_Party/FreeRTOS/Source/timers.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-FreeRTOS-2f-Source + diff --git a/Debug/USB_DEVICE/App/subdir.mk b/Debug/USB_DEVICE/App/subdir.mk new file mode 100644 index 0000000..bf9deea --- /dev/null +++ b/Debug/USB_DEVICE/App/subdir.mk @@ -0,0 +1,33 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../USB_DEVICE/App/usb_device.c \ +../USB_DEVICE/App/usbd_cdc_if.c \ +../USB_DEVICE/App/usbd_desc.c + +OBJS += \ +./USB_DEVICE/App/usb_device.o \ +./USB_DEVICE/App/usbd_cdc_if.o \ +./USB_DEVICE/App/usbd_desc.o + +C_DEPS += \ +./USB_DEVICE/App/usb_device.d \ +./USB_DEVICE/App/usbd_cdc_if.d \ +./USB_DEVICE/App/usbd_desc.d + + +# Each subdirectory must supply rules for building sources it contributes +USB_DEVICE/App/%.o USB_DEVICE/App/%.su USB_DEVICE/App/%.cyclo: ../USB_DEVICE/App/%.c USB_DEVICE/App/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-USB_DEVICE-2f-App + +clean-USB_DEVICE-2f-App: + -$(RM) ./USB_DEVICE/App/usb_device.cyclo ./USB_DEVICE/App/usb_device.d ./USB_DEVICE/App/usb_device.o ./USB_DEVICE/App/usb_device.su ./USB_DEVICE/App/usbd_cdc_if.cyclo ./USB_DEVICE/App/usbd_cdc_if.d ./USB_DEVICE/App/usbd_cdc_if.o ./USB_DEVICE/App/usbd_cdc_if.su ./USB_DEVICE/App/usbd_desc.cyclo ./USB_DEVICE/App/usbd_desc.d ./USB_DEVICE/App/usbd_desc.o ./USB_DEVICE/App/usbd_desc.su + +.PHONY: clean-USB_DEVICE-2f-App + diff --git a/Debug/USB_DEVICE/Target/subdir.mk b/Debug/USB_DEVICE/Target/subdir.mk new file mode 100644 index 0000000..9cf7951 --- /dev/null +++ b/Debug/USB_DEVICE/Target/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../USB_DEVICE/Target/usbd_conf.c + +OBJS += \ +./USB_DEVICE/Target/usbd_conf.o + +C_DEPS += \ +./USB_DEVICE/Target/usbd_conf.d + + +# Each subdirectory must supply rules for building sources it contributes +USB_DEVICE/Target/%.o USB_DEVICE/Target/%.su USB_DEVICE/Target/%.cyclo: ../USB_DEVICE/Target/%.c USB_DEVICE/Target/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DULOG_ENABLED -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../KPI_Rover/Logger -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Oz -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-USB_DEVICE-2f-Target + +clean-USB_DEVICE-2f-Target: + -$(RM) ./USB_DEVICE/Target/usbd_conf.cyclo ./USB_DEVICE/Target/usbd_conf.d ./USB_DEVICE/Target/usbd_conf.o ./USB_DEVICE/Target/usbd_conf.su + +.PHONY: clean-USB_DEVICE-2f-Target + diff --git a/Debug/makefile b/Debug/makefile new file mode 100644 index 0000000..16488dc --- /dev/null +++ b/Debug/makefile @@ -0,0 +1,104 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include USB_DEVICE/Target/subdir.mk +-include USB_DEVICE/App/subdir.mk +-include Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk +-include Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk +-include Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/subdir.mk +-include Middlewares/Third_Party/FreeRTOS/Source/subdir.mk +-include Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk +-include Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk +-include KPI_Rover/Logger/subdir.mk +-include KPI_Rover/LEDs/subdir.mk +-include Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk +-include Core/Startup/subdir.mk +-include Core/Src/subdir.mk +-include objects.mk + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(S_DEPS)),) +-include $(S_DEPS) +endif +ifneq ($(strip $(S_UPPER_DEPS)),) +-include $(S_UPPER_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +-include ../makefile.defs + +OPTIONAL_TOOL_DEPS := \ +$(wildcard ../makefile.defs) \ +$(wildcard ../makefile.init) \ +$(wildcard ../makefile.targets) \ + + +BUILD_ARTIFACT_NAME := ecu_sw +BUILD_ARTIFACT_EXTENSION := elf +BUILD_ARTIFACT_PREFIX := +BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),) + +# Add inputs and outputs from these tool invocations to the build variables +EXECUTABLES += \ +ecu_sw.elf \ + +MAP_FILES += \ +ecu_sw.map \ + +SIZE_OUTPUT += \ +default.size.stdout \ + +OBJDUMP_LIST += \ +ecu_sw.list \ + + +# All Target +all: main-build + +# Main-build Target +main-build: ecu_sw.elf secondary-outputs + +# Tool invocations +ecu_sw.elf ecu_sw.map: $(OBJS) $(USER_OBJS) /home/illia/Programmer/Rover/ecu_sw/STM32F407VGTX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-gcc -o "ecu_sw.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"/home/illia/Programmer/Rover/ecu_sw/STM32F407VGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="ecu_sw.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group + @echo 'Finished building target: $@' + @echo ' ' + +default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-size $(EXECUTABLES) + @echo 'Finished building: $@' + @echo ' ' + +ecu_sw.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-objdump -h -S $(EXECUTABLES) > "ecu_sw.list" + @echo 'Finished building: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) default.size.stdout ecu_sw.elf ecu_sw.list ecu_sw.map + -@echo ' ' + +secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST) + +fail-specified-linker-script-missing: + @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.' + @exit 2 + +warn-no-linker-script-specified: + @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.' + +.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified + +-include ../makefile.targets diff --git a/Debug/objects.mk b/Debug/objects.mk new file mode 100644 index 0000000..b471e98 --- /dev/null +++ b/Debug/objects.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +USER_OBJS := + +LIBS := + diff --git a/Debug/sources.mk b/Debug/sources.mk new file mode 100644 index 0000000..abd4c54 --- /dev/null +++ b/Debug/sources.mk @@ -0,0 +1,38 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +ELF_SRCS := +OBJ_SRCS := +S_SRCS := +C_SRCS := +S_UPPER_SRCS := +O_SRCS := +CYCLO_FILES := +SIZE_OUTPUT := +OBJDUMP_LIST := +SU_FILES := +EXECUTABLES := +OBJS := +MAP_FILES := +S_DEPS := +S_UPPER_DEPS := +C_DEPS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +Core/Src \ +Core/Startup \ +Drivers/STM32F4xx_HAL_Driver/Src \ +KPI_Rover/LEDs \ +KPI_Rover/Logger \ +Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src \ +Middlewares/ST/STM32_USB_Device_Library/Core/Src \ +Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 \ +Middlewares/Third_Party/FreeRTOS/Source \ +Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F \ +Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang \ +USB_DEVICE/App \ +USB_DEVICE/Target \ + From 52289f4f96e25d45a082611d9ba08761c77fc1b8 Mon Sep 17 00:00:00 2001 From: iLich Date: Fri, 22 Aug 2025 21:36:02 +0300 Subject: [PATCH 10/12] Issue #16: Add object.list and changed .gitignore --- .gitignore | 2 ++ Debug/objects.list | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Debug/objects.list diff --git a/.gitignore b/.gitignore index 5a9d225..e97730a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,11 @@ .settings/ Debug/** !Debug/makefile +!Debug/objects.list !Debug/**/ !Debug/**/*.mk Release/** !Release/makefile +!Release/objects.list !Release/**/ !Release/**/*.mk diff --git a/Debug/objects.list b/Debug/objects.list new file mode 100644 index 0000000..656e228 --- /dev/null +++ b/Debug/objects.list @@ -0,0 +1,53 @@ +"./Core/Src/freertos.o" +"./Core/Src/main.o" +"./Core/Src/stm32f4xx_hal_msp.o" +"./Core/Src/stm32f4xx_it.o" +"./Core/Src/syscalls.o" +"./Core/Src/sysmem.o" +"./Core/Src/system_stm32f4xx.o" +"./Core/Startup/startup_stm32f407vgtx.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o" +"./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o" +"./KPI_Rover/LEDs/driver.o" +"./KPI_Rover/LEDs/manager.o" +"./KPI_Rover/Logger/ul_ulog.o" +"./KPI_Rover/Logger/ulog.o" +"./Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.o" +"./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o" +"./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o" +"./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o" +"./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.o" +"./Middlewares/Third_Party/FreeRTOS/Source/croutine.o" +"./Middlewares/Third_Party/FreeRTOS/Source/event_groups.o" +"./Middlewares/Third_Party/FreeRTOS/Source/list.o" +"./Middlewares/Third_Party/FreeRTOS/Source/queue.o" +"./Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.o" +"./Middlewares/Third_Party/FreeRTOS/Source/tasks.o" +"./Middlewares/Third_Party/FreeRTOS/Source/timers.o" +"./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o" +"./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o" +"./USB_DEVICE/App/usb_device.o" +"./USB_DEVICE/App/usbd_cdc_if.o" +"./USB_DEVICE/App/usbd_desc.o" +"./USB_DEVICE/Target/usbd_conf.o" From a95dfb078d4aaac60e270e162411183ddfb74376 Mon Sep 17 00:00:00 2001 From: iLich Date: Sat, 27 Sep 2025 21:30:21 +0300 Subject: [PATCH 11/12] Issue #16: Rename params, merging typedefs, organize headers, remove dependency on FreeRTOS --- KPI_Rover/LEDs/driver.c | 75 ++++++---------------------------------- KPI_Rover/LEDs/driver.h | 24 ++++++++++--- KPI_Rover/LEDs/manager.c | 48 ++++--------------------- 3 files changed, 38 insertions(+), 109 deletions(-) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index 0c82e04..a43d3e6 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -2,85 +2,32 @@ #include "cmsis_os.h" #include -#define MAX_LEDS 4 +#define MAX_LEDS 7 -typedef struct { - uint8_t index; - uint16_t times; - uint16_t on_time; - uint16_t off_time; -} LedParams_t; - -static Led_t leds[MAX_LEDS]; +static LedSettings_t ledsInitialized[MAX_LEDS]; static uint8_t ledCount = 0; -void LedDriver_Init(Led_t* inputLeds, uint8_t count) { - if (inputLeds == NULL || count == 0) return; +void LedDriver_Init(LedSettings_t *self, uint8_t count) { + if (self == NULL || count == 0) return; if (count > MAX_LEDS) count = MAX_LEDS; ledCount = count; for (uint8_t i = 0; i < count; i++) { - if (inputLeds[i].port == NULL) continue; - leds[i] = inputLeds[i]; - HAL_GPIO_WritePin(leds[i].port, leds[i].pin, GPIO_PIN_RESET); + if (self[i].port == NULL) continue; + ledsInitialized[i] = self[i]; + HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_RESET); } } void LedDriver_On(uint8_t ledIndex) { - if (leds[ledIndex].port == NULL) return; + if (ledsInitialized[ledIndex].port == NULL) return; if (ledIndex < ledCount) - HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_SET); + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_SET); } void LedDriver_Off(uint8_t ledIndex) { - if (leds[ledIndex].port == NULL) return; + if (ledsInitialized[ledIndex].port == NULL) return; if (ledIndex < ledCount) - HAL_GPIO_WritePin(leds[ledIndex].port, leds[ledIndex].pin, GPIO_PIN_RESET); -} - -static void LedControlTask(void* argument) { - LedParams_t* params = (LedParams_t*)argument; - - uint16_t count; - - for (;;) { - count = params->times; - do { - LedDriver_On(params->index); - osDelay(params->on_time); - LedDriver_Off(params->index); - osDelay(params->off_time); - } while (count == 0 || --count > 0); - - osDelay(2000); - } -} - -void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { - if (ledIndex >= ledCount || leds[ledIndex].port == NULL) return; - - LedParams_t* params = pvPortMalloc(sizeof(LedParams_t)); - if (params == NULL) return; - - params->index = ledIndex; - params->times = times; - params->on_time = 500; // 50% duty cycle: 500ms ON - params->off_time = 500; // 50% duty cycle: 500ms OFF - - xTaskCreate(LedControlTask, "LedBlink", 128, params, osPriorityHigh, NULL); -} - -void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { - if (ledIndex >= ledCount || leds[ledIndex].port == NULL) return; - - LedParams_t* params = pvPortMalloc(sizeof(LedParams_t)); - if (params == NULL) return; - - params->index = ledIndex; - params->times = times; - params->on_time = 100; // 10% duty cycle: 100ms ON - params->off_time = 900; // 10% duty cycle: 900ms OFF - - xTaskCreate(LedControlTask, "LedFlash", 128, params, osPriorityHigh, NULL); + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_RESET); } diff --git a/KPI_Rover/LEDs/driver.h b/KPI_Rover/LEDs/driver.h index 42feb8e..eafbe4e 100644 --- a/KPI_Rover/LEDs/driver.h +++ b/KPI_Rover/LEDs/driver.h @@ -3,12 +3,28 @@ #include "stm32f4xx_hal.h" +typedef enum { + LED_OFF, + LED_ON, + LED_BLINK, + LED_FLASH +} LedMode_e; + +typedef struct { + GPIO_TypeDef* port; + uint16_t pin; + LedMode_e mode; + uint16_t times; +} LedSettings_t; + typedef struct { - GPIO_TypeDef* port; - uint16_t pin; -} Led_t; + uint8_t index; + uint16_t times; + uint16_t on_time; + uint16_t off_time; +} LedParams_t; -void LedDriver_Init(Led_t* leds, uint8_t count); +void LedDriver_Init(LedSettings_t* self, uint8_t count); void LedDriver_On(uint8_t ledIndex); void LedDriver_Off(uint8_t ledIndex); void LedDriver_Blink(uint8_t ledIndex, uint16_t times); diff --git a/KPI_Rover/LEDs/manager.c b/KPI_Rover/LEDs/manager.c index 3899b19..fa50c04 100644 --- a/KPI_Rover/LEDs/manager.c +++ b/KPI_Rover/LEDs/manager.c @@ -1,37 +1,18 @@ #include "manager.h" #include "driver.h" -#define NUM_LEDS 4 - -typedef enum { - LED_ON, - LED_OFF, - LED_BLINK, - LED_FLASH -} LedMode_t; - -typedef struct { - LedMode_t mode; - uint16_t times; -} LedSettings_t; - -static LedSettings_t settings[NUM_LEDS]; +#define NUM_LEDS 7 void LedManager_Init() { - Led_t leds[] = { - {GPIOD, GPIO_PIN_12}, - {GPIOD, GPIO_PIN_13}, - {GPIOD, GPIO_PIN_14}, - {GPIOD, GPIO_PIN_15} + LedSettings_t leds[] = { + {GPIOD, GPIO_PIN_12, LED_ON, 1}, + {GPIOD, GPIO_PIN_13, LED_ON, 1}, + {GPIOD, GPIO_PIN_14, LED_ON, 1}, + {GPIOD, GPIO_PIN_15, LED_ON, 1} }; LedDriver_Init(leds, NUM_LEDS); - - settings[0] = (LedSettings_t){LED_ON, 1}; - settings[1] = (LedSettings_t){LED_OFF, 1}; - settings[2] = (LedSettings_t){LED_BLINK, 5}; - settings[3] = (LedSettings_t){LED_FLASH, 7}; } void LedManager_Task(void *argument) { @@ -39,22 +20,7 @@ void LedManager_Task(void *argument) { LedManager_Init(); for (;;) { - for (uint8_t i = 0; i < NUM_LEDS; i++) { - switch (settings[i].mode) { - case LED_ON: - LedDriver_On(i); - break; - case LED_OFF: - LedDriver_Off(i); - break; - case LED_BLINK: - LedDriver_Blink(i, settings[i].times); - break; - case LED_FLASH: - LedDriver_Flash(i, settings[i].times); - break; - } - } + } } From 1e330718e5a018c1e8c128130bb94ceeaaf2cf4e Mon Sep 17 00:00:00 2001 From: iLich Date: Sun, 28 Sep 2025 15:50:13 +0300 Subject: [PATCH 12/12] Issue #16: Implemented state machine for LED control --- KPI_Rover/LEDs/driver.c | 108 ++++++++++++++++++++++++++++++++++++--- KPI_Rover/LEDs/driver.h | 23 +++++++-- KPI_Rover/LEDs/manager.c | 73 +++++++++++++++++++++++--- 3 files changed, 188 insertions(+), 16 deletions(-) diff --git a/KPI_Rover/LEDs/driver.c b/KPI_Rover/LEDs/driver.c index a43d3e6..4772ec5 100644 --- a/KPI_Rover/LEDs/driver.c +++ b/KPI_Rover/LEDs/driver.c @@ -1,33 +1,129 @@ #include "driver.h" #include "cmsis_os.h" #include +#include #define MAX_LEDS 7 static LedSettings_t ledsInitialized[MAX_LEDS]; static uint8_t ledCount = 0; +static LedRuntime_t runtimes[MAX_LEDS]; + +static inline uint32_t now_ms(void) { return HAL_GetTick(); } + void LedDriver_Init(LedSettings_t *self, uint8_t count) { if (self == NULL || count == 0) return; if (count > MAX_LEDS) count = MAX_LEDS; ledCount = count; + memset(runtimes, 0, sizeof(runtimes)); + for (uint8_t i = 0; i < count; i++) { if (self[i].port == NULL) continue; ledsInitialized[i] = self[i]; + runtimes[i].state = LED_STATE_OFF; + runtimes[i].used = 1; + runtimes[i].output_on = 0; HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_RESET); } } void LedDriver_On(uint8_t ledIndex) { - if (ledsInitialized[ledIndex].port == NULL) return; - if (ledIndex < ledCount) - HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_SET); + if (ledIndex >= ledCount || !runtimes[ledIndex].used || runtimes[ledIndex].output_on) return; + runtimes[ledIndex].state = LED_STATE_ON; + runtimes[ledIndex].output_on = 1; + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_SET); } void LedDriver_Off(uint8_t ledIndex) { - if (ledsInitialized[ledIndex].port == NULL) return; - if (ledIndex < ledCount) - HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_RESET); + if (ledIndex >= ledCount || !runtimes[ledIndex].used || !runtimes[ledIndex].output_on) return; + runtimes[ledIndex].state = LED_STATE_OFF; + runtimes[ledIndex].output_on = 0; + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_RESET); +} + +void LedDriver_Blink(uint8_t ledIndex, uint16_t times) { + if (ledIndex >= ledCount || !runtimes[ledIndex].used) return; + + runtimes[ledIndex].state = LED_STATE_BLINK; + runtimes[ledIndex].times = times; + runtimes[ledIndex].remaining = times; + runtimes[ledIndex].on_time_ms = 500; + runtimes[ledIndex].off_time_ms = 500; + runtimes[ledIndex].last_time_ms = now_ms(); + runtimes[ledIndex].output_on = 1; + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_SET); +} + +void LedDriver_Flash(uint8_t ledIndex, uint16_t times) { + if (ledIndex >= ledCount || !runtimes[ledIndex].used) return; + + runtimes[ledIndex].state = LED_STATE_FLASH; + runtimes[ledIndex].times = times; + runtimes[ledIndex].remaining = times; + runtimes[ledIndex].on_time_ms = 100; + runtimes[ledIndex].off_time_ms = 900; + runtimes[ledIndex].last_time_ms = now_ms(); + runtimes[ledIndex].output_on = 1; + HAL_GPIO_WritePin(ledsInitialized[ledIndex].port, ledsInitialized[ledIndex].pin, GPIO_PIN_SET); +} + +void LedDriver_TimerTask(void) { + uint32_t t = now_ms(); + + for (uint8_t i = 0; i < ledCount; ++i) { + if (!runtimes[i].used) continue; + + LedRuntime_t *r = &runtimes[i]; + + switch (r->state) { + case LED_STATE_IDLE: + // something + break; + + case LED_STATE_ON: + if (!r->output_on) { + HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_SET); + r->output_on = 1; + } + break; + + case LED_STATE_OFF: + if (r->output_on) { + HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_RESET); + r->output_on = 0; + } + break; + + case LED_STATE_BLINK: + // skip to FLASH case + case LED_STATE_FLASH: + uint32_t elapsed = (t - r->last_time_ms); + if (r->output_on) { + if (elapsed >= r->on_time_ms) { + HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_RESET); + r->output_on = 0; + r->last_time_ms = t; + if (r->remaining > 0) { + r->remaining--; + if (r->remaining == 0) { + r->state = LED_STATE_OFF; + } + } + } + } else { + if (elapsed >= r->off_time_ms) { + HAL_GPIO_WritePin(ledsInitialized[i].port, ledsInitialized[i].pin, GPIO_PIN_SET); + r->output_on = 1; + r->last_time_ms = t; + } + } + break; + + default: + break; + } + } } diff --git a/KPI_Rover/LEDs/driver.h b/KPI_Rover/LEDs/driver.h index eafbe4e..ebf9190 100644 --- a/KPI_Rover/LEDs/driver.h +++ b/KPI_Rover/LEDs/driver.h @@ -10,6 +10,14 @@ typedef enum { LED_FLASH } LedMode_e; +typedef enum { + LED_STATE_IDLE, + LED_STATE_ON, + LED_STATE_OFF, + LED_STATE_BLINK, + LED_STATE_FLASH +} LedState_e; + typedef struct { GPIO_TypeDef* port; uint16_t pin; @@ -18,16 +26,23 @@ typedef struct { } LedSettings_t; typedef struct { - uint8_t index; + LedState_e state; + uint16_t times; - uint16_t on_time; - uint16_t off_time; -} LedParams_t; + uint16_t on_time_ms; + uint16_t off_time_ms; + + uint32_t last_time_ms; + uint16_t remaining; + uint8_t output_on; + uint8_t used; +} LedRuntime_t; void LedDriver_Init(LedSettings_t* self, uint8_t count); void LedDriver_On(uint8_t ledIndex); void LedDriver_Off(uint8_t ledIndex); void LedDriver_Blink(uint8_t ledIndex, uint16_t times); void LedDriver_Flash(uint8_t ledIndex, uint16_t times); +void LedDriver_TimerTask(void); #endif // DRIVER_H diff --git a/KPI_Rover/LEDs/manager.c b/KPI_Rover/LEDs/manager.c index fa50c04..4f41994 100644 --- a/KPI_Rover/LEDs/manager.c +++ b/KPI_Rover/LEDs/manager.c @@ -1,18 +1,39 @@ #include "manager.h" #include "driver.h" +#include -#define NUM_LEDS 7 +#include "FreeRTOS.h" +#include -void LedManager_Init() { +#define NUM_LEDS 4 + +static osTimerId_t ledTimerHandle; - LedSettings_t leds[] = { +static LedSettings_t leds[] = { {GPIOD, GPIO_PIN_12, LED_ON, 1}, - {GPIOD, GPIO_PIN_13, LED_ON, 1}, - {GPIOD, GPIO_PIN_14, LED_ON, 1}, - {GPIOD, GPIO_PIN_15, LED_ON, 1} + {GPIOD, GPIO_PIN_13, LED_OFF, 1}, + {GPIOD, GPIO_PIN_14, LED_BLINK, 4}, + {GPIOD, GPIO_PIN_15, LED_FLASH, 3} }; +static void LedTimer_Callback(void *argument) { + LedDriver_TimerTask(); +} + +void LedManager_Init() { + LedDriver_Init(leds, NUM_LEDS); + + const osTimerAttr_t ledTimer_attributes = { + .name = "LedTimer", + }; + + ledTimerHandle = osTimerNew(LedTimer_Callback, osTimerPeriodic, NULL, &ledTimer_attributes); + + if (ledTimerHandle != NULL) { + osTimerStart(ledTimerHandle, 100); + } + } void LedManager_Task(void *argument) { @@ -21,6 +42,46 @@ void LedManager_Task(void *argument) { for (;;) { + LedDriver_Flash(1, 4); + LedDriver_Flash(3, 4); + LedDriver_Blink(0, 4); + LedDriver_Blink(2, 4); + + osDelay(6000); + + LedDriver_On(2); + + osDelay(500); + + LedDriver_Off(2); + + osDelay(500); + + for (uint8_t i = 0; i < NUM_LEDS; i++) { + switch (leds[i].mode) { + case LED_ON: + LedDriver_On(i); + break; + case LED_OFF: + LedDriver_Off(i); + break; + case LED_BLINK: + LedDriver_Blink(i, leds[i].times); + break; + case LED_FLASH: + LedDriver_Flash(i, leds[i].times); + break; + default: + break; + } + } + + osDelay(5000); + + LedDriver_Off(0); + + osDelay(500); + } }