From 41084eb4d2e3bb346e78980970ae0dd03b4d3e16 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Mon, 8 Jun 2026 23:51:57 +0200 Subject: [PATCH] Move thread creation inside comment block - Avoid overwrites from STM32CubeMX --- .gitignore | 2 ++ Core/Src/main.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d60185e..8377b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ .metadata Core/Src/Backup/ Core/Inc/Backup/ +.bak +.gitignore diff --git a/Core/Src/main.c b/Core/Src/main.c index 2ce6640..0f27be8 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -140,13 +140,13 @@ int main(void) /* add queues, ... */ /* USER CODE END RTOS_QUEUES */ - /* Create the thread(s) */ + /* USER CODE BEGIN RTOS_THREADS */ + vCAN1_rx = osThreadNew(vCAN_log, (void*)&hcan1, &vCAN1_rx_attributes); vCAN2_rx = osThreadNew(vCAN_log, (void*)&hcan2, &vCAN2_rx_attributes); vLED_CAN1_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, &led_can1, &vLED_CAN1_Heartbeat_attributes); vLED_CAN2_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, &led_can2, &vLED_CAN2_Heartbeat_attributes); - /* USER CODE BEGIN RTOS_THREADS */ - /* add threads, ... */ + /* USER CODE END RTOS_THREADS */ /* USER CODE BEGIN RTOS_EVENTS */