I work on a project which uses Renesas RA6M5 MCU. The FreeRTOS version is 10.4.3. We use IAR 9.10. I installed the latest version of JLink V798a. The SystemView version is V3.54.
I'm trying to setup the Segger SystemView with FreeRTOS. I followed wiki.segger.com/FreeRTOS_with_SystemView. I also followed the document "UM08027.pdf".
Here are what I did:
1. After Segger SystemView software installed. Copy these folders to my project:
C:\Program Files\SEGGER\SystemView\Src\Config -> myProject\Segger\SystemView\Config
C:\Program Files\SEGGER\SystemView\Src\Sample\FreeRTOSV10.4 -> myProject\Segger\SystemView\FreeRTOS
C:\Program Files\SEGGER\SystemView\Src\SEGGER -> myProject\Segger\SystemView\Source
2. Add these files in the IAR project. Please see attached "Segger_Integration_Files.png":
/Config/Global.h
/Config/SEGGER_RTT_Conf.h
/Config/SEGGER_SYSVIEW_Conf.h
/FreeRTOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c
/FreeRTOS/SEGGER_SYSVIEW_FreeRTOS.c
/FreeRTOS/SEGGER_SYSVIEW_FreeRTOS.h
/Source/SEGGER.h
/Source/SEGGER_RTT.c
/Source/SEGGER_RTT.h
/Source/SEGGER_RTT_ASM_ARMv7M.S
/Source/SEGGER_RTT_printf.c
/Source/SEGGER_SYSVIEW.c
/Source/SEGGER_SYSVIEW.h
/Source/SEGGER_SYSVIEW_ConfDefaults.h
/Source/SEGGER_SYSVIEW_Int.h
3. Add the files path in the project options:
Project->Options->Runtime Checking->C/C++ Compiler->Preprocessor
Project->Options->Runtime Checking->Assembler->Preprocessor
4. At the end of FreeRTOSConfig.h or before every "FreeRTOS.h" add
5. Update the configurations:
5.1) Change: configUSE_TRACE_FACILITY 1
5.2) Change SEGGER_SYSVIEW_ConfDefaults.h: SEGGER_SYSVIEW_RTT_BUFFER_SIZE (1024*5)
5.3) In SEGGER_SYSVIEW_Config_FreeRTOS.c
5.4) From the definition, the SEGGER_SYSVIEW_CORE is SEGGER_SYSVIEW_CORE_CM3. But MCU is Renesas R7FA6M5AH, which is Cortex-M33. But I don't see any definition for Cortex-M33. Is it okay to have SEGGER_SYSVIEW_CORE as SEGGER_SYSVIEW_CORE_CM3 for my MCU?
6. Apply the Git path:
6.1) In the path file line #9, there is no INCLUDE_pxTaskGetStackStart. But I added "#define INCLUDE_pxTaskGetStackStart 1"
6.2) Maybe because I'm using the FreeRTOS from Renesas, I don't have "FreeRTOS/Source/portable/GCC/ARM_CM0/port.c", "FreeRTOS/Source/portable/GCC/ARM_CM3/port.c", or "FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c". Therefore, I don't have "xPortSysTickHandler()". But I have "Renesas\fsp_3.5.0\ra\fsp\src\rm_freertos_port\port.c". So I changed "void SysTick_Handler (void)" to apply the line #108 - #120.
6.3) For the same reason, I don't have "FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h", "FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h", or "FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h". But I do have "Renesas\fsp_3.5.0\ra\fsp\src\rm_freertos_port\portmacro.h". So I added:
6.4) For line #210, I can't find "void prvAddNewTaskToReadyList(". But I found the statements in "void vTaskSuspend( TaskHandle_t xTaskToSuspend )". So I added these. Not sure if I did it correctly or not:
traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB);
7. Add the following code before the task creations and "vTaskStartScheduler()":
SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();
After the above changes, I got the build passed. So I started my firmware and then paused it. I checked _SEGGER_RTT. I tried to export the data. But there is no way in IAR to export the data as "Raw Binary". I can't save it as SVdat format. Please see attached "IAR_Save_Memory.png". How can I export the memory data as binary in IAR?
I also tried to get the Continuous Recording working. In SystemView, I configured the JLink. Please see attched "Segger_SystemView_RecorderConfig.png". I hit the "Start Recording" button. After running 1% for a couple of seconds, the execution stopped. There is nothing showing up in the SystemView. Could you please point out where I did it wrong?
Thanks in advance!
I'm trying to setup the Segger SystemView with FreeRTOS. I followed wiki.segger.com/FreeRTOS_with_SystemView. I also followed the document "UM08027.pdf".
Here are what I did:
1. After Segger SystemView software installed. Copy these folders to my project:
C:\Program Files\SEGGER\SystemView\Src\Config -> myProject\Segger\SystemView\Config
C:\Program Files\SEGGER\SystemView\Src\Sample\FreeRTOSV10.4 -> myProject\Segger\SystemView\FreeRTOS
C:\Program Files\SEGGER\SystemView\Src\SEGGER -> myProject\Segger\SystemView\Source
2. Add these files in the IAR project. Please see attached "Segger_Integration_Files.png":
/Config/Global.h
/Config/SEGGER_RTT_Conf.h
/Config/SEGGER_SYSVIEW_Conf.h
/FreeRTOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c
/FreeRTOS/SEGGER_SYSVIEW_FreeRTOS.c
/FreeRTOS/SEGGER_SYSVIEW_FreeRTOS.h
/Source/SEGGER.h
/Source/SEGGER_RTT.c
/Source/SEGGER_RTT.h
/Source/SEGGER_RTT_ASM_ARMv7M.S
/Source/SEGGER_RTT_printf.c
/Source/SEGGER_SYSVIEW.c
/Source/SEGGER_SYSVIEW.h
/Source/SEGGER_SYSVIEW_ConfDefaults.h
/Source/SEGGER_SYSVIEW_Int.h
3. Add the files path in the project options:
Project->Options->Runtime Checking->C/C++ Compiler->Preprocessor
Project->Options->Runtime Checking->Assembler->Preprocessor
4. At the end of FreeRTOSConfig.h or before every "FreeRTOS.h" add
5. Update the configurations:
5.1) Change: configUSE_TRACE_FACILITY 1
5.2) Change SEGGER_SYSVIEW_ConfDefaults.h: SEGGER_SYSVIEW_RTT_BUFFER_SIZE (1024*5)
5.3) In SEGGER_SYSVIEW_Config_FreeRTOS.c
5.4) From the definition, the SEGGER_SYSVIEW_CORE is SEGGER_SYSVIEW_CORE_CM3. But MCU is Renesas R7FA6M5AH, which is Cortex-M33. But I don't see any definition for Cortex-M33. Is it okay to have SEGGER_SYSVIEW_CORE as SEGGER_SYSVIEW_CORE_CM3 for my MCU?
6. Apply the Git path:
6.1) In the path file line #9, there is no INCLUDE_pxTaskGetStackStart. But I added "#define INCLUDE_pxTaskGetStackStart 1"
6.2) Maybe because I'm using the FreeRTOS from Renesas, I don't have "FreeRTOS/Source/portable/GCC/ARM_CM0/port.c", "FreeRTOS/Source/portable/GCC/ARM_CM3/port.c", or "FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c". Therefore, I don't have "xPortSysTickHandler()". But I have "Renesas\fsp_3.5.0\ra\fsp\src\rm_freertos_port\port.c". So I changed "void SysTick_Handler (void)" to apply the line #108 - #120.
6.3) For the same reason, I don't have "FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h", "FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h", or "FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h". But I do have "Renesas\fsp_3.5.0\ra\fsp\src\rm_freertos_port\portmacro.h". So I added:
Source Code
- // I have to add these in order to get it compile:
- #define portNVIC_INT_CTRL_REG ( *( ( volatile uint32_t * ) 0xe000ed04 ) )
- #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
- #define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired ) \
- { traceISR_EXIT_TO_SCHEDULER(); portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } }
6.4) For line #210, I can't find "void prvAddNewTaskToReadyList(". But I found the statements in "void vTaskSuspend( TaskHandle_t xTaskToSuspend )". So I added these. Not sure if I did it correctly or not:
traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB);
7. Add the following code before the task creations and "vTaskStartScheduler()":
SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();
After the above changes, I got the build passed. So I started my firmware and then paused it. I checked _SEGGER_RTT. I tried to export the data. But there is no way in IAR to export the data as "Raw Binary". I can't save it as SVdat format. Please see attached "IAR_Save_Memory.png". How can I export the memory data as binary in IAR?
I also tried to get the Continuous Recording working. In SystemView, I configured the JLink. Please see attched "Segger_SystemView_RecorderConfig.png". I hit the "Start Recording" button. After running 1% for a couple of seconds, the execution stopped. There is nothing showing up in the SystemView. Could you please point out where I did it wrong?
Thanks in advance!
The post was edited 1 time, last by pilot8 ().