Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug when using FlexCAN_T4 on platformIO #68

Open
Moi78 opened this issue Oct 19, 2023 · 2 comments
Open

Unable to debug when using FlexCAN_T4 on platformIO #68

Moi78 opened this issue Oct 19, 2023 · 2 comments

Comments

@Moi78
Copy link

Moi78 commented Oct 19, 2023

Hello,
I was trying to debug a program on a Teensy 4.0 but I found out that I was completely unable to compile my firmware in debug mode due to FlexCAN_T4.

Here is the error :

c:/users/mathys.d/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: .pio\build\teensy40\src\main.cpp.o: in function `FlexCAN_T4<(CAN_DEV_TABLE)1075642368, (FLEXCAN_RXQUEUE_TABLE)256, (FLEXCAN_TXQUEUE_TABLE)16>::FlexCAN_T4()':
C:\Users\mathys.d\.platformio\packages\framework-arduinoteensy\libraries\FlexCAN_T4/FlexCAN_T4.tpp:68: undefined reference to `vtable for FlexCAN_T4_Base'

I am using PlatformIO in visual studio.

Thanks in advance,

@ishelly404
Copy link

I ran into this issue as well, I was able to fix it by changing line 331 in FlexCAN_T4.h from
virtual uint8_t getFirstTxBoxSize(); to virtual uint8_t getFirstTxBoxSize() = 0;. The issue seems to be because of a missing definition of the virtual function getFirstTxBoxSize().

I was able to debug without issue after making this change.

@finhudson
Copy link

I'm having the same problem, though line 331 is already updated to what you said in the newest version. Anyone else got any ideas what might be causing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants