ESP32 Arduino Core error with included library

Sysprogs forums Forums VisualGDB ESP32 Arduino Core error with included library

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #28154
    jkallus
    Participant

    I’m trying to use https://github.com/pixelmatix/SmartMatrix/tree/teensylc with ESP32 to control RGB LED Matrixes. This library and its examples compile using the Arduino IDE version 1.8.12 with no errors. When I try to compile using VisualGDB it has this error:

    C:\Users\Josh\source\repos\ArduinoProject1\ArduinoProject1\Output\ESP32_Dev_Module\Debug\sketch\ArduinoProject1.ino.cpp.o(0): error : undefined reference to `vtable for SM_Layer'
    collect2.exe: error: ld returned 1 exit status

    This is something related to virtual functions probably but I think the issue lies not with this library but with something being done by VisualGDB. This could be a bug or perhaps I’m just using it wrong somehow. I’m using VisualGDB 5.4R12 build 3309 and the ESP32 toolchain version 8.2.0/8.1.0/r3.

    #28155
    support
    Keymaster

    Hi,

    Please try building the same project with the Arduino IDE. If the problem persists, the issue is with a specific library. If not, we can help you configure VisualGDB to match the behavior of the Arduino IDE.

    #28156
    jkallus
    Participant

    I opened the project made by VisualGDB in the Arduino IDE and it compiled fine there.

    #28158
    support
    Keymaster

    Thanks for confirming this. To narrow the problem further, please follow the steps below:

    1. Dump the build command line used by VisualGDB to a batch file as shown here. Make sure the build fails when running the batch file.
    2. Try modifying the batch file to use the arduino-builder.exe from the Arduino IDE directory instead of the VisualGDB’s one. Does it solve the problem?
    3. If not, please check the ESP32 Arduino core version used by the Arduino IDE and VisualGDB. If they are not the same, please try updating the core used by VisualGDB via Tools->VisualGDB->Manage VisualGDB Packages.
    #28159
    jkallus
    Participant

    I tried following the troubleshooting tutorial but I don’t have the same window options as it. There is no VisualGDB build window available. The error I posted initially is from the Output window. There is no option to right click and dump to batch file there. I am running Visual Studio Community 2019 16.4.5

    • This reply was modified 4 years, 7 months ago by jkallus.
    #28160
    support
    Keymaster

    Please make sure you install the latest VisualGDB 5.5 Preview 5.

    #28162
    jkallus
    Participant

    I’ll do that now

    #28163
    jkallus
    Participant

    After updating to VisualGDB 5.5 Preview 5 I was able to dump to .bat file. I tried to replace the path to arduino-builder.exe with the Arduino installation path but when I ran the batch file it did’t run and displayed the usage of the executable suggesting the flags were not valid. Also the version of ESP32 Arduino Core is 1.04 for both VisualGDB and Arduino IDE.

    #28164
    jkallus
    Participant

    I resolved this by turning on verbose build and unchecking “Debug build disables optimization for:  Arduino Sketch”. Perhaps there is some sort of bug involving the optimizations being used.

    #28167
    support
    Keymaster

    Good to know it works. BTW, we have a detailed tutorial showing how to compare build command lines between VisualGDB and the Arduino IDE here: https://visualgdb.com/tutorials/arduino/diagnosing/

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.