Incorrect library in compiling for M5STICKC in web editor

I ran into a bug compiling with the web editor when compiling the vendor-supplied example program Examples/M5STICKC/Basics/FactoryTest. It compiles properly from IDE 2.0 but fails from the Web Editor. The error that I get is:

/home/builder/opt/libraries/latest/esp32_ble_arduino_1_0_1/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared

Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);

After looking at the verbose compilation output from both Web Editor and IDE 2.0, I think I see where the problem is, and it is that Web Editor is using a wrong library for one of the include files, BLE2902.h. There are several libraries that contain the include file to choose from, and it seems to be picking the wrong one. Here are the libraries used by the Web Editor and IDE 2.0 from the compiler output:

From Web Editor

Multiple libraries were found for "BLE2902.h"
Used: /home/builder/opt/libraries/esp32_ble_arduino_1_0_1
Not used: /home/builder/opt/libraries/seeed_arduino_rpcble_1_0_0
Not used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/libraries/BLE

From IDE 2.0

-IC:\\Users\\jaybr\\AppData\\Local\\Arduino15\\packages\\m5stack\\hardware\\esp32\\2.0.4\\libraries\\BLE\\src

So in short, it looks like the Web Editor is using the esp32 Version 1.0.1 library when it should be using Version 2.0.4 (in this case supplied by m5stack).

Check:

  1. Error: Multiple libraries were found
  2. Selecting between multiple libraries with the same name

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.