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.
8 years, 9 months 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.
regards,
PS
I found the official document about GNU extension of ARMCC.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472l/chr1359125006834.html
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.
1 Answer
8 years, 9 months 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.
Thank you for answering.
I am using "5.05 update 2 (build 169)" on my PC.
Now, I found the occurrence condition. The error occurs if DISCO_F746NG is selected for target platform. Any other platform is no problem.
Maybe, is not provided for M7 processors, isn't it?
I would like to enjoy DISCO_F746NG but It still have many issues...
posted by 22 Oct 2015
what are you compiling with which compiler?
posted by Erik - 21 Oct 2015Thank you for replying. I am using online IDE.
posted by sabme ua 21 Oct 2015The online compiler however does not use the GCC compiler, so I would have expected this would never have been able to compile.
posted by Erik - 21 Oct 2015No. I think that it can use the GNU extension, if ARMCC is given "
--gnu
" option. It's the same for local MDK ARM.And furthermore, I have the binary that is compiled by online compiler in July.
I published test program which outputs the gcc version.
Import programmbed_gcc_version
for check gcc version.
Last commit 22 Oct 2015 by
sabme ua
It can get the "gcc version = 40700".
So, maybe '
--gnu
' compiler option is given in online environment. However it can not use built-in functions.It doesn't make sense to me...
posted by sabme ua 21 Oct 2015