Is Arduino ESP32 supporting the new ESPIDF 5 RMT back-end?

I can't seem to find a clear answer if Arduinos ESP32 Nano is supporting the ESPIDF 5 RMT backend?

It seems it does, but why do I get this error message when trying to compile this library:


#include <DShotRMT.h>

byte pin = 7;
DShotRMT mot(pin);
 
void setup() {

  mot.begin(DSHOT300, ENABLE_BIDIRECTION, 14);
 
}

void loop() {

  	mot.send_dshot_value(48);
  
}

In file included from /Users/hja/Documents/Arduino/0_1_Dshot_BIDIR_TEST/0_1_Dshot_BIDIR_TEST.ino:2:
/Users/hja/Documents/Arduino/libraries/DShot-rmt/src/DShotRMT.h:7:10: fatal error: driver/rmt_rx.h: No such file or directory
 #include <driver/rmt_rx.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

And yes, I did remove the dependency of GitHub - DrGlaucous/esp-rmt-NEO: Ported the v5.0 esp-idf RMT libs to the arduino environment from the library.json file.

I think you need to get an answer from the author of the DShot library re esp32 support.

1 Like

The author is very clear in his 'Readme' about support for ESPIDF 4 & 5 and made a special (extra) library for ESPIDF v4 environments. However I can't get the v4 lib to work neither.

Hence my question, is Arduino ESP32 supporting ESPIDF 5?

Hi @hybricks.

The official "Arduino ESP32 Boards" platform that adds support to Arduino IDE for the Nano ESP32 board is based on ESP-IDF version 4.4.7. ESP-IDF 4.x has a different RMT driver API than ESP-IDF 5.x:

https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32s2/migration-guides/release-5.x/peripherals.html#rmt-driver


If you need to use ESP-IDF 5.x with the Nano ESP32 board, you can use the 3rd party "esp32" boards platform instead of the "Arduino ESP32 Boards" platform. I'll provide instructions you can follow to do that:


:red_exclamation_mark: The "esp32" boards platform is not maintained by the Arduino company. We recommend using the "Arduino ESP32 Boards" platform with the Nano ESP32 board for the highest level of stability and support.


  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Find the "esp32" entry in the list of boards platforms.
  3. Click the "INSTALL" button at the bottom of the entry.
  4. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

  5. Select Tools > Board > esp32 > Arduino Nano ESP32 from the Arduino IDE menus.

Note that the "esp32" boards platform will now be used when you select Tools > Board > esp32 > Arduino Nano ESP32 from the Arduino IDE menus. If you instead want to use the "Arduino ESP32 Boards" platform, select Tools > Board > Arduino ESP32 Boards > Arduino Nano ESP32 from the Arduino IDE menus.

Hi ptillisch,

Thanks (again :wink:) for helping me out!
Installed the esp32 boards, selected Arduino Nano ESP32, all good.
Compiled a further simplified piece of code

#include <DShotRMT.h>

byte pin = 7;
DShotRMT mot(pin);
 
void setup() {

  mot.begin(DSHOT300, ENABLE_BIDIRECTION, 14);
 
}

void loop() {
 
	mot.send_dshot_value(48);
  
}

And get a hole bunch of (new) error messages, mainly referring to

Library/Arduino15/packages/esp32/hardware/esp32/3.2.0/cores/esp32 ***.h files.

Please find the error messages in file attached.
Any help is great, thanks!

Errors after compiling DShotRMT new.txt (108.1 KB)

Arduino Core 3.x.x is built on ESP-IDF 5. So yes. You can use RMT functions from:

  1. ESP-IDF (
  2. Arduino Core (see esp32-hal-rmt.h in Arduino Core)

BTW i don't remember any "driver/rmt_rx.h" file in ESP-IDF or Arduino Core.

I'll add to this by explaining that the "Arduino ESP32 Boards" platform is a fork of the "esp32" boards platform. The "Arduino ESP32 Boards" platform is based on version 2.0.17 of the "esp32" platform, so this is the reason why it uses ESP-IDF 4.4.7 even though the latest version 3.2.1 of the "esp32" platform is based on ESP-IDF 5.4.2.

Here it is:

1 Like

I gave it a try and the sketch compiled successfully for me. I am using the latest version 3.2.1 of the "esp32" platform, while you have 3.2.0. I don't have a specific reason to think that there is a problem with 3.2.0, but I do see there were some RMT-related changes in the "esp32" platform between 3.2.0 and 3.2.1 so it is possible. Anyway, it is a good idea to update anyway so I think it is worth a try. The reason you got an outdated version of the "esp32" platform when you followed the instructions I provided is because the 3.2.1 came out only yesterday and the data used to populate the Arduino IDE Boards Manager by default hasn't yet been updated. You can get the latest version by following these instructions:

  1. Open the web page containing Espressif's official installation instructions for the ESP32 boards platform:
    https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide
  2. Copy the URL shown under the "Stable release link" section of that page.
  3. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  4. If there is already a URL for the ESP32 boards platform in the "Additional Boards Manager URLs" field of the "Preferences" dialog, delete it.
  5. Add the URL you copied from the ESP32 boards platform installation instructions to the "Additional Boards Manager URLs" field.
    If there are other URLs in the field, separate them with commas (,).
  6. Click the "OK" button on the "Preferences" dialog.
    The "Preferences" dialog will close.
  7. You will now see a "Downloading index: ..." notification at the bottom right corner of the IDE window. Wait for that notification to close.
  8. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  9. Find the "esp32 by Espressif Systems" entry in the list of boards platforms.
  10. Click the "UPDATE" button at the bottom of the entry.
  11. Wait for the update process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

Now try compiling the sketch again. Hopefully everything will work as expected this time.

You are a hero! It compiles without any problems! Great!

And first tests are succesful: Working Bidirectional DShot, receiving the actual RPM value of the BLDC motor. Gets me to the next phase in my project :star_struck:

Wonderful news! Thanks for taking the time to post an update.

Regards, Per