Xila-Project / Old_core

The code repository of Xila.
https://xila.dev
MIT License
14 stars 5 forks source link

Support Sunton ESP32-8048S043C board #22

Open oschettler opened 11 months ago

oschettler commented 11 months ago

I try to get Xila running on my Sunton ESP32-8048S043C board. I believe it has the same hardware for display, touch and sd card. The screen resolution is 800x480, identical to the ESP32-8048S070 which is already supported.

Compiling and flashing works fine. However, when I connect to the board, I get the following message:

ELF file SHA256: 8d7ac4612624defa

Rebooting...
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40377ca4
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
[   386][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
|   5403 ms | System.Start() | (System.cpp:218) |  Information | Starting Xila ...
|   5403 ms | System.Start() | (System.cpp:234) |  Information | Wakeup cause : 0.

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||               __________   __   __  _____   _                              ||
||              |      |   |  \ \ / / |_   _| | |          /\                 ||
||              |______|   |   \ V /    | |   | |         /  \                ||
||              |   |__|___|    | |     | |   | |        / /\ \               ||
||              |   |      |   / . \   _| |_  | |____   / ____ \              ||
||              |___|______|  /_/ \_\ |_____| |______| /_/    \_\             ||
||                                                                            ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> Version : 0.2.0 build on Dec 28 2023 at 15:31:19.
|   5475 ms | System.Load() | (System.cpp:269) |  Information | Alix ANNERAUD - MIT Licence
|   5483 ms | System.Load() | (System.cpp:271) |  Information | Starting Xila ...
|   5490 ms | Drive.Start() | (SD_SPI.cpp:60) |  Information | Start drive module...
[  5507][E][vfs_api.cpp:24] open(): File system is not mounted
|   5507 ms | Display.Start() | (Display.cpp:29) |  Information | Start display module...
[  5517][E][vfs_api.cpp:105] open(): /sd/Xila/Registry/Display.xrf does not exist, no permits for creation
[  5533][E][vfs_api.cpp:332] VFSFileImpl(): fopen(/sd/Xila/Registry/Display.xrf) failed
|   5533 ms | System.Panic_Handler() | (System.cpp:123) |  Error | Something went wrong...
Xila has encountered an unrecoverable error and must restart.
Please wait for the system to restart itself or press the power button for a few seconds.
Error : 5.

assert failed: xQueueTakeMutexRecursive queue.c:717 (pxMutex)

Backtrace: 0x40378096:0x3fcede70 0x4037f581:0x3fcede90 0x40385c41:0x3fcedeb0 0x403806fe:0x3fcedfe0 0x4201949d:0x3fcee000 0x42017d01:0x3fcee020 0x42003403:0x3fcee050 0x42003803:0x3fcee0a0 0x42003981:0x3fcee0e0 0x42003a29:0x3fcee110

I've tried to create a file Xila/Registry/Display.xrf with just the key Registry:Display. Following this, the backlight goes on for a few moments, the log progresses and logs identical lines

| 182192 ms | System.Task_Function() | (System.cpp:66) |  Information | Memory usage : 268684 | PSRAM usage : 822372 

... every second. Touch is active. When I touch the display, the backlight switches on, but nothing is displayed. The software continues to complain about missing *.xrf files:

After that, no more complaints about missing files, only log of PSRAM every second.

The log now looks like this:

[tio 19:48:03] Connected
|   5398 ms | System.Start() | (System.cpp:218) |  Information | Starting Xila ...
|   5398 ms | System.Start() | (System.cpp:234) |  Information | Wakeup cause : 0.

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||               __________   __   __  _____   _                              ||
||              |      |   |  \ \ / / |_   _| | |          /\                 ||
||              |______|   |   \ V /    | |   | |         /  \                ||
||              |   |__|___|    | |     | |   | |        / /\ \               ||
||              |   |      |   / . \   _| |_  | |____   / ____ \              ||
||              |___|______|  /_/ \_\ |_____| |______| /_/    \_\             ||
||                                                                            ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> Version : 0.2.0 build on Dec 28 2023 at 15:31:19.
|   5471 ms | System.Load() | (System.cpp:269) |  Information | Alix ANNERAUD - MIT Licence
|   5479 ms | System.Load() | (System.cpp:271) |  Information | Starting Xila ...
|   5486 ms | Drive.Start() | (SD_SPI.cpp:60) |  Information | Start drive module...
|   5724 ms | Display.Start() | (Display.cpp:29) |  Information | Start display module...
E (11101) ledc: ledc_set_duty(720): LEDC is not initialized
E (11101) ledc: ledc_update_duty(648): LEDC is not initialized
[  5784][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=19 scl=20 freq=100000
[  5785][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (11147) gpio: gpio_set_level(227): GPIO output gpio_num error
E (11163) gpio: gpio_set_level(227): GPIO output gpio_num error
E (11169) gpio: gpio_set_level(227): GPIO output gpio_num error
[  5859][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
|   5927 ms | Power.Start() | (Power.cpp:32) |  Information | Start power module...
|   6014 ms | System.Load_Registry() | (Registry.cpp:38) |  Information | Load system registry...
|   6032 ms | Sound.Start() | (Sound.cpp:37) |  Information | Starting sound module...
|   6033 ms | Power.Start() | (Power.cpp:32) |  Information | Start power module...
|   6057 ms | WiFi.Start() | (Communication.cpp:25) |  Information | Start Communication module...
|   6080 ms | Account.Start() | (Accounts.cpp:19) |  Information | Start account module...
|  12774 ms | System.Task_Function() | (System.cpp:66) |  Information | Memory usage : 269016 | PSRAM usage : 814548 
...

Hm, invalid pin. May this be due to the missing i2s sound hardware on my board?

oschettler commented 11 months ago

I've tried to add a configuration for my board, however this still crashes. Here is what the log looks like

[tio 22:21:31] Connected
|   5410 ms | System.Start() | (System.cpp:218) |  Information | Starting Xila ...
|   5410 ms | System.Start() | (System.cpp:234) |  Information | Wakeup cause : 0.

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||               __________   __   __  _____   _                              ||
||              |      |   |  \ \ / / |_   _| | |          /\                 ||
||              |______|   |   \ V /    | |   | |         /  \                ||
||              |   |__|___|    | |     | |   | |        / /\ \               ||
||              |   |      |   / . \   _| |_  | |____   / ____ \              ||
||              |___|______|  /_/ \_\ |_____| |______| /_/    \_\             ||
||                                                                            ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> Version : 0.2.0 build on Dec 28 2023 at 20:55:56.
|   5482 ms | System.Load() | (System.cpp:269) |  Information | Alix ANNERAUD - MIT Licence
|   5490 ms | System.Load() | (System.cpp:271) |  Information | Starting Xila ...
|   5497 ms | Drive.Start() | (SD_SPI.cpp:60) |  Information | Start drive module...
[  5514][E][vfs_api.cpp:24] open(): File system is not mounted
|   5514 ms | Display.Start() | (Display.cpp:29) |  Information | Start display module...
E (10676) ledc: ledc_set_duty(720): LEDC is not initialized
E (10676) ledc: ledc_update_duty(648): LEDC is not initialized
[  5577][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=19 scl=20 freq=100000
[  5578][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (10722) gpio: gpio_set_level(227): GPIO output gpio_num error
E (10738) gpio: gpio_set_level(227): GPIO output gpio_num error
E (10744) gpio: gpio_set_level(227): GPIO output gpio_num error
[  5652][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
|   5720 ms | Power.Start() | (Power.cpp:32) |  Information | Start power module...
|   5816 ms | System.Load_Registry() | (Registry.cpp:38) |  Information | Load system registry...
|   5834 ms | Sound.Start() | (Sound.cpp:37) |  Information | Starting sound module...
|   5834 ms | Power.Start() | (Power.cpp:32) |  Information | Start power module...
|   5860 ms | WiFi.Start() | (Communication.cpp:25) |  Information | Start Communication module...
|   5882 ms | Account.Start() | (Accounts.cpp:19) |  Information | Start account module...
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4203b23b  PS      : 0x00060930  A0      : 0x8201e36d  A1      : 0x3fcedb30  
A2      : 0x00000000  A3      : 0x3fcebb34  A4      : 0x000003d4  A5      : 0x3fcedb7c  
A6      : 0xffffffff  A7      : 0x3fc9e744  A8      : 0x00000000  A9      : 0x3fcedbb0  
A10     : 0x00000400  A11     : 0x3fcebb08  A12     : 0x3fcf06e8  A13     : 0x00000400  
A14     : 0x00001000  A15     : 0x3fcf55f8  SAR     : 0x00000008  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000018  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  

Backtrace: 0x4203b238:0x3fcedb30 0x4201e36a:0x3fcedb70 0x4201ec13:0x3fcedbf0 0x42027bf1:0x3fcedc20 0x4202858a:0x3fcedc70 0x4202511f:0x3fcedc90 0x4202b1c5:0x3fcedcb0 0x4202b4ed:0x3fcedd00 0x42028bd9:0x3fcedd20 0x42003905:0x3fcee0a0 0x42003995:0x3fcee0e0 0x42003a3d:0x3fcee110

I have attached my changes. Unfortunately, I don't so how to progress at this point. ESP32-8048S043.patch.txt