This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compilation error when compiling C++ project with r_ether driver, ISR prototypes need extern "C" wrapper

Not sure if this is the right place to report software issues with the FSP. This is with e2 Studio Version: 2021-04 (21.4.0) and FSP 3.0.0

The ISR declarations in vector.h should be wrapped with extern "C" so the project can be compiled with C++. 

For example when compiling a simple C++ project with g_ether0 stack added, this error occurs:

...\cpptest\ra\fsp\inc\instances/r_ether.h:160:6: error: conflicting declaration of 'void ether_eint_isr()' with 'C' linkage
160 | void ether_eint_isr(void);

Once vector_data.h is modified to wrap the ISR prototypes like below, compilation is fine.

/* ISR prototypes */

#ifdef __cplusplus
extern "C" {
void ether_eint_isr(void);
void canfd_error_isr(void);
void canfd_channel_tx_isr(void);
void canfd_rx_fifo_isr(void);
void sci_uart_rxi_isr(void);
void sci_uart_txi_isr(void);
void sci_uart_tei_isr(void);
void sci_uart_eri_isr(void);
#ifdef __cplusplus