Compiling PC Emulator example for ESP-SBC-FabGL

Started by pollito, November 17, 2023, 05:49:45 PM

Previous topic - Next topic

pollito

Hi there,

I've just installed Ardiuno IDE on my laptop, and am trying to compile the PC Emulator FabGL example, but no matter which version of FabGL I try, I get the following error:

C:\Users\pollito\AppData\Local\Temp\.arduinoIDE-unsaved20231017-4420-5owosu.t2chh\PCEmulator\PCEmulator.ino:44:10: fatal error: esp_spiram.h: No such file or directory
   44 | #include "esp_spiram.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: esp_spiram.h: No such file or directory

A quick google search shows that this was removed by Espressif in favour of esp_psram.h from version 5.0.

I've tried the latest release version of FabGL, the current one downloaded directly as a ZIP from Github, and the Olimex version, but all throw the same error.

The weird thing is that, on my desktop PC, the sketch compiles fine and I can upload it to the board. I have tried copying the version of FabGL from the PC to the laptop, but the issue persists.

The only thing I can think of is that the PC is using ESP-IDF 4.x, the laptop is using ESP-IDF 5.x, and that I somehow I need to configure the latter to use the earlier version. Does anyone know how I can do this?

Incidentally, both machines have the same "Addition board manager URLs" as below, and I am choosing "ESP32 Dev Module" for both along with the settings needed for PC Emulator.

https://dl.espressif.com/dl/package_esp32_index.json
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

(Not sure why I have both of these tbh)

Any help would be greatly appreciated - I am going nuts trying to work out what's going on! ;)

Many thanks in advance.

pollito

I uninstalled Arduino IDE, deleted the Arduino folder in Documents, removed all Arduino folders from my user profile (both Local and Roaming), and deleted all Arduino sub-folders from my Temp folder.

Then I downloaded and installed the latest version of Ardiuno IDE, added the boards URL, installed the "esp32 by Espressif Systems" board, and the FabGL library. Now I can compile the PC Emulator example as well as the others I've tried.

I'm not 100% sure what the magic step was, but I may have been using the "Arduino ESP32 Boards" instead of the Espressif version.

LubOlimex

Thanks for update and solution. I've had a few cases where libraries from older and newer versions of different Arduino packages existed and caused build problems. If anything is not compiling and anything else doesn't seem to make it work deleting everything and starting from a fresh installation is a always a good idea.
Technical support and documentation manager at Olimex

Andy2No

Just to update this for anyone else finding this thread; the official answer is to use v2.0.11 of Espressif ESP32 boards support for Arduino (Tools->Boards->Boards manager) instead of the current one (v3.0.2).  I found it necessary to uninstall 3.0.2 before installing 2.0.11).

The board type (Tools->Board) should then be set to:
ESP32 Dev Module

This has now been added to the ESP32_SBC_FabGL manual, and the readme page of the github repository for the Olimex version of FabGL (https://github.com/OLIMEX/FabGL).  It's discussed here: https://www.olimex.com/forum/index.php?topic=9551.msg40162#msg40162