chore: upgrade FreeRTOS to v2 (CMSIS-RTOS_V2), update CubeMX project config

- Remove CMSIS-RTOS v1 (cmsis_os.h/cmsis_os.c), add CMSIS-RTOS v2 (cmsis_os2.c/freertos_os2.h/mpool.h)
- Update FreeRTOS kernel, port, and headers to match v2 integration
- Remove unused heap implementations, keep heap_4
- Update CubeMX project config (.mxproject, .ioc, CMakeLists.txt)
- Update FreeRTOSConfig.h, freertos.c, main.c, stm32h7xx_it.c
- Update application modules (master_machine, dmmotor)
- Add CMSIS-RTOS2 headers, mpu_syscall_numbers.h, newlib/picolibc support
This commit is contained in:
2026-05-30 20:40:00 +08:00
parent b7328a0c93
commit 8763b25839
63 changed files with 27596 additions and 23151 deletions
+12 -1
View File
@@ -18,6 +18,8 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "FreeRTOS.h"
#include "cmsis_os2.h"
#include "adc.h"
#include "dma.h"
#include "fdcan.h"
@@ -63,6 +65,7 @@ uint8_t W25Qxx_ReadBuffer[W25Qxx_NumByteToTest]; // ��������
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
void MX_FREERTOS_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
@@ -103,7 +106,6 @@ int main(void)
MX_GPIO_Init();
MX_DMA_Init();
MX_ADC1_Init();
MX_USB_DEVICE_Init();
MX_TIM12_Init();
MX_SPI1_Init();
MX_SPI2_Init();
@@ -128,6 +130,15 @@ int main(void)
LOGINFO("[main] SystemInit() and RobotInit() done");
/* USER CODE END 2 */
/* Init scheduler */
osKernelInitialize(); /* Call init function for freertos objects (in cmsis_os2.c) */
MX_FREERTOS_Init();
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)