Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reference 在STM32CubeIDE(基于Eclipse的IDE)中添加新的源文件和头文件不会';我们不能天衣无缝地工作_Reference_Undefined_Resource Files_Stm32cubeide - Fatal编程技术网

Reference 在STM32CubeIDE(基于Eclipse的IDE)中添加新的源文件和头文件不会';我们不能天衣无缝地工作

Reference 在STM32CubeIDE(基于Eclipse的IDE)中添加新的源文件和头文件不会';我们不能天衣无缝地工作,reference,undefined,resource-files,stm32cubeide,Reference,Undefined,Resource Files,Stm32cubeide,我希望有人能帮我解决这个问题,因为我真的不知道我做错了什么。 我想学习如何在一些STM32F103RCTx(Cortex-M3)设备上使用FreeRTOS。使用STM32CubeIDE软件(基于Eclipse的IDE)进行编码。一些用于调试的简单任务创建和ITM跟踪没有问题,可以无缝工作。在这一点上,我了解到使用SEGGER SystemView或Tracealyzer(percepio)这样的分析工具来全面分析FreeRTOS的系统行为非常重要。我首先尝试了SEGGER SystemView的

我希望有人能帮我解决这个问题,因为我真的不知道我做错了什么。 我想学习如何在一些STM32F103RCTx(Cortex-M3)设备上使用FreeRTOS。使用STM32CubeIDE软件(基于Eclipse的IDE)进行编码。一些用于调试的简单任务创建和ITM跟踪没有问题,可以无缝工作。在这一点上,我了解到使用SEGGER SystemView或Tracealyzer(percepio)这样的分析工具来全面分析FreeRTOS的系统行为非常重要。我首先尝试了SEGGER SystemView的免费版本,并根据SEGGER手册实现了所有源文件和头文件。我在路径环境中包含了新文件夹(C/C++构建->设置->工具设置->包含路径)。我还检查了编译时是否在我的objects.list中创建了相应的对象,就是这样。无论如何,我仍然会得到一些函数的“undefined reference”错误,尽管我可以很容易地跳转到IDE中的声明。我在STM32论坛和SEGGERs论坛上就此事提出了几个问题。至今没有回应

两天没有解决这个问题,我认为工具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实现发生了什么。我附上控制台输出的屏幕截图:

希望有人能帮我。谢谢


Benjamin

我发现了集成tracealyzer的问题:我错误地将一个重要的#include放在了错误的位置。现在一切正常。也许SEGGER SystemView也存在同样的问题。我会查一查。