我有一个在Ubuntu上的STM32CubeIDE中开发的项目(https://github.com/carlk3/Digital-Automotive-Generator-Voltage-Regulator)。现在我想将它转移到Windows上的STM32CubeIDE中。用GitHub进行源代码管理(SCM),最终用于共享项目。我试了几种不同的方法将项目从GitHub克隆到Windows,但一直无法在STM32CubeIDE中创建一个可构建的项目。我安装EGit(Eclipse的Git集成),并能够使用它导入项目,但无法构建。遇到了3185个错误和73个警告。以下是:
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os.h:240:20: error: expected declaration specifiers or '...' before 'osThreadId_t'
240 | #define osThreadId osThreadId_t
| ^~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os.h:510:24: note: in expansion of macro 'osThreadId'
510 | int32_t osSignalClear (osThreadId thread_id, int32_t signals);
| ^~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c:1791:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
1791 | osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) {
| ^
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:742:60: warning: type defaults to 'int' in declaration of 'uint32_t' [-Wimplicit-int]
742 | void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) PRIVILEGED_FUNCTION;
| ^~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os.h:510:46: error: unknown type name 'int32_t'
510 | int32_t osSignalClear (osThreadId thread_id, int32_t signals);
| ^~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os.h:510:46: error: unknown type name 'int32_t'
510 | int32_t osSignalClear (osThreadId thread_id, int32_t signals);
| ^~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1385:79: error: unknown type name 'BaseType_t'
1385 | BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
| ^~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:742:69: error: expected ';', ',' or ')' before 'ulBitsToSet'
742 | void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) PRIVILEGED_FUNCTION;
|
|
|