-2

I'm trying to get the segger systemview working on a STM32L073RZ nucle board with FreeRTOS. I have verified that freertos is working fine with the MCU as I could create 2 tasks and run them independentitly. But as soon as I try adding the Systemview and RTT source files I keep getting error.

These are the file versions that I'm using in this project.

FreeRTOS version FreeRTOSv202406.04-LTS (FreeRTOS Kernel V11.1.0)
STM32Cubeide version 1.19.0
STM32L0 FW package STM32Cube FW_L0 V1.12.3
MCU Reference STM32L073RZTx
Segger Systemview target source Release V3.60e

These are the errors I keep on getting.

Description Resource    Path    Location    Type
make: *** [makefile:70: FreeRTOS_Base_STM32L0.elf] Error 1  FreeRTOS_Base_STM32L0           C/C++ Problem
undefined reference to `SEGGER_SYSVIEW_X_GetTimestamp'  FreeRTOS_Base_STM32L0       line 0, external location: C:\Users\SESA674736\OneDrive - Schneider Electric\Documents\STM32CubeIDE\FreeRTOS_workspace\FreeRTOS_Base_STM32L0\ThirdParty\SEGGER\SEGGER\SEGGER_SYSVIEW.c:1456 C/C++ Problem
undefined reference to `SEGGER_SYSVIEW_X_GetTimestamp'  FreeRTOS_Base_STM32L0       line 0, external location: C:\Users\SESA674736\OneDrive - Schneider Electric\Documents\STM32CubeIDE\FreeRTOS_workspace\FreeRTOS_Base_STM32L0\ThirdParty\SEGGER\SEGGER\SEGGER_SYSVIEW.c:2107 C/C++ Problem
undefined reference to `SEGGER_SYSVIEW_X_GetTimestamp'  FreeRTOS_Base_STM32L0       line 0, external location: C:\Users\SESA674736\OneDrive - Schneider Electric\Documents\STM32CubeIDE\FreeRTOS_workspace\FreeRTOS_Base_STM32L0\ThirdParty\SEGGER\SEGGER\SEGGER_SYSVIEW.c:657  C/C++ Problem
undefined reference to `SEGGER_SYSVIEW_X_GetTimestamp'  FreeRTOS_Base_STM32L0       line 0, external location: C:\Users\SESA674736\OneDrive - Schneider Electric\Documents\STM32CubeIDE\FreeRTOS_workspace\FreeRTOS_Base_STM32L0\ThirdParty\SEGGER\SEGGER\SEGGER_SYSVIEW.c:881  C/C++ Problem

Not sure whats going wrong, BTW I'm a hardware engineer with limited knowledge of firmware.

Thanks in advance!

1
  • 1
    It seems to be a linker error meaning some lib isn't installed correctly or some of the required paths to all files are wrong. If you check the source for SEGGER_SYSVIEW_X_GetTimestamp then you should get a hint of which file that is the problematic one. Commented Nov 13 at 15:58

1 Answer 1

3

I got it working, it wasn't a linker problem but an implementation problem.

For Segger Systemview to run on ARM CM0 the user needs to implement the SEGGER_SYSVIEW_X_GetTimestamp() function.

While looking for a solution on github I came across this solution. Refer these 2 comits, Commit 866d39c and Commit 8cd0165

Keep in mind the function void xPortSysTickHandler( void ) is renamed to SysTick_Handler( void ) in recent versions of FreeRTOS in the file port.c of CM0

With above implementation its working fine for me, below are the library versions that I'm using.

  • FreeRTOS version FreeRTOSv202406.04-LTS (FreeRTOS Kernel V11.1.0)
  • STM32Cubeide version 1.19.0
  • STM32L0 FW package STM32Cube FW_L0 V1.12.3
  • MCU Reference STM32L073RZTx
  • System Clock 32Mhz
  • Segger Systemview target source Release V3.60e
  • Segger Systemview software V3.62b
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for sharing. SysTick_Handler would be the "standardized" name from ARM/CMSIS. All of this will be about whom in your toolchain that delivers the "C run-time" (CRT) start-up code (I guess that comes from ST rather than FreeRTOS?). Often SysTick_Handler is implemented as an empty default function with "weak linkage" inside the CRT, so that the user may write their own version of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.