0

I'm writing a program in C++ for my Tiva C Series board (EK-TM4C123GXL) and I'd like to use the USB lib provided by TI to make it a device for another board.

I use the startup_gcc.c file provided here.

Unfortunately, I cannot compile with those declarations :

extern void SysTickIntHandler(void);
extern void USB0DeviceIntHandler(void);

I get

(.isr_vector+0x3c):-1: error: undefined reference to `SysTickIntHandler'

I tried

#ifdef __cplusplus
extern "C"
{
#endif
void SysTickIntHandler(void);
void USB0DeviceIntHandler(void);
#ifdef __cplusplus
}
#endif

but nothing better.

too honest for this site
  • 12,050
  • 4
  • 30
  • 52
didil
  • 693
  • 8
  • 22
  • Probably not because the TivaWare (tiva libraries) have `extern "C"` and I can use them in my C++ program if I don't use interrupt handlers. – didil Oct 17 '15 at 15:01
  • Where is `SysTickIntHandler` defined? – cadaniluk Oct 17 '15 at 15:04
  • Somewhere in the [System Tick](http://www.ti.com/lit/ug/spmu298a/spmu298a.pdf) library of TI. – didil Oct 17 '15 at 15:06
  • do you link against this library? – m.s. Oct 17 '15 at 15:07
  • Yes, using [CMake](https://gist.github.com/anonymous/345714dca75e0794d7ec) `${TIVAWARE_PATH}/driverlib/gcc/libdriver.a`. – didil Oct 17 '15 at 15:09
  • You may need to have a [`naked` attribute](https://gcc.gnu.org/onlinedocs/gcc/AVR-Function-Attributes.html) placed with the function declaration. – πάντα ῥεῖ Oct 17 '15 at 15:11
  • I'm sorry but I found where that interrupt handler is located and it's completely useless for me. So I'll mark as solved. Thanks for your help :) – didil Oct 17 '15 at 15:15

0 Answers0