Xinyuan-LilyGO / T-QT

MIT License
94 stars 31 forks source link

Board Manager URL error #2

Closed Vadimledyaev closed 1 year ago

Vadimledyaev commented 1 year ago

Hi, Arduino ide can not load your boards package : https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pagespackage_esp32_index.json

This url leads to 400: Invalid request page

What is the correct url? Thanks

LilyGO commented 1 year ago

The URL in the description may have expired, please use a new URL

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

Vadimledyaev commented 1 year ago

Thanks! The guide does not say which board should I choose? There are plenty of boards available from the list Tools - Boards - ESP32 - . Which one is yours?

Sarah-C commented 1 year ago

It'll be the : ESP32-S3 Dev Board

Vadimledyaev, be careful with the libraries!
TFT_eSPI's current version does NOT compile with the Factory demo.

For me, I don't use the library else where, so I just deleted it from my library folder, and copied https://github.com/Xinyuan-LilyGO/T-QT/tree/main/lib libraries into my lib folder.

The alternative is a bit messier - copying the libraries from this github into the sketch Factory folder, flat. No subfolders. Then you can use the up to date versions in your other libraries.

I don't know what changed so much to break it - I didn't spend time looking at the errors. =/

JpEncausse commented 1 year ago

Hi, There is no ESP32-S3 Dev Board I choose Dev Module but got Error compiling for board ESP32S3 Dev Module I correctly copy /lib to Arduino /librairies folder image

Sarah-C commented 1 year ago

My mistake, as you saw, it's "Module"

@JpEncausse
"Error compiling for board ESP32S3 Dev Module"..... there'll be more red/error text further up the text box. Can you dig it out? It'll detail file file name, line number, the line of code, and a little ^ arrow pointing to where it saw the issue.

JpEncausse commented 1 year ago

Unfortunatly I didn't get more details, I assume it can't check for the given board, Can you detail the Arduino option to set for T-QT ? (Memory, etc ...) to be sure I set evrything correctly (I tried many but still get the error)

LilyGO commented 1 year ago

You just need to check "ESP32S3 Dev module" and the correct port. PSRAM needs to select OPI mode. Other configurations can be configured or set by default according to your project needs.

JpEncausse commented 1 year ago

Ok so here is my configuration :

OS

First error : The Factory example didn't run because the script look for lv_conf.h that must be in /librairies/lv_conf.h I copy it from elswhere. Now it is fixed

Arduino

Error 2 : So the factory lcd2 and lcd script now compile but the board failed at reboot error with esptool (I assume the program is correctly write). On the board side, the screen stay black ...

