[SOLVED] Problems configuring project for SystemView using SES

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

  • [SOLVED] Problems configuring project for SystemView using SES

    I am creating a project using FreeRTOS. I first created the project using SW4STM32 (ac6). I followed the procedure in the SystemView manual to add SystemView code to my project. My project built and SystemView worked.

    However I desire to use SES rather than ac6 so I am porting the project over to SES. The project builds but there are 51 warnings including

    implicit declaration of function 'SEGGER_SYSVIEW_Conf' [-Wimplicit-function-declaration]
    implicit declaration of function 'SEGGER_SYSVIEW_Start' [-Wimplicit-function-declaration]

    and 49 additional redefinition warnings such as

    SEGGER_SYSVIEW_FreeRTOS.c
    "traceTASK_NOTIFY_TAKE" redefined
    SEGGER_SYSVIEW_FreeRTOS.c
    this is the location of the previous definition

    These warnings are caused because there are duplicate definitions in freeRTOS.h and in SEGGER_SYSVIEW_FreeRTOS.h. It seems that freeRTOS.h is being built first and then SEGGER_SYSVIEW_FreeRTOS.h. The SEGGER file redefines macros created in the FreeRTOS file.

    How do I stop these warnings?

    The bigger problem is that the compiler cannot find SEGGER_SYSVIEW_Conf and SEGGER_SYSVIEW_Start. Of course, they are needed to get SystemView to work. How do I fix this?

    I have attached my project in case you want to look at it.
    Files
    • Hello.zip

      (973.55 kB, downloaded 41 times, last: )
  • Hello,

    Thank you for your inquiry.
    The warnings come from the .patch file which is in your project. We recommend removing that file after applying that patch to FreeRTOS.
    Otherwise you will get such redefinition errors.
    Or if you want to keep it in the project explorer, right click and exclude from build.

    EDIT:
    The issue was actually related for the SEGGER_SYSVIEW_FreeRTOS.h not beeing included where needed.
    In the SystemView manual we recommend including it at the end of the FreeRTOSConfig.h so it is guaranteed that the defines are all set correctly.
    However in your project that include is commented out:

    C Source Code

    1. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
    2. standard names. */
    3. #define vPortSVCHandler SVC_Handler
    4. #define xPortPendSVHandler PendSV_Handler
    5. #define xPortSysTickHandler SysTick_Handler
    6. //#include "SEGGER_SYSVIEW_FreeRTOS.h"
    7. #endif /* FREERTOS_CONFIG_H */
    If you include the SEGGER_SYSVIEW_FreeRTOS.h at that place you should get no more warnings.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.
  • Nino

    I am embarrassed that I caused this problem. I copied the files from a working Eclipse project. The include was in the proper place there. I have no idea when I commented it out. I floundered around a lot trying to get the SystemView code integrated into my SES project. I must have commented it out during that process.

    One suggestion, you might modify the SystemView manual to make it clear that SEGGER_RTT.c, SEGGER_RTT.h, and SEGGER_RTT_Conf.h should not be copied into an SES project because those files are already there.

    But thank you for finding the problem for me. I was afraid I was going to have to do my FreeRTOS building and debugging in Eclipse and I really didn't want to do that. I've had enough of Eclipse problems so I want to move to Segger tools as much as possible. So last week I ordered a JLink-EDU so I could use Eclipse to build (since I couldn't get SES to work) and use Ozone to debug.

    Now that you have got me straightened out, I can flash my Nucleo board back to a J-Link and use SES / SystemView / Ozone....a complete Segger solution. I like it. I'm sure I'll find a use for my EDU.

    One MAJOR difference between Segger and all the other embedded system IDE and tool manufacturers is that Segger actually offers support. The other's have support sites but questions there go unanswered. As far as I can tell, Segger stands alone in offering quality support. THANK YOU! :thumbsup:
  • Also, how do I apply a .patch file? There was a menu option to do that in Eclipse. Can I apply the patch in SES? I've checked the v416 manual but the patch command there seems to modify the .elf and I'm pretty sure that is not what I want.

    I did it by copying the files from my Eclipse project after I had it apply the patch. I don't want to have to use Eclipse in the future.
  • Hello,

    ClarkS wrote:

    One MAJOR difference between Segger and all the other embedded system IDE and tool manufacturers is that Segger actually offers support. The other's have support sites but questions there go unanswered. As far as I can tell, Segger stands alone in offering quality support. THANK YOU!
    Thank you for your feedback!

    The patch file needs to be applied manually. You can use e.g. any diff tool of your liking.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.