Jump to content

Paul Christopher

  • Content Count

  • Joined

  • Last visited

About Paul Christopher

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks Joel, the demo "demos\modules\gos\threads" works fine on my ESP32 which uses FreeRTOS. Using "Bare Metal" and my own setjmp replacement, it crashes on the ESP8266. The example does not work on Arduino Uno and Mega with "Bare Metal" either. So I am thinking about a replacement/enhancement for the threading in gos_arduino.c (without the setjmp solution in gos_x_threads). There are quite some generic Arduino threading libraries out there, but I haven't found one, that supports yield() within the threads. The all built on the principle that there is a central scheduler that regularily calls
  2. Thank you, inmarket and Joel! I have now implemented the fillrect function used in the Adafruit library as GDISP_HARDWARE_FILLS, and indeed, it is much faster now. All in all, I'm quite happy with the performance: Clearing the screen with a certain color takes 33ms on the ESP32 using SPI. I had some trouble getting µGFX work with the ESP8266. I have found a solution now by adding a custom setjmp/longjmp. Filling the screen just with a certain color works, but I doubt that for this the ugfx scheduler / ugfx multi-threading solution is used? What would be a good example in the code bas
  3. See zip file attached: Based on the tinyscreen example \ugfx\boards\base\ArduinoTinyScreen you can find now a version for an ILI9341 display and ESP32 on Arduino IDE. The ReadMe.txt explains the installation. ArduinoIDE_ESP32_ILI9341.zip
  4. Thank you Joel for the helpful explanations! I have now digged more into the code and learned a lot. With GDISP_HARDWARE_STREAM_WRITE, the µGFX driver already implements the approach I pointed out above and which is used in the Adafruit library. And I also had a look into the datasheet: The ILI9341 chip seems not to support GDISP_HARDWARE_FILLS (but for example GDISP_HARDWARE_SCROLL). My conclusion is, that the bad performance is caused by a) the need to write a wrapper around the Adafruit class, b) no way to speed up the run time by inlining the wrapper functions and c) some remaini
  5. 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?
  6. 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": #define GFX_USE_OS_FREERTOS TRUE #define GFX_OS_NO_INIT TRUE 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: #includ
  7. See https://forum.arduino.cc/index.php?topic=473378.0 . I had quite some trouble getting a cheap Chinese ILI9341 based display work with µGFX, ESP32 on Arduino IDE. The code compiled fine, the program ran fine, but I only got a white screen. No startup logo, no drawings, just a white screen. It took me quite some time to figure this out: For some of these cheap displays, its seems to be crucial to get a proper hardware reset in the beginning. Otherwise they won't output anything. To make it work, I had to change µGFX core, i. e. gdisp_lld_ILI9341.c. I replaced the given cod
  8. The newbie made a major mistake since he didn't know the difference between "software SPI" and "hardware SPI" and instantiated the Adafruit_ILI9341 class with software SPI by default. I changed this now, see updated zip file attached. I'm just wondering about the performance: Drawing a blue solid rectangle all over the screen takes the original Adafruit GFX library 270ms, µGFX with my Adafruit based board file 512ms. Am I doing something wrong? Is there a way to speed this up? The original Adafruit library seems to have special functions for drawing a rectangle (with no equivalent i
  9. Thank you Joel and inmarket for the hints! I have implemented the multiple display support now in the board file. Attached you can find a working version of a more generic board file for the Arduino IDE based on the Adafruit_ILI9341 library which supports severals boards. I have successfully tested the board file with "Arduino Uno" and "Arduino Mega 2560". I doesn't work with the ESP32 so far (and presumably ESP8266) -- although the Adafruit library supports them. Reason: No implementation for setjmp.h in the Arduino environment, see https://community.ugfx.io/topic/921-errors-into-co
  10. Thanks, Joel! Your hints helped me to isolate the problem, and the code compiles now. I will test the new board file this weekend when I have more time. By the way: How to deal with the initialization of multiple displays of the same kind in the board file? To be more generic (so that the user does not need to change the board file itself when using my library), I use #defines in main.c / the main .ino file to pass the pin-setting to the board file, i.e. init_board picks those #defines up and communicates with the board via the mentioned pins. But what happens if I want to use t
  11. The link to the licence as given in the source code of version 2.8 seems to be wrong /* * This file is subject to the terms of the GFX License. If a copy of * the license was not distributed with this file, you can obtain one at: * * http://ugfx.org/license.html */ http://ugfx.org/license.html does not work. Should link to https://ugfx.io/license.html??
  12. Hi, I'm trying to get started with the µGFX lib, and my first project is to write a new board file for the Arduino IDE and ILI9341 displays based on the example given in µgfx/boards/base/ArduinoTinyScreen. The basic idea of my project is to use parts of Adafruit's library "Adafruit_ILI9341", since it supports a wide range of boards (Arduino Mega, TEENSYDUINO, ESP8266, ESP32, Feather STM32, ...): https://github.com/adafruit/Adafruit_ILI9341. See board file attached: I have already stripped down the library and isolated the necessary parts to keep it small. I have already integrated th
  • Create New...