Compare commits

..

No commits in common. "d6a296f844fba611cff0ac2dbfd21bb2461f1148" and "b06769049d79f29581a8c101540f7d0cabde1137" have entirely different histories.

244
README.md
View File

@ -1,3 +1,4 @@
# Projet ESP # Projet ESP
Projet sur une board esp32-8048S043. Le code suivant est fonctionnel. Il s'appuie sur le code officiel du github `esp-idf`. Projet sur une board esp32-8048S043. Le code suivant est fonctionnel. Il s'appuie sur le code officiel du github `esp-idf`.
@ -17,9 +18,7 @@ Il existe aussi une branch [dev](https://gogs.sincrone.fr/Snorky/esp-project/src
## Configuration. ## Configurer vos accés wifi.
### Wifi
Tout se passe dans le fichier `wifi_connect.h` Tout se passe dans le fichier `wifi_connect.h`
@ -28,23 +27,11 @@ Modifier les `#define` suivant:
* #define CONFIG_ESP_WIFI_SSID "YourSSID" * #define CONFIG_ESP_WIFI_SSID "YourSSID"
* #define CONFIG_ESP_WIFI_PASS "YourPASSWORD" * #define CONFIG_ESP_WIFI_PASS "YourPASSWORD"
### Déplacer `lv_conf.h`
Il faut déplacer le le lv_conf.h présent dans le répertoire main et le placer dans le répertoire `$PROJET/managed_components/lvgl__lvgl`.
### SDCARD
Le projet requière une sdcard afin de pouvoir initialiser correctement l'affichage. Elle doit être formater en `fat`.
Depuis un terminal, identifier le nom du device puis:
`mkfs.fat /dev/$DEVICE`
### Build et Flash ### Build et Flash
Pour build et flasher le board, connectez la via usb et lancer la commande suivante: Pour build et flasher le board, connectez la via usb et lancer la commande suivante:
`idf.py -p $PORT flash monitor` `idf.py -p PORT flash monitor`
Pour sortir du mode monitor saissez les touches ``Ctrl-]`` Pour sortir du mode monitor saissez les touches ``Ctrl-]``
@ -56,142 +43,101 @@ Un peu de doc car la doc ca fait du bien. :)
## Example de sortie ## Example de sortie
```I (27) boot: ESP-IDF v5.4 2nd stage bootloader ```
I (27) boot: compile time Jan 10 2025 00:28:42 I (27) boot: ESP-IDF v5.4 2nd stage bootloader
I (27) boot: compile time Jan 9 2025 18:48:28
I (27) boot: Multicore bootloader I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2 I (27) boot: chip revision: v0.2
I (30) boot: efuse block revision: v1.3 I (30) boot: efuse block revision: v1.3
I (33) qio_mode: Enabling default flash chip QIO I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: Boot SPI Speed : 80MHz I (37) boot.esp32s3: SPI Mode : DIO
I (41) boot.esp32s3: SPI Mode : QIO I (41) boot.esp32s3: SPI Flash Size : 2MB
I (45) boot.esp32s3: SPI Flash Size : 16MB I (45) boot: Enabling RNG early entropy source...
I (49) boot: Enabling RNG early entropy source... I (49) boot: Partition Table:
I (54) boot: Partition Table: I (52) boot: ## Label Usage Type ST Offset Length
I (56) boot: ## Label Usage Type ST Offset Length I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (62) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (69) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (71) boot: 2 factory factory app 00 00 00010000 00100000
I (75) boot: 2 factory factory app 00 00 00010000 00100000 I (78) boot: End of partition table
I (82) boot: End of partition table I (81) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=189f0h (100848) map
I (85) esp_image: segment 0: paddr=00010020 vaddr=3c0c0020 size=20f20h (134944) map I (106) esp_image: segment 1: paddr=00028a18 vaddr=3fc99a00 size=04948h ( 18760) load
I (113) esp_image: segment 1: paddr=00030f48 vaddr=3fc9cc00 size=051f8h ( 20984) load I (110) esp_image: segment 2: paddr=0002d368 vaddr=40374000 size=02cb0h ( 11440) load
I (117) esp_image: segment 2: paddr=00036148 vaddr=40374000 size=09ed0h ( 40656) load I (113) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=77458h (488536) map
I (125) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=b4818h (739352) map I (204) esp_image: segment 4: paddr=000a7480 vaddr=40376cb0 size=12cb8h ( 76984) load
I (235) esp_image: segment 4: paddr=000f4840 vaddr=4037ded0 size=0ec3ch ( 60476) load I (220) esp_image: segment 5: paddr=000ba140 vaddr=600fe100 size=0001ch ( 28) load
I (246) esp_image: segment 5: paddr=00103484 vaddr=600fe100 size=0001ch ( 28) load I (229) boot: Loaded app from partition at offset 0x10000
I (256) boot: Loaded app from partition at offset 0x10000 I (229) boot: Disabling RNG early entropy source...
I (256) boot: Disabling RNG early entropy source... I (239) cpu_start: Multicore app
I (267) octal_psram: vendor id : 0x0d (AP) I (249) cpu_start: Pro cpu start user code
I (267) octal_psram: dev id : 0x02 (generation 3) I (249) cpu_start: cpu freq: 160000000 Hz
I (267) octal_psram: density : 0x03 (64 Mbit) I (249) app_init: Application information:
I (269) octal_psram: good-die : 0x01 (Pass) I (249) app_init: Project name: wifi_station
I (273) octal_psram: Latency : 0x01 (Fixed) I (253) app_init: App version: 1
I (278) octal_psram: VCC : 0x01 (3V) I (256) app_init: Compile time: Jan 9 2025 18:47:46
I (282) octal_psram: SRF : 0x01 (Fast Refresh) I (261) app_init: ELF file SHA256: 47f4e7b75...
I (287) octal_psram: BurstType : 0x01 (Hybrid Wrap) I (266) app_init: ESP-IDF: v5.4
I (291) octal_psram: BurstLen : 0x01 (32 Byte) I (269) efuse_init: Min chip rev: v0.0
I (296) octal_psram: Readlatency : 0x02 (10 cycles@Fixed) I (273) efuse_init: Max chip rev: v0.99
I (301) octal_psram: DriveStrength: 0x00 (1/1) I (277) efuse_init: Chip rev: v0.2
I (306) MSPI Timing: PSRAM timing tuning index: 5 I (281) heap_init: Initializing. RAM available for dynamic allocation:
I (310) esp_psram: Found 8MB PSRAM device I (287) heap_init: At 3FCA1F08 len 00047808 (286 KiB): RAM
I (314) esp_psram: Speed: 80MHz I (293) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (331) mmu_psram: Read only data copied and mapped to SPIRAM I (298) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (391) mmu_psram: Instructions copied and mapped to SPIRAM I (303) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (392) cpu_start: Multicore app I (309) spi_flash: detected chip: gd
I (774) esp_psram: SPI SRAM memory test OK I (311) spi_flash: flash io: dio
I (782) cpu_start: Pro cpu start user code W (314) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (782) cpu_start: cpu freq: 160000000 Hz I (327) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (782) app_init: Application information: I (333) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (783) app_init: Project name: esp_project I (340) main_task: Started on CPU0
I (787) app_init: App version: fccf92f-dirty I (360) main_task: Calling app_main()
I (791) app_init: Compile time: Jan 10 2025 00:28:44 I (390) Main: ESP_WIFI_MODE_STA
I (796) app_init: ELF file SHA256: c74bd4fff... I (390) pp: pp rom version: e7ae62f
I (800) app_init: ESP-IDF: v5.4 I (390) net80211: net80211 rom version: e7ae62f
I (804) efuse_init: Min chip rev: v0.0 I (400) wifi:wifi driver task: 3fcabfec, prio:23, stack:6656, core=0
I (808) efuse_init: Max chip rev: v0.99 I (410) wifi:wifi firmware version: 48ea317a7
I (812) efuse_init: Chip rev: v0.2 I (410) wifi:wifi certification version: v7.0
I (816) heap_init: Initializing. RAM available for dynamic allocation: I (410) wifi:config NVS flash: enabled
I (822) heap_init: At 3FCB1FE8 len 00037728 (221 KiB): RAM I (410) wifi:config nano formatting: disabled
I (827) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM I (420) wifi:Init data frame dynamic rx buffer num: 32
I (832) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM I (420) wifi:Init static rx mgmt buffer num: 5
I (838) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM I (420) wifi:Init management short buffer num: 32
I (843) esp_psram: Adding pool of 7232K of PSRAM memory to heap allocator I (430) wifi:Init dynamic tx buffer num: 32
I (850) spi_flash: detected chip: gd I (430) wifi:Init static tx FG buffer num: 2
I (853) spi_flash: flash io: qio I (440) wifi:Init static rx buffer size: 1600
W (856) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h` I (440) wifi:Init static rx buffer num: 10
I (866) sleep_gpio: Configure to isolate all GPIO pins in sleep state I (450) wifi:Init dynamic rx buffer num: 32
I (872) sleep_gpio: Enable automatic switching of GPIO sleep configuration I (450) wifi_init: rx ba win: 6
I (879) main_task: Started on CPU0 I (450) wifi_init: accept mbox: 6
I (899) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations I (450) wifi_init: tcpip mbox: 32
I (899) main_task: Calling app_main() I (460) wifi_init: udp mbox: 6
I (899) ESP-Display: Turn off LCD backlight I (460) wifi_init: tcp mbox: 6
I (899) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (460) wifi_init: tcp tx win: 5760
I (909) ESP-Display: Install RGB LCD panel driver I (470) wifi_init: tcp rx win: 5760
I (959) ESP-Display: Initialize RGB LCD panel I (470) wifi_init: tcp mss: 1440
I (959) ESP-Display: Initialize LVGL library I (470) wifi_init: WiFi IRAM OP enabled
I (959) ESP-Display: Allocate separate LVGL draw buffers from PSRAM I (480) wifi_init: WiFi RX IRAM OP enabled
I (969) ESP-Display: Register display driver to LVGL I (510) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
I (969) ESP-Display: Waiting driver correctly charged! I (540) wifi:mode : sta (84:fc:e6:6b:a0:cc)
I (1979) ESP-Display: Initializing I2C I (540) wifi:enable tsf
I (1979) gpio: GPIO[38]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (540) wifi_connect: wifi_init_sta finished.
W (1979) GT911: Unable to initialize the I2C address I (1000) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (1999) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1000) wifi:state: init -> auth (0xb0)
I (1999) GT911: TouchPad_ID:0x39,0x31,0x31 I (1020) wifi:state: auth -> assoc (0x0)
I (1999) GT911: TouchPad_Config_Version:65 I (1050) wifi:state: assoc -> run (0x10)
I (2009) Main: ESP_WIFI_MODE_STA I (1060) wifi:<ba-add>idx:0 (ifx:0, 44:d4:54:71:cb:80), tid:0, ssn:0, winSize:64
I (2009) pp: pp rom version: e7ae62f I (1070) wifi:<ba-add>idx:1 (ifx:0, 44:d4:54:71:cb:80), tid:5, ssn:0, winSize:64
I (2009) net80211: net80211 rom version: e7ae62f I (1080) wifi:connected with Freebox_nomap, aid = 1, channel 1, BW20, bssid = 44:d4:54:71:cb:80
I (2029) wifi:wifi driver task: 3fcc653c, prio:23, stack:6656, core=0 I (1090) wifi:security: WPA2-PSK, phy: bgn, rssi: -46
I (2029) wifi:wifi firmware version: 48ea317a7 I (1100) wifi:pm start, type: 1
I (2029) wifi:wifi certification version: v7.0
I (2029) wifi:config NVS flash: enabled
I (2029) wifi:config nano formatting: disabled
I (2039) wifi:Init data frame dynamic rx buffer num: 32
I (2039) wifi:Init static rx mgmt buffer num: 5
I (2049) wifi:Init management short buffer num: 32
I (2049) wifi:Init dynamic tx buffer num: 32
I (2059) wifi:Init static tx FG buffer num: 2
I (2059) wifi:Init static rx buffer size: 1600
I (2059) wifi:Init static rx buffer num: 10
I (2069) wifi:Init dynamic rx buffer num: 32
I (2069) wifi_init: rx ba win: 6
I (2079) wifi_init: accept mbox: 6
I (2079) wifi_init: tcpip mbox: 32
I (2079) wifi_init: udp mbox: 6
I (2079) wifi_init: tcp mbox: 6
I (2089) wifi_init: tcp tx win: 5760
I (2089) wifi_init: tcp rx win: 5760
I (2089) wifi_init: tcp mss: 1440
I (2099) wifi_init: WiFi IRAM OP enabled
I (2099) wifi_init: WiFi RX IRAM OP enabled
I (2109) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
I (2149) wifi:mode : sta (84:fc:e6:6b:a0:cc)
I (2149) wifi:enable tsf
I (2149) wifi_connect: wifi_init_sta finished.
I (2159) wifi:new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1, snd_ch_cfg:0x0
I (2159) wifi:state: init -> auth (0xb0)
I (2179) wifi:state: auth -> init (0x1c0)
I (2189) wifi:new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1, snd_ch_cfg:0x0
I (2189) wifi_connect: retry to connect to the AP
I (2189) wifi_connect: connect to the AP fail
I (4599) wifi_connect: retry to connect to the AP
I (4599) wifi_connect: connect to the AP fail
I (4599) wifi:new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1, snd_ch_cfg:0x0
I (4599) wifi:state: init -> auth (0xb0)
I (4629) wifi:state: auth -> assoc (0x0)
I (4669) wifi:state: assoc -> run (0x10)
I (4709) wifi:connected with TheGame, aid = 7, channel 11, BW20, bssid = 1e:f1:21:fb:e6:1f
I (4709) wifi:security: WPA2-PSK, phy: bgn, rssi: -27
I (4719) wifi:pm start, type: 1
I (4719) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us I (1100) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (4729) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000 I (1100) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (4749) wifi:<ba-add>idx:0 (ifx:0, 1e:f1:21:fb:e6:1f), tid:0, ssn:0, winSize:64 I (1130) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4769) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us I (4400) esp_netif_handlers: sta ip: 192.168.X.X, mask: 255.255.255.0, gw: 192.168.X.X
I (4769) wifi:AP's beacon interval = 102400 us, DTIM period = 2 I (4400) wifi_connect: got ip:192.168.X.X
I (5769) esp_netif_handlers: sta ip: 192.168.X.X, mask: 255.255.255.0, gw: 192.168.X.X I (4400) wifi_connect: connected to ap SSID:YourSSID password:YourPassword
I (5769) wifi_connect: got ip:192.168.X.X I (4410) Main: End of main
I (5769) wifi_connect: connected to ap SSID:YourSSID password:YourPASSWORD I (4410) main_task: Returned from app_main()
I (5769) Main: End of main
I (5779) main_task: Returned from app_main()
``` ```