Skip to content

Elecrow 5 and 7 inches support#309

Draft
themelisx wants to merge 14 commits intojgauchia:develfrom
themelisx:elecrow_support_5_and_7_inches
Draft

Elecrow 5 and 7 inches support#309
themelisx wants to merge 14 commits intojgauchia:develfrom
themelisx:elecrow_support_5_and_7_inches

Conversation

@themelisx
Copy link
Copy Markdown

Description

Added support for Elecrow display 5 and 7 inches

@themelisx themelisx marked this pull request as draft October 15, 2025 20:20
@jgauchia jgauchia self-assigned this Oct 15, 2025
@jgauchia jgauchia self-requested a review October 15, 2025 20:29
@jgauchia
Copy link
Copy Markdown
Owner

Thanks @themelisx !!
Maybe the graphical part of LVGL will need to be adjusted; I don’t have these devices, so it’ll be a bit tricky
Hopefully I’ll get lucky and manage to get them.

@jgauchia jgauchia added 🆘 help wanted Extra attention is needed feature Feature labels Oct 15, 2025
@themelisx themelisx mentioned this pull request Oct 15, 2025
22 tasks
@themelisx
Copy link
Copy Markdown
Author

Thanks @themelisx !! Maybe the graphical part of LVGL will need to be adjusted; I don’t have these devices, so it’ll be a bit tricky Hopefully I’ll get lucky and manage to get them.

I have both 5 and 7 inch displays, I can do it.
About the issue with SPIFFS, keep in mind that these devices has 4 MB flash.
I don't know about 3.5 you've already created, I don't have this device.

@jgauchia
Copy link
Copy Markdown
Owner

Thanks @themelisx !! Maybe the graphical part of LVGL will need to be adjusted; I don’t have these devices, so it’ll be a bit tricky Hopefully I’ll get lucky and manage to get them.

I have both 5 and 7 inch displays, I can do it. About the issue with SPIFFS, keep in mind that these devices has 4 MB flash. I don't know about 3.5 you've already created, I don't have this device.

mmm actual codesize was: about 2633969 bytes. If you have 2 app partition and spiffs, maybe this is the problem, Tomorrow I'll search some info and try to compile your PR with your configuration

@themelisx
Copy link
Copy Markdown
Author

@jgauchia spiffs problem solved

@themelisx
Copy link
Copy Markdown
Author

@jgauchia I try to test your app again, I connect a Neo6M GPS but the device still reboots.
The display does not showing anything until it reboots (it stays about 2 seconds alive before reboot).

Can you help me out?

