Добавление новых исходных и заголовочных файлов в STM32CubeIDE (IDE на основе Eclipse) не работает без проблем - PullRequest
0 голосов
/ 25 февраля 2020

Я надеюсь, что кто-нибудь может помочь мне с этой проблемой, поскольку я действительно не знаю, что я делаю здесь неправильно. Я хочу узнать, как использовать FreeRTOS с некоторым устройством STM32F103RCTx (Cortex-M3). Кодирование с помощью программного обеспечения STM32CubeIDE (IDE на основе Eclipse). Некоторое простое создание задачи и трассировка ITM для отладки не являются проблемой и работают без проблем. В этот момент я узнал, что важно иметь инструмент анализа, такой как SEGGER SystemView или Tracealyzer (percepio), чтобы полностью анализировать поведение системы FreeRTOS. Сначала я попробовал бесплатную версию SEGGER SystemView и реализовал все исходные файлы и файлы заголовков в соответствии с руководством SEGGER. Я включил новые папки в мою среду путей (C / C ++ Build-> Настройки-> Настройки инструмента-> Включить пути). Я также проверил, что при компиляции соответствующие объекты создаются в моем objects.list, что имеет место. Во всяком случае, я все еще получаю ошибку «неопределенная ссылка» для некоторой функции, хотя я легко могу перейти к ее объявлению в IDE. Я открыл несколько вопросов по этому вопросу на форуме STM32, а также на форуме SEGGER. Пока нет ответа.

Не решая проблему в течение двух дней, я подумал, что инструмент Tracealyzer может быть возможным. И поэтому я начал оценку сегодня. Я снова внедрил все необходимые файлы в папку с исходными файлами и папку с заголовочными файлами, чтобы избежать создания новых папок, которые могут быть не распознаны как включенные или неправильно проиндексированы. Еще раз компиляция не приносит успеха, и я не понимаю, почему ...

пожалуйста, приложите вывод моей консоли при компиляции программы:

10:06:37 **** Incremental Build of configuration Debug for project W5500_EVB_M3_software ****
make -j12 all 
arm-none-eabi-gcc "../Core/Src/trcKernelPort.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DSTM32F103xE -DUSE_HAL_DRIVER -DDEBUG -c -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3 -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/trcKernelPort.d" -MT"Core/Src/trcKernelPort.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/trcKernelPort.o"
../Core/Src/trcKernelPort.c: In function 'prvTraceGetTaskNumberLow16':
../Core/Src/trcKernelPort.c:175:9: warning: implicit declaration of function 'TRACE_GET_LOW16' [-Wimplicit-function-declaration]
  return TRACE_GET_LOW16(uxTaskGetTaskNumber(handle));
         ^~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'prvTraceGetTaskNumberHigh16':
../Core/Src/trcKernelPort.c:180:9: warning: implicit declaration of function 'TRACE_GET_HIGH16' [-Wimplicit-function-declaration]
  return TRACE_GET_HIGH16(uxTaskGetTaskNumber(handle));
         ^~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'prvTraceSetTaskNumberLow16':
../Core/Src/trcKernelPort.c:185:29: warning: implicit declaration of function 'TRACE_SET_LOW16' [-Wimplicit-function-declaration]
  vTaskSetTaskNumber(handle, TRACE_SET_LOW16(uxTaskGetTaskNumber(handle), value));
                             ^~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'prvTraceSetTaskNumberHigh16':
../Core/Src/trcKernelPort.c:190:29: warning: implicit declaration of function 'TRACE_SET_HIGH16' [-Wimplicit-function-declaration]
  vTaskSetTaskNumber(handle, TRACE_SET_HIGH16(uxTaskGetTaskNumber(handle), value));
                             ^~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'prvReportStackUsage':
../Core/Src/trcKernelPort.c:411:4: warning: implicit declaration of function 'prvTraceStoreKernelCallWithParam'; did you mean 'vTraceStoreKernelObjectName'? [-Wimplicit-function-declaration]
    prvTraceStoreKernelCallWithParam(TRACE_UNUSED_STACK, TRACE_CLASS_TASK, TRACE_GET_TASK_NUMBER(tasksInStackMonitor[i].tcb), tasksInStackMonitor[i].uiPreviousLowMark);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vTraceStoreKernelObjectName
../Core/Src/trcKernelPort.c:411:37: error: 'TRACE_UNUSED_STACK' undeclared (first use in this function)
    prvTraceStoreKernelCallWithParam(TRACE_UNUSED_STACK, TRACE_CLASS_TASK, TRACE_GET_TASK_NUMBER(tasksInStackMonitor[i].tcb), tasksInStackMonitor[i].uiPreviousLowMark);
                                     ^~~~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c:411:37: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/trcKernelPort.c:411:57: error: 'TRACE_CLASS_TASK' undeclared (first use in this function); did you mean 'TRACE_UNUSED_STACK'?
    prvTraceStoreKernelCallWithParam(TRACE_UNUSED_STACK, TRACE_CLASS_TASK, TRACE_GET_TASK_NUMBER(tasksInStackMonitor[i].tcb), tasksInStackMonitor[i].uiPreviousLowMark);
                                                         ^~~~~~~~~~~~~~~~
                                                         TRACE_UNUSED_STACK
../Core/Src/trcKernelPort.c:411:75: warning: implicit declaration of function 'TRACE_GET_TASK_NUMBER' [-Wimplicit-function-declaration]
    prvTraceStoreKernelCallWithParam(TRACE_UNUSED_STACK, TRACE_CLASS_TASK, TRACE_GET_TASK_NUMBER(tasksInStackMonitor[i].tcb), tasksInStackMonitor[i].uiPreviousLowMark);
                                                                           ^~~~~~~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: At top level:
../Core/Src/trcKernelPort.c:776:2: error: 'TRACE_CLASS_QUEUE' undeclared here (not in a function); did you mean 'TRC_CFG_NQUEUE'?
  TRACE_CLASS_QUEUE,
  ^~~~~~~~~~~~~~~~~
  TRC_CFG_NQUEUE
../Core/Src/trcKernelPort.c:777:2: error: 'TRACE_CLASS_MUTEX' undeclared here (not in a function); did you mean 'TRACE_CLASS_QUEUE'?
  TRACE_CLASS_MUTEX,
  ^~~~~~~~~~~~~~~~~
  TRACE_CLASS_QUEUE
../Core/Src/trcKernelPort.c:778:2: error: 'TRACE_CLASS_SEMAPHORE' undeclared here (not in a function); did you mean 'TRC_CFG_NSEMAPHORE'?
  TRACE_CLASS_SEMAPHORE,
  ^~~~~~~~~~~~~~~~~~~~~
  TRC_CFG_NSEMAPHORE
