Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 1 month ago.
Did the GCC built-in '__atomic' functions become unavailable?
Today , I got Error 20 the following in my program.
Error: Identifier "__ATOMIC_SEQ_CST" is undefined in "mruby-mbed-gvl/include/mruby/atomic_builtin_atomic.h", Line: 55, Col: 41
#if defined(__GNUC__) # define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if GCC_VERSION >= 40700 /* * target process using '__atomic' functions. * * Currently, the compile error occurs in this block. */ # elif GCC_VERSION >= 40100 /* * target process using '__sync' functions. */ # else /* * error */ # endif #endif
It will also fail to compile '
__sync' GCC built-in function. However this program and its revision had been successful to compile in July.
Was there any changes with online compilation environment after this summer vacation?
I think there was something changed in compile options, etc.
Is there anyone who has same problem? Please tell me if you know something.
I found the official document about GNU extension of ARMCC.
ARMCC doesn't provide GNU built-in function. Therefore, these functions were never used in my program.
This is my hypothesis from here,
Before summer, Online compiler had been to return _GNUC_ and _GNUC_MINOR_ and _GNUC_PATCHLEVEL_ macro values are less than 40700 and is used in my program.
Currently, these are 40700 and function is used, the error occurs. Because, maybe ARMCC was version up in online environment.
I don't know why is unavailable in online now. I export a program which is using and it is OK to compile in my MDK ARM environment.
I can't investigate anything more than this.
I will try to think about other way to access the memory atomically.
7 years, 1 month ago.
What version are u using offline ?The online compiler was updated a month ago to 5.06, which might have cased this?
Looking at ARMCC reference manual, synch_synchronize() should be available. gnu is still used, also for exported projects.