undefined reference to `getIsrTable' when compiling with arm-none-eabi-gcc-7.2.1

Status
Not open for further replies.

martinp

Member
Hello,

I get following message when I run the Makefile in cores/teensy3/ and it is configured to use arm-none-eabi-gcc-7.2.1:

pins_teensy.o: In function `detachInterrupt':
/Users/martinpavlas/Work/hardware/midi-controller/cores/teensy3/pins_teensy.c:258: undefined reference to `getIsrTable'
pins_teensy.o: In function `attachInterrupt':
/Users/martinpavlas/Work/hardware/midi-controller/cores/teensy3/pins_teensy.c:227: undefined reference to `getIsrTable'
collect2: error: ld returned 1 exit status
make: *** [main.elf] Error 1

The getIsrTable is defined as inline and it looks like linker will not find the symbol. When using gcc 5.4.1 that comes with Arduino, it links objects no problem.

Changing inline to static fixes the issue, however, it might not be appropriate. Does anybody have any suggestions how to resolve this without changing teensy source code?

thanks
 
Perhaps a dumb question from my side: Why use a compiler version which has not (yet) been approved be the Teensy maker? I remember that the last "official" toolchain update which came integrated with a Teensyduino release required also some reworking of the Teensyduino core files since each compiler version brings new constraints, checks, and compatibility issues. Thus, instead of using a not yet supported compiler, give the Teensy maker the time to adapt the core files and to deploy the new release after thorough testing with one of the next Teensyduino versions.

But I think that if Paul had seen important advantages in using gcc 7, he would have put this higher on his priority list. But obviously, he hasn't, which leads to my conclusion that for the existing range of Teensy products, gcc 7 does not make a noticeable difference. That might probably change later this year, when the Teensy 4 will come to market...
 
oh, I did not know that there is an approved version of compiler. Will take a look at that. I am not using teensyduino and therefore last stable gcc was choice. Thanks!
 
One of the major ideas behind the Teensyduino "ecosystem" and also the base of its success, is to maintain compatibility with the old and outdated 8bit AVR based Arduino stuff and their libraries which are sometimes lousily coded, to ease the path into the more performant 32bit ARM based Teensy hardware for beginners. Thus, every step "forward" has to be well considered in terms of backwards compatibility.
 
Status
Not open for further replies.
Back
Top