../Core/Src/trcKernelPort.c:793:1: error: expected identifier or '(' before '{' token
 {
 ^
../Core/Src/trcKernelPort.c:806:1: error: expected identifier or '(' before '{' token
 {
 ^
../Core/Src/trcKernelPort.c:819:1: error: expected identifier or '(' before '{' token
 {
 ^
In file included from ../Core/Inc/FreeRTOSConfig.h:46:0,
                 from ../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:56,
                 from ../Core/Src/trcKernelPort.c:45:
../Core/Inc/trcRecorder.h:1857:26: error: expected identifier or '(' before 'void'
 #define vTraceEnable(x) (void)(x)
                          ^
../Core/Src/trcKernelPort.c:907:6: note: in expansion of macro 'vTraceEnable'
 void vTraceEnable(int startOption)
      ^~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'vTraceInitObjectPropertyTable':
../Core/Src/trcKernelPort.c:965:2: error: 'RecorderDataPtr' undeclared (first use in this function)
  RecorderDataPtr->ObjectPropertyTable.NumberOfObjectClasses = TRACE_NCLASSES;
  ^~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c:965:63: error: 'TRACE_NCLASSES' undeclared (first use in this function); did you mean 'TRACE_CLASS_MUTEX'?
  RecorderDataPtr->ObjectPropertyTable.NumberOfObjectClasses = TRACE_NCLASSES;
                                                               ^~~~~~~~~~~~~~
                                                               TRACE_CLASS_MUTEX
../Core/Src/trcKernelPort.c:984:71: error: 'PropertyTableSizeQueue' undeclared (first use in this function)
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[0] = PropertyTableSizeQueue;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c:985:71: error: 'PropertyTableSizeSemaphore' undeclared (first use in this function); did you mean 'PropertyTableSizeQueue'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[1] = PropertyTableSizeSemaphore;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeQueue
../Core/Src/trcKernelPort.c:986:71: error: 'PropertyTableSizeMutex' undeclared (first use in this function); did you mean 'PropertyTableSizeQueue'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[2] = PropertyTableSizeMutex;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeQueue
../Core/Src/trcKernelPort.c:987:71: error: 'PropertyTableSizeTask' undeclared (first use in this function); did you mean 'PropertyTableSizeMutex'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[3] = PropertyTableSizeTask;
                                                                       ^~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeMutex
../Core/Src/trcKernelPort.c:988:71: error: 'PropertyTableSizeISR' undeclared (first use in this function); did you mean 'PropertyTableSizeTask'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[4] = PropertyTableSizeISR;
                                                                       ^~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeTask
../Core/Src/trcKernelPort.c:989:71: error: 'PropertyTableSizeTimer' undeclared (first use in this function); did you mean 'PropertyTableSizeTask'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[5] = PropertyTableSizeTimer;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeTask
../Core/Src/trcKernelPort.c:990:71: error: 'PropertyTableSizeEventGroup' undeclared (first use in this function); did you mean 'PropertyTableSizeSemaphore'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[6] = PropertyTableSizeEventGroup;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeSemaphore
../Core/Src/trcKernelPort.c:991:71: error: 'PropertyTableSizeStreamBuffer' undeclared (first use in this function); did you mean 'PropertyTableSizeTimer'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[7] = PropertyTableSizeStreamBuffer;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeTimer
../Core/Src/trcKernelPort.c:992:71: error: 'PropertyTableSizeMessageBuffer' undeclared (first use in this function); did you mean 'PropertyTableSizeStreamBuffer'?
  RecorderDataPtr->ObjectPropertyTable.TotalPropertyBytesPerClass[8] = PropertyTableSizeMessageBuffer;
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                       PropertyTableSizeStreamBuffer
../Core/Src/trcKernelPort.c:993:62: error: 'StartIndexQueue' undeclared (first use in this function)
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[0] = StartIndexQueue;
                                                              ^~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c:994:62: error: 'StartIndexSemaphore' undeclared (first use in this function); did you mean 'StartIndexQueue'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[1] = StartIndexSemaphore;
                                                              ^~~~~~~~~~~~~~~~~~~
                                                              StartIndexQueue
../Core/Src/trcKernelPort.c:995:62: error: 'StartIndexMutex' undeclared (first use in this function); did you mean 'StartIndexQueue'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[2] = StartIndexMutex;
                                                              ^~~~~~~~~~~~~~~
                                                              StartIndexQueue
../Core/Src/trcKernelPort.c:996:62: error: 'StartIndexTask' undeclared (first use in this function); did you mean 'StartIndexMutex'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[3] = StartIndexTask;
                                                              ^~~~~~~~~~~~~~
                                                              StartIndexMutex
../Core/Src/trcKernelPort.c:997:62: error: 'StartIndexISR' undeclared (first use in this function); did you mean 'StartIndexTask'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[4] = StartIndexISR;
                                                              ^~~~~~~~~~~~~
                                                              StartIndexTask
../Core/Src/trcKernelPort.c:998:62: error: 'StartIndexTimer' undeclared (first use in this function); did you mean 'StartIndexTask'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[5] = StartIndexTimer;
                                                              ^~~~~~~~~~~~~~~
                                                              StartIndexTask
../Core/Src/trcKernelPort.c:999:62: error: 'StartIndexEventGroup' undeclared (first use in this function); did you mean 'StartIndexSemaphore'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[6] = StartIndexEventGroup;
                                                              ^~~~~~~~~~~~~~~~~~~~
                                                              StartIndexSemaphore
../Core/Src/trcKernelPort.c:1000:62: error: 'StartIndexStreamBuffer' undeclared (first use in this function); did you mean 'StaticStreamBuffer_t'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[7] = StartIndexStreamBuffer;
                                                              ^~~~~~~~~~~~~~~~~~~~~~
                                                              StaticStreamBuffer_t
../Core/Src/trcKernelPort.c:1001:62: error: 'StartIndexMessageBuffer' undeclared (first use in this function); did you mean 'StartIndexStreamBuffer'?
  RecorderDataPtr->ObjectPropertyTable.StartIndexOfClass[8] = StartIndexMessageBuffer;
                                                              ^~~~~~~~~~~~~~~~~~~~~~~
                                                              StartIndexStreamBuffer
../Core/Src/trcKernelPort.c:1002:72: error: 'TRACE_OBJECT_TABLE_SIZE' undeclared (first use in this function); did you mean 'TRC_CFG_SYMBOL_TABLE_SIZE'?
  RecorderDataPtr->ObjectPropertyTable.ObjectPropertyTableSizeInBytes = TRACE_OBJECT_TABLE_SIZE;
                                                                        ^~~~~~~~~~~~~~~~~~~~~~~
                                                                        TRC_CFG_SYMBOL_TABLE_SIZE
../Core/Src/trcKernelPort.c: In function 'vTraceInitObjectHandleStack':
../Core/Src/trcKernelPort.c:1008:2: error: 'objectHandleStacks' undeclared (first use in this function)
  objectHandleStacks.indexOfNextAvailableHandle[0] = objectHandleStacks.lowestIndexOfClass[0] = 0;
  ^~~~~~~~~~~~~~~~~~
../Core/Src/trcKernelPort.c: In function 'pszTraceGetErrorNotEnoughHandles':
../Core/Src/trcKernelPort.c:1034:7: error: 'TRACE_CLASS_TASK' undeclared (first use in this function); did you mean 'TRACE_CLASS_MUTEX'?
  case TRACE_CLASS_TASK:
       ^~~~~~~~~~~~~~~~
       TRACE_CLASS_MUTEX
../Core/Src/trcKernelPort.c:1036:7: error: 'TRACE_CLASS_ISR' undeclared (first use in this function); did you mean 'TRACE_CLASS_TASK'?
  case TRACE_CLASS_ISR:
       ^~~~~~~~~~~~~~~
       TRACE_CLASS_TASK
../Core/Src/trcKernelPort.c:1044:7: error: 'TRACE_CLASS_TIMER' undeclared (first use in this function); did you mean 'TRACE_CLASS_ISR'?
  case TRACE_CLASS_TIMER:
       ^~~~~~~~~~~~~~~~~
       TRACE_CLASS_ISR
../Core/Src/trcKernelPort.c:1046:7: error: 'TRACE_CLASS_EVENTGROUP' undeclared (first use in this function); did you mean 'TRC_CFG_NEVENTGROUP'?
  case TRACE_CLASS_EVENTGROUP:
       ^~~~~~~~~~~~~~~~~~~~~~
       TRC_CFG_NEVENTGROUP
../Core/Src/trcKernelPort.c:1048:7: error: 'TRACE_CLASS_STREAMBUFFER' undeclared (first use in this function); did you mean 'TRC_CFG_NSTREAMBUFFER'?
  case TRACE_CLASS_STREAMBUFFER:
       ^~~~~~~~~~~~~~~~~~~~~~~~
       TRC_CFG_NSTREAMBUFFER
../Core/Src/trcKernelPort.c:1050:7: error: 'TRACE_CLASS_MESSAGEBUFFER' undeclared (first use in this function); did you mean 'TRACE_CLASS_STREAMBUFFER'?
  case TRACE_CLASS_MESSAGEBUFFER:
       ^~~~~~~~~~~~~~~~~~~~~~~~~
       TRACE_CLASS_STREAMBUFFER
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:52:0,
                 from ../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:62,
                 from ../Core/Src/trcKernelPort.c:45:
At top level:
../Core/Src/trcKernelPort.c:946:26: warning: 'TzCtrl' defined but not used [-Wunused-function]
 static portTASK_FUNCTION(TzCtrl, pvParameters)
                          ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h:112:59: note: in definition of macro 'portTASK_FUNCTION'
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
                                                           ^~~~~~~~~
../Core/Src/trcKernelPort.c:113:21: warning: 'tcbTzCtrl' defined but not used [-Wunused-variable]
 static StaticTask_t tcbTzCtrl;
                     ^~~~~~~~~
../Core/Src/trcKernelPort.c:112:20: warning: 'stackTzCtrl' defined but not used [-Wunused-variable]
 static StackType_t stackTzCtrl[TRC_CFG_CTRL_TASK_STACK_SIZE];
                    ^~~~~~~~~~~
../Core/Src/trcKernelPort.c:107:17: warning: 'HandleTzCtrl' defined but not used [-Wunused-variable]
 static TaskType HandleTzCtrl = NULL;       /* TzCtrl task TCB */
                 ^~~~~~~~~~~~
make: *** [Core/Src/subdir.mk:95: Core/Src/trcKernelPort.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.

10:06:39 Build Failed. 38 errors, 10 warnings. (took 2s.192ms)

Может быть, кто-то знает также, что случилось с SEGGER Реализация SystemView. Я прилагаю скриншот вывода консоли: неопределенная ошибка ссылки

, надеюсь, кто-то может помочь мне с этим. Спасибо!

Бенджамин

...