This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: Using TI FreeRTOS with SEGGER SystemView

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN, SEGGER

Hi everybody,

I'm using FreeRTOS with my TI Hercules project, generated by HalCoGen and I want to use the SEGGER SystemView to debug my project.

I'm having problems porting the tracing code to the kernel.
For example, the official Segger patch requires to modify the xPortSysTickHandler function which does not exist in the TI port.

diff -rupN org/FreeRTOS/portable/GCC/ARM_CM0/port.c new/FreeRTOS/portable/GCC/ARM_CM0/port.c
--- org/FreeRTOS/portable/GCC/ARM_CM0/port.c	2020-12-15 19:54:26.000000000 +0100
+++ new/FreeRTOS/portable/GCC/ARM_CM0/port.c	2021-03-03 10:20:34.000000000 +0100
@@ -359,13 +359,19 @@ void xPortSysTickHandler( void )
     uint32_t ulPreviousMask;
 
     ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR();
+    traceISR_ENTER();
     {
         /* Increment the RTOS tick. */
         if( xTaskIncrementTick() != pdFALSE )
         {
+            traceISR_EXIT_TO_SCHEDULER();
             /* Pend a context switch. */
             portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
         }
+        else
+        {
+            traceISR_EXIT();
+        }
     }
     portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask );
 }

We also need to define the SEGGER_SYSVIEW_X_GetInterruptId() function.
Any idea how to get the IRQ interrupt number?

Is there a guide on using the TI port of FreeRTOS with SystemView? 
How can I port the TI kernel to use SystemView?

Regards,
Gabriel