[ABANDONED] Undefined reference to Segger APIs after integrating SystemView files

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Undefined reference to Segger APIs after integrating SystemView files

    I have been trying to integrate Segger SystemView into my project but haven't had any luck so far.

    After manually applying the patch and including a #include "SEGGER_SYSVIEW_FreeRTOS.h", I start seeing a lot of undefined reference errors. For instance, "SEGGER_SYSVIEW_RecordExitISR" is defined in SEGGER_SYSVIEW.c , and SEGGER_SYSVIEW.c is already included in the preprocessor of the Segger IDE project.


    /app_timer_freertos.o: in function `app_timer_start':1> /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/components/libraries/timer/app_timer_freertos.c:194: undefined reference to `SEGGER_SYSVIEW_RecordExitISRToScheduler'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld:

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/components/libraries/timer/app_timer_freertos.c:194: undefined reference to `SEGGER_SYSVIEW_RecordExitISR'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/Init template - FreeRTOS/app_timer_freertos.o: in function `app_timer_stop':1>

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/components/libraries/timer/app_timer_freertos.c:230: undefined reference to `SEGGER_SYSVIEW_RecordExitISRToScheduler'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/components/libraries/timer/app_timer_freertos.c:230: undefined reference to `SEGGER_SYSVIEW_RecordExitISR'1>

    /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/Init template - FreeRTOS/port_cmsis_systick.o: in function
    `RTC1_IRQHandler':1>

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c:128: undefined reference to `SEGGER_SYSVIEW_RecordEnterISR'1>

    /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c:158: undefined reference to `SEGGER_SYSVIEW_RecordExitISRToScheduler'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld:

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c:166: undefined reference to `SEGGER_SYSVIEW_RecordExitISR'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/Init template - FreeRTOS/queue.o: in function `prvInitialiseNewQueue':1>

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/queue.c:447: undefined reference to `SEGGER_SYSVIEW_RecordU32x3'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/Init template - FreeRTOS/queue.o: in function `xQueueGenericSend':1>

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/queue.c:755: undefined reference to `SEGGER_SYSVIEW_ShrinkId'1> /Applications/SEGGER Embedded Studio for ARM 5.42/gcc/arm-none-eabi/bin/ld: /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/queue.c:755: undefined reference to `SEGGER_SYSVIEW_RecordU32x4'
  • Hello,

    Thank you for your inquiry.
    The guide for the SystemView integration is pretty straightforward:
    wiki.segger.com/FreeRTOS_with_…View#System_Configuration

    We recommend to use the example projects from the Wiki for reference.
    If your project setup looks different than the example project after following all steps then the guide was not followed correctly or the base FreeRTOS file setup used in your project is not the one that is officially shipped by FreeRTOS.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello

    Thanks for the response. Upon compiling, I see the following

    external/freertos/source/tasks.c:4740:50: error: macro "traceTASK_NOTIFY_TAKE" passed 1 arguments, but takes just 0

    8> In file included from ../../../../../../external/freertos/config/FreeRTOSConfig.h:213,8>
    from
    ../../../../../../external/freertos/source/include/FreeRTOS.h:57,8> from /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/tasks.c:37:8> ../../../../../../external/freertos/config/SEGGER_SYSVIEW_FreeRTOS.h:195: note: macro "traceTASK_NOTIFY_TAKE" defined here8>

    /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/tasks.c:4740:13: error: 'traceTASK_NOTIFY_TAKE' undeclared (first use in this function)8> /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/tasks.c:4740:13: note: each undeclared identifier is reported only once for each function it appears in8> /Users/Projects/BLE/nRF5_SDK_17.0.2_d674dde/external/freertos/source/tasks.c:4819:50: error: macro "traceTASK_NOTIFY_WAIT" passed 1 arguments, but takes just 0

    8> In file included from ../../../../../../external/freertos/config/FreeRTOSConfig.h:213,

    .......

    In FreeRTOS.h, I see compiler thinks traceTASK_NOTIFY_TAKE isn't recognized (hence greyed out) even though in SEGGER_SYSVIEW_FreeRTOS.h, I see traceTASK_NOTIFY_TAKE is defined

    #define traceTASK_NOTIFY_TAKE() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait)


    Also the project attached is for STM32 and I'm using a nordic uC

    The post was edited 1 time, last by faulkner ().

  • I checked with FreeRTOS community and looks like there needs to be changed made in the SystemView to accomodate the changes in FreeRTOS kernel 10.4 since the kernel uses an array of task notifications per task instead of just a single notification per task.

    Can you please update on this?
  • Hello,

    Did you read the provided Wiki article?
    Did you download the provided example project?
    It was made with FreeRTOS V10.4.3.
    It was tested and works.

    If you follow the steps and your resulting project looks like the example project SystemView will work with FreeRTOS V10.4 and on.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.