FreeRTOS+Trace for version 8.2.3

sachingole wrote on Wednesday, June 07, 2017:

Hi All,

When I am trying to compile FreeRTOS+Trace for FreeRTOS version 8.2.3. It gives following error.
Have anyone tried it for this version. I am using SRM32L476-RG development enviroment.

10:56:03 **** Incremental Build of configuration Debug for project freeRTOS-8.2.3 ****
make all 
Building file: ../src/main.c
Invoking: MCU GCC Compiler
%cd%
;
;
;

MF"TraceRecorder/trcKernelPort.d" -MT"TraceRecorder/trcKernelPort.o" -o "TraceRecorder/trcKernelPort.o" "../TraceRecorder/trcKernelPort.c"
In file included from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/trcRecorder.h:70:0,
                 from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/FreeRTOSConfig.h:175,
                 from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:98,
                 from ../TraceRecorder/trcKernelPort.c:45:
D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/trcHardwarePort.h:154:3: error: #error "Can't find the CMSIS API. Please include your processor's header file in trcConfig.h"
  error "Can't find the CMSIS API. Please include your processor's header file in trcConfig.h"  
   ^
In file included from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/trcRecorder.h:71:0,
                 from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/FreeRTOSConfig.h:175,
                 from D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:98,
                 from ../TraceRecorder/trcKernelPort.c:45:
D:/STM32Cube_FW_L4_V1.7.0/freeRTOS-8.2.3/inc/trcKernelPort.h:176:3: error: #error "This hardware port has no definition for critical sections! See http://percepio.com/2014/10/27/how-to-define-critical-sections-for-the-recorder/"
  error "This hardware port has no definition for critical sections! See http://percepio.com/2014/10/27/how-to-define-critical-sections-for-the-recorder/"
   ^
make: *** [TraceRecorder/trcKernelPort.o] Error 1

10:56:06 Build Finished (took 3s.38ms)

sachingole wrote on Wednesday, June 07, 2017:

I got below link.
https://percepio.com/2014/10/27/how-to-define-critical-sections-for-the-recorder/

#define TRACE_ALLOC_CRITICAL_SECTION() uint32_t __irq_status;
#define TRACE_ENTER_CRITICAL_SECTION() {__irq_status = portSET_INTERRUPT_MASK_FROM_ISR();}
#define TRACE_EXIT_CRITICAL_SECTION() {portCLEAR_INTERRUPT_MASK_FROM_ISR(__irq_status);}

solved problem