Sketch uses 330937 bytes (25%) of program storage space. Maximum is 1310720 bytes.
Global variables use 14368 bytes (4%) of dynamic memory, leaving 313312 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.3
Serial port COM4
Connecting...
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:43:1f:b4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00060fff...
Flash params set to 0x033f
Compressed 13968 bytes to 9701...
Writing at 0x00000000... (100 %)
Wrote 13968 bytes (9701 compressed) at 0x00000000 in 0.3 seconds (effective 398.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 457.2 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 651.5 kbit/s)...
Hash of data verified.
Compressed 331328 bytes to 170056...
Writing at 0x00010000... (9 %)
Writing at 0x0001f78b... (18 %)
Writing at 0x0002cd81... (27 %)
Writing at 0x00032318... (36 %)
Writing at 0x00037f31... (45 %)
Writing at 0x0003d9db... (54 %)
Writing at 0x00042f64... (63 %)
Writing at 0x00048517... (72 %)
Writing at 0x00050a0f... (81 %)
Writing at 0x00058f63... (90 %)
Writing at 0x0005e8b3... (100 %)
Wrote 331328 bytes (170056 compressed) at 0x00010000 in 3.3 seconds (effective 810.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Got the error on the monitor :

ESP-ROM:esp32s3-20210327
E (123) cpu_start: Octal Flash option selected, but EFUSE not configured!
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403773dc
SPIWP:0xee
mode:DOUT, clock div:1
load:0x3fce3808,len:0x39c
load:0x403c9700,len:0x9bc
load:0x403cc700,len:0x2900
SHA-256 comparison failed:
Calculated: 85a4168017e35d294d0c9ce62e004a07bd006d028a9e3f266f8cb867b8f26a61
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
E (117) cpu_start: Octal Flash option selected, but EFUSE not configured!
LilyGO commented 1 year ago

My mistake, I mistakenly thought this was a T-Display-S3. The PSRAM setting should be changed to QSPI or DISENABLE. (It depends on whether you bought the version with PSRAM or not). But selecting DISENABLE should be no problem.

LilyGO commented 1 year ago

image

lynema commented 1 year ago

After following this directions and compiling the factory example using the Arduino IDE and ESP32 library version 2.0.4, these lines are repeated over and over.

ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x400454d5 SPIWP:0xee mode:QIO, clock div:2 load:0x3fce3808,len:0x43c ets_loader.c 78

Board: ESP32S3 Dev Module Libraries were copied from the demo so the TFT library has the right config USB A to C cable was used as well. The program uploaded.

Are there other settings that are missing that need to be set?

LilyGO commented 1 year ago

Please try to use ESP32 library version 2.0.4. And execute the simplest blink program to test the hardware function of the board. If the blink program runs normally, please use this routine: https://github.com/Xinyuan-LilyGO/T-QT/tree/main/example/lcd @lynema

lynema commented 1 year ago

@LilyGO
Tried this sketch with ESP32 library version 2.0.4.

void setup() {
    Serial.begin(115200);
}

void loop() {
    Serial.printf("Hello World");
    delay(3000);
}

Same thing happened. The hardware is good. When it was initially plugged in, the on-board display showed that it was attempting to connect to a wifi access point.

07:01:51.008 -> ESP-ROM:esp32s3-20210327
07:01:51.008 -> 
07:01:51.115 -> ESP-ROM:esp32s3-20210327
07:01:51.115 -> Build:Mar 27 2021
07:01:51.115 -> rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
07:01:51.115 -> Saved PC:0x400454d5
07:01:51.148 -> SPIWP:0xee
07:01:51.148 -> mode:QIO, clock div:2
07:01:51.148 -> load:0x3fce3808,len:0x43c
07:01:51.148 -> ets_loader.c 78 

The HelloWorld example (https://github.com/espressif/esp-idf/tree/v4.4.2/examples/get-started/hello_world) using https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/get-started/index.html works fine with version v4.4.2.

09:53:52.202 -> Restarting now.
09:53:52.202 -> ESP-ROM:esp32s3-20210327
09:53:52.202 -> Build:Mar 27 2021
09:53:52.202 -> rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
09:53:52.202 -> Saved PC:0x4037567c
09:53:52.202 -> SPIWP:0xee
09:53:52.202 -> mode:DIO, clock div:1
09:53:52.202 -> load:0x3fce3808,len:0x1650
09:53:52.202 -> load:0x403c9700,len:0xbb8
09:53:52.202 -> load:0x403cc700,len:0x2f88
09:53:52.202 -> SHA-256 comparison failed:
09:53:52.235 -> Calculated: c34926b8004171147ef2777398dee51ab64cfe3379e89485626e043a1ef1f00e
09:53:52.235 -> Expected: 995363e2322f0d78649cb05de1d021038e45a308bca0c627ce85ba27b0913f99
09:53:52.235 -> Attempting to boot anyway...
09:53:52.235 -> entry 0x403c9954
09:53:52.235 -> I (42) boot: ESP-IDF v4.4.2 2nd stage bootloader
09:53:52.235 -> I (42) boot: compile time 09:51:35
09:53:52.235 -> I (43) boot: chip revision: 0
09:53:52.235 -> I (44) boot.esp32s3: Boot SPI Speed : 80MHz
09:53:52.268 -> I (49) boot.esp32s3: SPI Mode       : DIO
09:53:52.268 -> I (54) boot.esp32s3: SPI Flash Size : 8MB
09:53:52.268 -> I (58) boot: Enabling RNG early entropy source...
09:53:52.268 -> I (64) boot: Partition Table:
09:53:52.268 -> I (67) boot: ## Label            Usage          Type ST Offset   Length
09:53:52.268 -> I (75) boot:  0 nvs              WiFi data        01 02 00009000 00006000
09:53:52.301 -> I (82) boot:  1 phy_init         RF data          01 01 0000f000 00001000
09:53:52.301 -> I (89) boot:  2 factory          factory app      00 00 00010000 00100000
09:53:52.301 -> I (97) boot: End of partition table
09:53:52.301 -> I (101) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=07958h ( 31064) map
09:53:52.334 -> I (115) esp_image: segment 1: paddr=00017980 vaddr=3fc90700 size=026f0h (  9968) load
09:53:52.334 -> I (120) esp_image: segment 2: paddr=0001a078 vaddr=40374000 size=05fa0h ( 24480) load
09:53:52.334 -> I (132) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=16cf0h ( 93424) map
09:53:52.367 -> I (152) esp_image: segment 4: paddr=00036d18 vaddr=40379fa0 size=0675ch ( 26460) load
09:53:52.367 -> I (158) esp_image: segment 5: paddr=0003d47c vaddr=50000000 size=00010h (    16) load
09:53:52.367 -> I (163) boot: Loaded app from partition at offset 0x10000
09:53:52.367 -> I (164) boot: Disabling RNG early entropy source...
09:53:52.367 -> I (180) cpu_start: Pro cpu up.
09:53:52.367 -> I (180) cpu_start: Starting app cpu, entry point is 0x403750c4
09:53:52.367 -> I (149) cpu_start: App cpu up.
09:53:52.400 -> I (195) cpu_start: Pro cpu start user code
09:53:52.400 -> I (195) cpu_start: cpu freq: 160000000
09:53:52.400 -> I (195) cpu_start: Application information:
09:53:52.400 -> I (197) cpu_start: Project name:     hello_world
09:53:52.400 -> I (203) cpu_start: App version:      v4.4.2
09:53:52.400 -> I (208) cpu_start: Compile time:     Aug  6 2022 09:51:33
09:53:52.434 -> I (214) cpu_start: ELF file SHA256:  6e54504859fd5b8d...
09:53:52.434 -> I (220) cpu_start: ESP-IDF:          v4.4.2
09:53:52.434 -> I (225) heap_init: Initializing. RAM available for dynamic allocation:
09:53:52.434 -> I (232) heap_init: At 3FC937D8 len 0004C828 (306 KiB): D/IRAM
09:53:52.434 -> I (238) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
09:53:52.467 -> I (245) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
09:53:52.467 -> I (251) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
09:53:52.467 -> I (258) spi_flash: detected chip: gd
09:53:52.467 -> I (262) spi_flash: flash io: dio
09:53:52.467 -> I (266) sleep: Configure to isolate all GPIO pins in sleep state
09:53:52.467 -> I (273) sleep: Enable automatic switching of GPIO sleep configuration
09:53:52.500 -> I (280) cpu_start: Starting scheduler on PRO CPU.
09:53:52.500 -> I (0) cpu_start: Starting scheduler on APP CPU.
09:53:52.500 -> Hello world!
09:53:52.500 -> This is esp32s3 chip with 2 CPU core(s), WiFi/BLE, silicon revision 0, 8MB external flash
09:53:52.500 -> Minimum free heap size: 389092 bytes
09:53:52.500 -> Restarting in 10 seconds...
lynema commented 1 year ago

It works under platform.io with a couple edits.

These lines need to be altered to account for case sensitivity in https://github.com/Xinyuan-LilyGO/T-QT/blob/main/example/factory/platformio.ini [env:esp32-s3-devkitc-1] board = esp32-s3-devkitc-1 The board is esp32-s3-devkitc-1 which is different than what was mentioned above as the board name to try in the Arduino IDE. https://docs.platformio.org/en/latest/boards/espressif32/esp32-s3-devkitc-1.html

LilyGO commented 1 year ago

@lynema Sorry, I rechecked my platformIO configuration. I am using arduino 2.0.3. version. Please recompile with this version.

LilyGO commented 1 year ago

2.0.4 seems to have upgraded some features causing a reset, but I haven't checked its logs yet.

lynema commented 1 year ago

@LilyGO Both platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.3 and platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.4 worked ok for me.

Vadimledyaev commented 1 year ago

After a few days of trying to hook the device up to my PC(Windows10, Arduini IDE 2) without success (probably a problem with drivers but even Zadig couldn't fix that) I managed to make it on my laptop. After that I tried a pretty fresh windows 10 virtual machine under my main one and that works, too.

So after all Arduino is working, confirmed.

"SHA-256 comparison failed:" error is kinda normal:

SHA-256 comparison failed:
Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

P.s, in case you haven't worked with lvgl lib like I haven't, To make it work you must copypaste lv_conf.h provided by LiLyGO to a LIB folder, do not leave it as is in "lib/lvgl/"!

Sarah-C commented 1 year ago

P.s, in case you haven't worked with lvgl lib like I haven't, To make it work you must copypaste lv_conf.h provided by LiLyGO to a LIB folder, do not leave it as is in "lib/lvgl/"!

Good to know! Thanks! I.... ahem.... hacked the include lines a bit..... I thought that was a bad approach and you confirmed it.

I've had the exact same issue with a couple of other boards on my desktop Vs laptop. ....... how curious....

ChrisJones79 commented 1 year ago

Using the USB-OTG board works for me but I had to zip the lib I wanted to use and added the file image.h to the sketch

lewisxhe commented 1 year ago

Not active for a long time, will be closed

ChrisJones79 commented 1 year ago

Ok

On Wed, Mar 29, 2023, 10:32 Lewis He @.***> wrote:

Closed #2 https://github.com/Xinyuan-LilyGO/T-QT/issues/2 as completed.

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-QT/issues/2#event-8877396085, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACY6C5N3TBNHZNU2FR5JMP3W6RBZHANCNFSM53G2WT3A . You are receiving this because you commented.Message ID: @.***>