C++ kEIL Compiler v6.6

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
xrays
Posts: 3
Joined: Tue Feb 05, 2019 11:37 am

C++ kEIL Compiler v6.6

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: C++ kEIL Compiler v6.6

Post 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
xrays
Posts: 3
Joined: Tue Feb 05, 2019 11:37 am

Re: C++ kEIL Compiler v6.6

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: C++ kEIL Compiler v6.6

Post 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
xrays
Posts: 3
Joined: Tue Feb 05, 2019 11:37 am

Re: C++ kEIL Compiler v6.6

Post 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.
Post Reply