This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Update SDK 17.0.2 to SDK 17.1.0 -> Pe020: identifier "x" is undefined

After I changed from SDK 17.0.2 to SDK 17.1.0 I get for the example project "blinky_FreeRTOS_pca10040" during the compilation with IAR Embedded Workbench IDE - Arm 8.50.9 the error message:

Error[Pe020]: identifier "x" is undefined

The problem happens in the file nrfx_coredep.h in line 161.

// Align the machine code, so that it can be cached properly and no extra
// wait states appear.
__ALIGN(16)

There is some problem at __ALIGN(16). Is there any solution for that?

I compared the project and configuration files of SDK 17.0.2 and SDK 17.1.0 but they are completely equal. So it can be a problem in the library or with IAR. I would be happy if you can give me a solution for that problem.

Parents
  • Hi,

    It seems to be a mistake in "compiler_abstraction.h" line 140:

      #if (__VER__ >= 8000000)
            #ifndef __ALIGN
                #define __ALIGN(n) __attribute__((aligned(x)))
            #endif
    

    Shouldn't the parameter be 'n' or 'x' in both cases?

    I changed it and compiled without errors.

Reply
  • Hi,

    It seems to be a mistake in "compiler_abstraction.h" line 140:

      #if (__VER__ >= 8000000)
            #ifndef __ALIGN
                #define __ALIGN(n) __attribute__((aligned(x)))
            #endif
    

    Shouldn't the parameter be 'n' or 'x' in both cases?

    I changed it and compiled without errors.

Children
Related