[   464][I][maps.cpp:97] Maps(): [Maps] Maps constructor called - initializing pools...
[   472][I][maps.cpp:2929] initUnifiedPool(): [Maps] Initializing unified memory pool...
[   480][I][maps.cpp:2944] initUnifiedPool(): [Maps] PSRAM available: 0 bytes, setting unified pool size to 0 entries
[   490][I][maps.cpp:2956] initUnifiedPool(): [Maps] Unified memory pool initialized with 0 entries
[   499][I][maps.cpp:1800] initMemoryMonitoring(): [Maps] Memory monitoring system initialized
[   508][I][maps.cpp:3077] initTransformMatrices(): [Maps] Transform matrices initialized
[   516][I][maps.cpp:3262] initBatchRendering(): [Maps] Batch rendering initialized with max batch size: 128
[   525][I][maps.cpp:105] Maps(): [Maps] Maps constructor completed
[   554][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[   575][I][gpsMath.cpp:36] initTrigLUT(): [MATH] Allocated memory for float LUTs
[   697][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=19 scl=20 freq=100000
[   706][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   894][I][storage.cpp:156] initSD(): [Storage] SD Card Mounted
[   900][I][storage.cpp:169] initSPIFFS(): [Storage] Initializing SPIFFS
[   919][I][storage.cpp:196] initSPIFFS(): [Storage] Partition size: total: 173441 used: 117719
[  1063][I][gpxFiles.cpp:35] createGpxFolders(): [GPX file struct] TRK folder exists
[  1073][I][gpxFiles.cpp:46] createGpxFolders(): [GPX file struct] WPT folder exists
[  1127][I][maps.cpp:1573] detectHardwareCapabilities(): [Maps] PSRAM total: 8386151 bytes (8.00 MB)
[  1137][I][maps.cpp:1574] detectHardwareCapabilities(): [Maps] PSRAM free: 5887139 bytes (5.61 MB)
[  1146][I][maps.cpp:1575] detectHardwareCapabilities(): [Maps] PSRAM used: 2499012 bytes (2.38 MB)
[  1154][I][maps.cpp:1581] detectHardwareCapabilities(): [Maps] Available for cache: 2943569 bytes (2.81 MB)
[  1164][I][maps.cpp:1582] detectHardwareCapabilities(): [Maps] Memory per tile: 1179648 bytes (1.12 MB)
[  1173][I][maps.cpp:1591] detectHardwareCapabilities(): [Maps] Calculated cache capacity: 2 tiles
[  1182][I][maps.cpp:1596] detectHardwareCapabilities(): [Maps] Mid-range ESP32-S3 detected: 2 tiles cache enabled
[  1192][I][maps.cpp:1555] initTileCache(): [Maps] Tile cache initialized with 2 tiles capacity
[  1201][I][maps.cpp:1866] initPolygonOptimizations(): [Maps] Polygon optimizations initialized - Culling: enabled, Optimized scanline: disabled
[  1214][I][maps.cpp:3077] initTransformMatrices(): [Maps] Transform matrices initialized
[  1222][I][maps.cpp:3262] initBatchRendering(): [Maps] Batch rendering initialized with max batch size: 512
[  1232][I][EasyPreferences.cpp:28] init(): debug mode: enable

[  1237][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1244][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1250][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1256][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1262][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1268][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1274][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1280][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1286][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1292][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1298][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1304][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1310][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1316][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1322][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1328][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1335][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1341][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1347][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1353][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1359][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1365][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1371][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1377][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1383][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1389][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1395][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1401][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1407][V][settings.cpp:222] printSettings(): [Settings]     KEYNAME   DEFINED         VALUE
[  1415][V][settings.cpp:223] printSettings(): [Settings]     =======   =======         =====
[  1423][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1429][V][settings.cpp:235] printSettings(): [Settings]   Compass_X   default 
[  1436][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1442][V][settings.cpp:235] printSettings(): [Settings]   Compass_Y   default 
[  1449][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1455][V][settings.cpp:235] printSettings(): [Settings]    Coords_X   default 
[  1462][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1468][V][settings.cpp:235] printSettings(): [Settings]    Coords_Y   default 
[  1476][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1482][V][settings.cpp:235] printSettings(): [Settings]  Altitude_X   default 
[  1489][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1495][V][settings.cpp:235] printSettings(): [Settings]  Altitude_Y   default 
[  1502][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1508][V][settings.cpp:235] printSettings(): [Settings]     Speed_X   default 
[  1515][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1521][V][settings.cpp:235] printSettings(): [Settings]     Speed_Y   default 
[  1529][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1535][V][settings.cpp:235] printSettings(): [Settings]       Sun_X   default 
[  1542][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1548][V][settings.cpp:235] printSettings(): [Settings]       Sun_Y   default 
[  1555][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1561][V][settings.cpp:235] printSettings(): [Settings]    compOfsX   default 
[  1568][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1574][V][settings.cpp:235] printSettings(): [Settings]    compOfsY   default 
[  1582][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1588][V][settings.cpp:235] printSettings(): [Settings]  mapRotMode   default 
[  1595][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1601][V][settings.cpp:235] printSettings(): [Settings]     gpsBaud   default 
[  1608][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1614][V][settings.cpp:235] printSettings(): [Settings]     gpsRate   default 
[  1621][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1627][V][settings.cpp:235] printSettings(): [Settings]   webServer   default 
[  1635][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1641][V][settings.cpp:235] printSettings(): [Settings]     defZoom   default 
[  1648][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1654][V][settings.cpp:235] printSettings(): [Settings]     vectMap   default 
[  1661][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1667][V][settings.cpp:235] printSettings(): [Settings]    mapSpeed   default 
[  1674][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1680][V][settings.cpp:235] printSettings(): [Settings]    mapScale   default 
[  1687][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1694][V][settings.cpp:235] printSettings(): [Settings]     mapComp   default 
[  1701][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1707][V][settings.cpp:235] printSettings(): [Settings]  mapCompRot   default 
[  1714][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1720][V][settings.cpp:235] printSettings(): [Settings]      simNav   default 
[  1727][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1733][V][settings.cpp:235] printSettings(): [Settings]    fillPoly   default 
[  1740][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1747][V][settings.cpp:235] printSettings(): [Settings]       gpsTX   default 
[  1754][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1760][V][settings.cpp:235] printSettings(): [Settings]       gpsRX   default 
[  1767][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1773][V][settings.cpp:235] printSettings(): [Settings]      defLAT   default 
[  1780][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1786][V][settings.cpp:235] printSettings(): [Settings]      defLON   default 
[  1793][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1800][V][settings.cpp:235] printSettings(): [Settings]   defBright   default 
[  1807][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1813][V][settings.cpp:235] printSettings(): [Settings]    VmaxBatt   default 
[  1820][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1826][V][settings.cpp:235] printSettings(): [Settings]    VminBatt   default 
[  1833][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1839][V][settings.cpp:235] printSettings(): [Settings]    tempOffs   default 
[  1846][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1852][V][settings.cpp:235] printSettings(): [Settings]       defTZ   default 
[  1860][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1866][V][settings.cpp:235] printSettings(): [Settings]   defDecAng   default 
[  1873][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1879][V][settings.cpp:235] printSettings(): [Settings]   kalmanFil   default 
[  1886][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1892][V][settings.cpp:235] printSettings(): [Settings]     kalmanQ   default 
[  1899][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  1905][V][settings.cpp:235] printSettings(): [Settings]     kalmanR   default 
[  2181][V][esp32-hal-uart.c:330] uartBegin(): UART2 baud(9600) Mode(800001c) rxPin(38) txPin(-1)
[  2190][V][esp32-hal-uart.c:416] uartBegin(): UART2 not installed. Starting installation
[  2199][V][esp32-hal-uart.c:467] uartBegin(): UART2 initialization done.
[  2206][I][maps.cpp:1800] initMemoryMonitoring(): [Maps] Memory monitoring system initialized
[  2218][V][lvglSetup.cpp:357] initLVGL(): LVGL: allocating 2304000 bytes PSRAM for draw buffer
[  2588][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  2595][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  2601][V][tasks.cpp:27] gpsTask(): [Task] GPS Task - running on core 0
[  2607][V][tasks.cpp:28] gpsTask(): [Task] Stack size: 6276
[  3100][V][cli.cpp:282] initCLI(): [CLI] init CLI
[  3115][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  3122][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  3128][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  3134][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  3140][I][ESP32WifiCLI.cpp:509] begin(): reconnecting..
[  3157][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 0 - WIFI_READY
[[    33119988]][[VE]][[WPirFeifGeerneenrciecs..ccpppp::35401]]  b_eagridnu(i)n:o _nevvse_notp_ecnb (f)a:i lSeTdA:  SNtOaTr_tFeOdUND
[  3210][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 2 - STA_START
[  3228][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  3236][V][tasks.cpp:76] cliTask(): [Task] CLI Task - running on core 1
[  3243][V][tasks.cpp:77] cliTask(): [Task] Stack size: 18368
[  3300][I][maps.cpp:458] generateMap(): [Maps] No Map Found!
[  4066][V][gps.cpp:155] getGPSData(): Get date, time, Sunrise and Sunset
[  4072][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[  4080][I][gps.cpp:402] setLocalTime(): [GPS] Current local time: 2025-11-01 19:06:02 GMT
[  4088][I][gps.cpp:404] setLocalTime(): [GPS] Current UTC time: 2025-11-01 19:06:02 GMT
[  4096][I][gps.cpp:415] setLocalTime(): [GPS] UTC: 0
[  4102][I][main.cpp:104] calculateSun(): Sunrise: 05:40
[  4107][I][main.cpp:105] calculateSun(): Sunset: 17:47

CORRUPT HEAP: Bad tail at 0x3fcec358. Expected 0xbaad5678 got 0x00000000

assert failed: multi_heap_free multi_heap_poisoning.c:259 (head != NULL)


Backtrace: 0x403784f2:0x3fcebaf0 0x4037eec5:0x3fcebb10 0x40385605:0x3fcebb30 0x4038521d:0x3fcebc60 0x40378d49:0x3fcebc80 0x40385635:0x3fcebca0 0x42041baf:0x3fcebcc0 0x42041e59:0x3fcebce0 0x420ffc93:0x3fcebd00 0x420ffd25:0x3fcebd20 0x42058f8f:0x3fcebd40 0x42014b79:0x3fcebd60 0x42011b29:0x3fcebdb0 0x42011b5c:0x3fcebdf0 0x420125be:0x3fcebe10 0x42012b19:0x3fcebe90 0x42015dcd:0x3fcebeb0 0x4200db76:0x3fcebee0 0x42065a95:0x3fcebf10




ELF file SHA256: b7746daa86d3f4ac

Rebooting...

Wire.begin();


#if defined(ELECROW_ESP32_50) || defined(ELECROW_ESP32_70)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that LovyanGFX has support for GT911 touch , and init can be placed at initTFT


lib_deps =
${common.lib_deps}
tamctec/TAMC_GT911@^1.0.2
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better try to use LovyanGFX touch for GT911


#ifdef TOUCH_INPUT
touchCalibrate();
#if defined(ELECROW_ESP32_50) || defined(ELECROW_ESP32_70)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

touchCalibrate() is used in order to calibrate touch in first firmware upload, isn't mandatory, but maybe is better include it in Elecrow boards (if touch is handled by LovyanGfx.)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgauchia I am using 5 and 7 inch elecrow displays the last year, I have never calibrate any screen and all works fine. Anyway, I disabled this temporary until find out the point that your code creates memory fault (heap poisoning). The code is not ready for merge

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgauchia The last days I create a new project and transfer part by part your code to the new project. Till now the GPS functions works without any issue. Probably the memory fault has to do with the maps. I am still working on it on my free time

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks , I'm working too in my little free time

@@ -0,0 +1,220 @@
/*******************************************************************************
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workaround.. I think LovyanGFX has support for GT911 touch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature 🆘 help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants