Esp_memory_utils.h missing in Arduino IDE

My apologies if I've missed something obvious here, but I am royally stuck :pensive:

I'm trying out some demos for a Waveshare TFT / ESP3-S3 combo. They're all dependent on the ESP32_Display_Panel and ESP32_IO_Expander libraries which in turn references the esp_memory_utils.h from esp-idf, but is lacking in Arduino IDE (or vscode w/ Arduino ext).

As far as I can see it's not available via the library manager. Any way of getting this to work in Arduino IDE or do I have to make switch to esp-idf?

Any help much appreciated :slightly_smiling_face:

Install it manually ?

esp-idf isn't just the libs. It's the whole toolchain including build tools. Not sure if it's the right path to start cherry picking parts from the API :thinking: But I may be missing something obvious here :man_shrugging:

I was not suggesting installing idf manually. You were asking about esp_memory_utils.h, which is on GitHub so could be installed manually along with any other associated library files

esp_memory_utils.h is in v5 of ESP-IDF -- if you follow that link, note the release/v5.0 in the branch/tag picker at the top left. If you switch to release/v.4.4, it is no longer there. In theory, it could have moved, but if you pull the repo and check at those tags, it's not there.

$ git checkout release/v5.0
Branch 'release/v5.0' set up to track remote branch 'release/v5.0' from 'origin'.
Switched to a new branch 'release/v5.0'
$ find . -name 'esp_memory_utils.h'
./components/esp_hw_support/include/esp_memory_utils.h
$ git checkout release/v4.4
Branch 'release/v4.4' set up to track remote branch 'release/v4.4' from 'origin'.
Switched to a new branch 'release/v4.4'
$ find . -name 'esp_memory_utils.h'
$

ESP-IDF is likely packaged as part of your Board, not a Library, by Espressif as arduino-esp32 -- and the latest release is two weeks old: Arduino Release v2.0.16 based on ESP-IDF v4.4.7. There is a pre-release Arduino Release v3.0.0 RC3 based on ESP-IDF v5.1 (third release candidate) posted yesterday.

You could try that RC3, but it won't have any board-specific tweaks, unless your manufacturer is also following along with their own RC.

I've never tried it myself, but I have an idea how to -- holler if you need help on that.

Hi @BadPixel. The dependence on esp-idf 5.x (and thus "esp32" boards platform version 3.x) was introduced in the 0.1.0 release of the "ESP32_Display_Panel" library. So if you would like to use the library with esp32 boards platform 2.x, you should install version 0.0.2 of the library which is the last version that is compatible with esp-idf 4.x.

I'll provide instructions you can follow to do that:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
  2. Type ESP32_Display_Panel in the "Filter your search..." field.
  3. Scroll down through the list of libraries until you see the "ESP32_Display_Panel" entry.
  4. You will see a drop-down version menu at the bottom of the entry. Select "0.0.2" from the menu.
  5. Click the "INSTALL" button at the bottom of the entry.
    An "Install library dependencies" dialog will open.
  6. Click the "INSTALL ALL" button in the "Install library dependencies" dialog.
    The dialog will close.
  7. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    ⓘ Successfully installed library ...

Arduino IDE will periodically display a notification that offers to update the library for you:

Updates are available for some of your libraries.

If you click the "INSTALL MANUALLY" button in the notification, a list of each of the libraries that have available updates will be shown in the Arduino IDE Library Manager. It is generally a good idea to keep your libraries updated since the updates might provide important enhancements or bug fixes. So you should look through the list and update other libraries if appropriate, but you should avoid accepting the update for the "ESP32_Display_Panel" library.


Alternatively, you can use the pre-release version of the esp32 boards platform 3.0.0 with the latest version of the "ESP32_Display_Panel" library. You can install the pre-release version of the platform by following the instructions here:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide

Make sure to put the URL shown under the "Development release link" section of those instructions in your "Additional Boards Manager URLs" IDE preference instead of the URL from the "Stable release link" section of the instructions as we would normally do.

You should note that the development versions of the "esp32" boards platform are primarily intended to allow the community to contribute to the development of the platform by doing beta testing and reporting any issues they might have found; not for everyday usage for developing Arduino projects. The development version of the platform might work just fine for you, but you should be aware that you are more likely to run into bugs than you would if using the stable release version of the platform.

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