Page 1 of 1

C++ kEIL Compiler v6.6

Posted: Tue Feb 05, 2019 12:46 pm
by xrays
Hello,

I am trying to use ChibiOs in Keil with C++ Compiler v6.6. Board Nucleo-f446ZE.
Where is some warnings related to $ in the definition and so on. I needed to change assemble file names from *.s to *.S, add __GNUC__.
However, I have problems with adding CPP wrappers especially syscalls_cpp.cpp, because in this code is undeclared variable pid_t ? In the documentation I didn't find any suggestion about wrappers and they usage :(
The main reason to use it: I am familiar with Keil and needed LibUAVCAN library to connect to ArduPilot.

Re: C++ kEIL Compiler v6.6

Posted: Tue Feb 05, 2019 1:12 pm
by Giovanni
Hi,

Defining __GNUC__ should not be required, are you sure you are integrating the right files? where is this check on __GNUC__ anyway?

Giovanni

Re: C++ kEIL Compiler v6.6

Posted: Tue Feb 12, 2019 3:13 pm
by xrays
If I am not define __GNUC__ ChibiOS shows "unsupported compiler"
I am using your Demo with Keil support. Just changed MCU and to a newer version of the compiler. Until adding wrappers it's works perfectly.

Re: C++ kEIL Compiler v6.6

Posted: Tue Feb 12, 2019 4:32 pm
by Giovanni
hi,

The check is this one:

Code: Select all

/**
 * @brief   Compiler name and version.
 */
#if defined(__GNUC__) || defined(__DOXYGEN__)
#define PORT_COMPILER_NAME              "GCC " __VERSION__

#elif defined(__ICCARM__)
#define PORT_COMPILER_NAME              "IAR"

#elif defined(__CC_ARM)
#define PORT_COMPILER_NAME              "RVCT"

#else
#error "unsupported compiler"
#endif


Did Keil change their predefined macro?

Giovanni

Re: C++ kEIL Compiler v6.6

Posted: Wed Feb 13, 2019 5:22 pm
by xrays
Thanks, it's just one of mysterious bug, which disappeared. Now I have only linking errors with UAVCAN library MUltiply definitions and VectorB0.