Jump to content
Paul Christopher

Running µGFX on ESP32 and Arduino IDE

Recommended Posts

See https://community.ugfx.io/topic/921-errors-into-compile-ili9341-driver-for-arduino/?tab=comments#comment-6704

and for the sake of documentation for other users: If you want to run µGFX on an ESP32 and Arduino IDE, you need to enable as OS "FreeRTOS" and not "Arduino":


You might get a compiler error that "FreeRTOSConfig.h" cannot be found. Something seems to be wrong with the include paths, see https://github.com/espressif/arduino-esp32/issues/1423

In "gos_freertos.h", change the includes as follows:

#include "freertos/FreeRTOS.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/semphr.h"
#include "freertos/task.h"

Then it should compile.


Share this post

Link to post
Share on other sites

Note you should only set GFX_USE_OS_FREERTOS if you really are using the FreeRTOS operating system.

The problem with the paths is caused by the Arduino IDE itself. Normally you will add the FreeRTOS directory to the compiler include path. The Arduino IDE doesn't support that and uses a crazy "library module" scheme hence requiring changes to the sources that are different to every other compiler. Whether there is some way to fool it or not is another matter - I haven't had time to investigate in enough detail.

Share this post

Link to post
Share on other sites

Hi inmarket and thank you for the quick reply. See http://esp-idf.readthedocs.io/en/latest/api-guides/freertos-smp.html . The ESP32 (based on a Tensilica Xtensa LX6 processor) seems to really run a FreeRTOS based operating system. I will further test this and report the results here. Otherwise there seems to be no way to run µGFX on the ESP32 since there is no setjmp available (which is also considered incompatible with the freertos approach). Or do I miss something?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...