2015-06-09 06:44 AM
Hi,
I would like to use C++ 11 dialect with ac6 tools suite. But I get a compilation error that I'm not able to handle. Code : register char* stack_ptr asm(''sp''); Error : error: expected '=', ',', ';', 'asm' or '__attribute__' before 'asm' What should I do ? regards Julien2015-06-09 07:06 AM
Contact your toolchain vendor, i.e. ac6.
As they ''sold you'' nothing more than Eclipse+gcc, you might be better off following https://gcc.gnu.org/bugs/ . JW [EDIT] Shouldn't that be __asm()?2015-06-09 07:34 AM
''asm'' is not standard C++, it's GNU extension to the language, so you must use the
-std=gnu++11 option instead of -std=c++11.
2015-06-09 08:10 AM
Or use __asm__() (as I said above I use __asm() which works but may be dependent on some of the mentioned switches too).
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords JW2015-06-09 08:00 PM
Have you tried looking in core_cmFunc.h?
Specifically:/** \brief Get Process Stack Pointer
This function returns the current value of the Process Stack Pointer (PSP).
eturn PSP Register value
*/
static
__INLINE uint32_t __get_PSP(
void
)
{
register uint32_t __regProcessStackPointer __ASM(
''psp''
);
return
(__regProcessStackPointer);
}
It may be that the function has already been supplied.
Regards,
Carl.
2015-06-15 02:02 AM
Ok, thanks to all.
Julien