gcc: SEGGER_RTT_Conf.h:59:75: error: expected expression before ')' token : "=r" (SavedState)

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

  • gcc: SEGGER_RTT_Conf.h:59:75: error: expected expression before ')' token : "=r" (SavedState)

    Hi,

    I'm trying to build my firmware with the System View target sources included. This is for an ARM Cortex M0 and I'm using this version of gcc:

    gcc-arm-none-eabi-4_9-2015q1

    The build fails on compiling SEGGER_SYSVIEW.c as follows:


    C Source Code

    1. In file included from SEGGER_SYSVIEW_ConfDefaults.h:62:0,from SEGGER_SYSVIEW_Int.h:62,from SEGGER_SYSVIEW.c:133:SEGGER_SYSVIEW.c: In function '_APrintHost':SEGGER_RTT_Conf.h:59:75: error: expected expression before ')' token:"=r" (SavedState) \


    Here's the inline assembler source that's causing the error:

    C Source Code

    1. #define SEGGER_RTT_LOCK(SavedState) {\asm volatile ("mrs %0, primask \n\t" \"mov r1, $1 \n\t" \"msr primask, r1 \n\t" \: "=r" (SavedState) \: \: "r1"\ );\ }



    How do I fix this?
  • Hi,

    Could you update your SystemView and RTT sources to the latest version which is included in SystemView?

    Best regards
    Johannes
    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.
  • Thanks for the feedback, good to read it is working now.

    Regards
    Johannes
    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.