cancel
Showing results for 
Search instead for 
Did you mean: 

Segger SystemView Nucleo-F207ZG

avinpat_8
Associate II

Hi i am using Nucleo F207ZG EVK and i wanted to Make use of the Segger System view Tool

1. While using system view tool i have added the required files to the existing project but still some errors are occurred while running

2. I have attached image please go through this and let me know is there any ref doc for the Segger System View Tool with STM32 

3. The code is without FreeRTOS

4. Let me know is there any other settings to be added or ref example

5. i Have included the paths in the compiler settings also

Errors 

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/SEGGER_SYSVIEW.o: in function `_TrySendOverflowPacket':

D:/Projects/Internal Project/Stm32_Firmware/STMF207ZG_Limit_Switch/Debug/../Core/Src/SEGGER_SYSVIEW.c:664: undefined reference to `SEGGER_RTT_ASM_WriteSkipNoLock'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/SEGGER_SYSVIEW.o: in function `_SendPacket':

D:/Projects/Internal Project/Stm32_Firmware/STMF207ZG_Limit_Switch/Debug/../Core/Src/SEGGER_SYSVIEW.c:896: undefined reference to `SEGGER_RTT_ASM_WriteSkipNoLock'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/SEGGER_SYSVIEW.o: in function `SEGGER_SYSVIEW_Start':

D:/Projects/Internal Project/Stm32_Firmware/STMF207ZG_Limit_Switch/Debug/../Core/Src/SEGGER_SYSVIEW.c:1869: undefined reference to `SEGGER_RTT_ASM_WriteSkipNoLock'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `main':

D:/Projects/Internal Project/Stm32_Firmware/STMF207ZG_Limit_Switch/Debug/../Core/Src/main.c:109: undefined reference to `SEGGER_SYSVIEW_Conf'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:70: limit switch f207zg.elf] Error 1

 

avinpat_8_0-1741241710061.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
avinpat_8
Associate II

Hi the above Segger System View problem has been solved by following these steps


1. SEGGER_RTT_ASM_ARMv7M.S is missing from the project.

Either add it or #define RTT_USE_ASM 0 in SEGGER_RTT_Conf.h
 
 
3. Define func def for SEGGER_SYSVIEW_Conf(void)

 

void SEGGER_SYSVIEW_Conf(void)
{
   SEGGER_SYSVIEW_Init(120000000, 120000000, NULL, NULL);
   SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
   SEGGER_SYSVIEW_Start();
}

 

NOTE: Where 120000000 is clock speed of STM Microcontroller change according to your board

I am using without RTOS so the parameters in SEGGER_SYSVIEW_Init(120000000, 120000000, NULL, NULL); are NULL

Main.c

 

#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_Conf.h"
#include "SEGGER_SYSVIEW_Int.h"
#include "SEGGER_RTT.h"

int main(void)
{
   /* USER CODE BEGIN 1 */
   /* USER CODE END 1 */
   /* MCU Configuration--------------------------------------------------------*/

   /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
   HAL_Init();
   /* USER CODE BEGIN Init */
   /* USER CODE END Init */

   /* Configure the system clock */
   SystemClock_Config();
   /* USER CODE BEGIN SysInit */
   /* USER CODE END SysInit */

   /* Initialize all configured peripherals */
   MX_GPIO_Init();
   MX_USART3_UART_Init();

   /* USER CODE BEGIN 2 */
   SEGGER_SYSVIEW_Conf();
   // SEGGER_SYSVIEW_Start();
   /* USER CODE END 2 */

   /* Infinite loop */
   /* USER CODE BEGIN WHILE */
   while (1)
   {
      /* USER CODE END WHILE */

      /* USER CODE BEGIN 3 */
      //SEGGER_SYSVIEW_RecordEnterISR(); // dummy task start
      SEGGER_SYSVIEW_PrintfTarget("Processing...");

      HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0);
      HAL_Delay(100);
      //SEGGER_SYSVIEW_RecordExitISR(); // dummy task end
   }
   /* USER CODE END 3 */
}

 

View solution in original post

6 REPLIES 6
Ozone
Lead III

I haven't tried System View, but the Segger website says the following:
> SystemView operates by integrating a small software module, containing SystemView and RTT, into the target system. This module collects event data, formats it, and passes it to the RTT module.

I think you might need to read the full documentation.
But usually, this "integrating a small software module" comes in form of a link library you need to add to your project. The linker errors you get suggest this, too.

As a side note, Segger has it's own forum on <forum.segger.com>.
Specific questions have a better chance to be answered there.

avinpat_8
Associate II

Hi thanks for your reply I have contacted Segger System View team and my issue was resolved 

Hi thanks for your reply I have contacted Segger System View team and my issue was resolved 

For the benefit of future readers who may find this while looking to solve the same problem, please describe how you resolved the issue, then mark that post as the solution:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

(if the solution was given on the Segger forum, post a link to that)

avinpat_8
Associate II

Hi the above Segger System View problem has been solved by following these steps


1. SEGGER_RTT_ASM_ARMv7M.S is missing from the project.

Either add it or #define RTT_USE_ASM 0 in SEGGER_RTT_Conf.h
 
 
3. Define func def for SEGGER_SYSVIEW_Conf(void)

 

void SEGGER_SYSVIEW_Conf(void)
{
   SEGGER_SYSVIEW_Init(120000000, 120000000, NULL, NULL);
   SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
   SEGGER_SYSVIEW_Start();
}

 

NOTE: Where 120000000 is clock speed of STM Microcontroller change according to your board

I am using without RTOS so the parameters in SEGGER_SYSVIEW_Init(120000000, 120000000, NULL, NULL); are NULL

Main.c

 

#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_Conf.h"
#include "SEGGER_SYSVIEW_Int.h"
#include "SEGGER_RTT.h"

int main(void)
{
   /* USER CODE BEGIN 1 */
   /* USER CODE END 1 */
   /* MCU Configuration--------------------------------------------------------*/

   /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
   HAL_Init();
   /* USER CODE BEGIN Init */
   /* USER CODE END Init */

   /* Configure the system clock */
   SystemClock_Config();
   /* USER CODE BEGIN SysInit */
   /* USER CODE END SysInit */

   /* Initialize all configured peripherals */
   MX_GPIO_Init();
   MX_USART3_UART_Init();

   /* USER CODE BEGIN 2 */
   SEGGER_SYSVIEW_Conf();
   // SEGGER_SYSVIEW_Start();
   /* USER CODE END 2 */

   /* Infinite loop */
   /* USER CODE BEGIN WHILE */
   while (1)
   {
      /* USER CODE END WHILE */

      /* USER CODE BEGIN 3 */
      //SEGGER_SYSVIEW_RecordEnterISR(); // dummy task start
      SEGGER_SYSVIEW_PrintfTarget("Processing...");

      HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0);
      HAL_Delay(100);
      //SEGGER_SYSVIEW_RecordExitISR(); // dummy task end
   }
   /* USER CODE END 3 */
}

 

Thanks.

I've formatted your source code for you - please see How to insert source code for future reference.