Hi,
I'm having some problems trying to view RTOS tasks in System View. First I will list my system configuration
TARGET:
Board/MCU - FRDM-KL25Z with ARM Cortex-M0+ core on Kinetis KL25 from NXP;
Debuuger: OpenSDA with J-link
RTOS - FreeRTOS 9.0.0;
System View target sources: v2.52d
PC HOST:
OS: Windows 10 Professional
IDE - Kinetis Design Studio (KDS) from NXP;
Compiler - GCC/C99;
System View - v3.32.
The main project files created in KDS is attached below.
I have port the System View target sources to my project in KDS. I have patch the FreeRTOS sources from scratch with System View.
A macro called SEGGER_SYSVIEW_TOOL was used, which I can pass to gcc, when I want to use the system view. So when you don't want to compile
code related to system view, do not pass this macro. Therefore, all related segger code is between this preprocessor commands:
At the beginning of the "FreeRTOSConfig.h" file, it was inserted the header file that contains the "SystemCoreClock" definition (MKL25Z4.h).
At the end of the "FreeRTOSConfig.h" file is inserted:
In "FreeRTOSConfig.h" is set:
"INCLUDE_xTaskGetIdleTaskHandle 1" and "configUSE_TRACE_FACILITY 1".
To update the tick counts for system view, the SEGGER_SYSVIEW_TickCnt variable is incremented inside xPortSysTickHandler in the port.c file:
Display All
I created the file "SEGGER_SYSVIEW_Config_FreeRTOS_CM0.c" and put in the directory "Segger" of the project. In this file there is an implementation
of the "SEGGER_SYSVIEW_X_GetTimestamp" function for an ARM Cortex-M0+:
In the main function, It is called the "SEGGER_SYSVIEW_Conf" function to settle everything and start the application.
The application is formed by two tasks, having 1 second period (myTask) and 2 seconds period (myTask2).
The system view in PC find the correct parameters of my board, when it is attached to PC when selected "Target->Recordes Configuration" (image 1).
When the FRDM-KL25Z is attached to PC, I click in the "start recording" and it begins to record (image 2).
However, some problems appears in the visualization.
First of all, the time scale and value is wrong. After many seconds periods, the time scale is show in few miliseconds.
Second, I have to move the cursor in front of the timeline window whenever I want the system view to update the tasks view, which is really annoying.
Third, there are Tmr Svc and Idle timelines that show nothing. I believe something should be shown in Idle, but not sure with Tmr Svc.
And finally, is there a way to change the color of tasks on the timeline? This default color is very transparent and similar to each other, which makes analysis difficult.
What can I do to resolve this problems?
Thanks in advance!
I'm having some problems trying to view RTOS tasks in System View. First I will list my system configuration
TARGET:
Board/MCU - FRDM-KL25Z with ARM Cortex-M0+ core on Kinetis KL25 from NXP;
Debuuger: OpenSDA with J-link
RTOS - FreeRTOS 9.0.0;
System View target sources: v2.52d
PC HOST:
OS: Windows 10 Professional
IDE - Kinetis Design Studio (KDS) from NXP;
Compiler - GCC/C99;
System View - v3.32.
The main project files created in KDS is attached below.
I have port the System View target sources to my project in KDS. I have patch the FreeRTOS sources from scratch with System View.
A macro called SEGGER_SYSVIEW_TOOL was used, which I can pass to gcc, when I want to use the system view. So when you don't want to compile
code related to system view, do not pass this macro. Therefore, all related segger code is between this preprocessor commands:
At the beginning of the "FreeRTOSConfig.h" file, it was inserted the header file that contains the "SystemCoreClock" definition (MKL25Z4.h).
At the end of the "FreeRTOSConfig.h" file is inserted:
In "FreeRTOSConfig.h" is set:
"INCLUDE_xTaskGetIdleTaskHandle 1" and "configUSE_TRACE_FACILITY 1".
To update the tick counts for system view, the SEGGER_SYSVIEW_TickCnt variable is incremented inside xPortSysTickHandler in the port.c file:
Source Code
- void xPortSysTickHandler( void )
- {
- uint32_t ulPreviousMask;
- #ifdef SEGGER_SYSVIEW_TOOL
- ++SEGGER_SYSVIEW_TickCnt;
- #endif
- ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR();
- {
- /* Increment the RTOS tick. */
- if( xTaskIncrementTick() != pdFALSE )
- {
- /* Pend a context switch. */
- *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
- }
- }
- portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask );
- }
of the "SEGGER_SYSVIEW_X_GetTimestamp" function for an ARM Cortex-M0+:
In the main function, It is called the "SEGGER_SYSVIEW_Conf" function to settle everything and start the application.
The application is formed by two tasks, having 1 second period (myTask) and 2 seconds period (myTask2).
The system view in PC find the correct parameters of my board, when it is attached to PC when selected "Target->Recordes Configuration" (image 1).
When the FRDM-KL25Z is attached to PC, I click in the "start recording" and it begins to record (image 2).
However, some problems appears in the visualization.
First of all, the time scale and value is wrong. After many seconds periods, the time scale is show in few miliseconds.
Second, I have to move the cursor in front of the timeline window whenever I want the system view to update the tasks view, which is really annoying.
Third, there are Tmr Svc and Idle timelines that show nothing. I believe something should be shown in Idle, but not sure with Tmr Svc.
And finally, is there a way to change the color of tasks on the timeline? This default color is very transparent and similar to each other, which makes analysis difficult.
What can I do to resolve this problems?
Thanks in advance!