eba9df24d5 | ||
---|---|---|
main | ||
.gitignore | ||
CMakeLists.txt | ||
README.md | ||
sdkconfig.ci | ||
sdkconfig.ci.esp32c2_xtal26m | ||
sdkconfig.defaults |
Projet ESP
Projet sur une board esp32-8048S043. Le code suivant est fonctionnel. Il s'appuie sur le code officiel du github esp-idf
.
Il existe aussi une branch dev.
TODO
Status | Description |
---|---|
Done | Intégration le lvgl |
In Progress | Intégration Marauder |
In Progress | Lecture flux vidéo |
Configuration.
Wifi
Tout se passe dans le fichier wifi_connect.h
Modifier les #define
suivant:
- #define ESP_WIFI_SSID "YourSSID"
- #define 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
Pour build et flasher le board, connectez la via usb et lancer la commande suivante:
idf.py -p $PORT flash monitor
Pour sortir du mode monitor saissez les touches Ctrl-]
Un peu de doc car la doc ca fait du bien. :)
- ESP-IDF Getting Started Guide on ESP32
- ESP-IDF Getting Started Guide on ESP32-S2
- ESP-IDF Getting Started Guide on ESP32-C3
Example de sortie
I (27) boot: compile time Jan 10 2025 00:28:42
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (30) boot: efuse block revision: v1.3
I (33) qio_mode: Enabling default flash chip QIO
I (38) boot.esp32s3: Boot SPI Speed : 80MHz
I (41) boot.esp32s3: SPI Mode : QIO
I (45) boot.esp32s3: SPI Flash Size : 16MB
I (49) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (56) boot: ## Label Usage Type ST Offset Length
I (62) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (69) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (75) boot: 2 factory factory app 00 00 00010000 00100000
I (82) boot: End of partition table
I (85) esp_image: segment 0: paddr=00010020 vaddr=3c0c0020 size=20f20h (134944) map
I (113) esp_image: segment 1: paddr=00030f48 vaddr=3fc9cc00 size=051f8h ( 20984) load
I (117) esp_image: segment 2: paddr=00036148 vaddr=40374000 size=09ed0h ( 40656) load
I (125) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=b4818h (739352) map
I (235) esp_image: segment 4: paddr=000f4840 vaddr=4037ded0 size=0ec3ch ( 60476) load
I (246) esp_image: segment 5: paddr=00103484 vaddr=600fe100 size=0001ch ( 28) load
I (256) boot: Loaded app from partition at offset 0x10000
I (256) boot: Disabling RNG early entropy source...
I (267) octal_psram: vendor id : 0x0d (AP)
I (267) octal_psram: dev id : 0x02 (generation 3)
I (267) octal_psram: density : 0x03 (64 Mbit)
I (269) octal_psram: good-die : 0x01 (Pass)
I (273) octal_psram: Latency : 0x01 (Fixed)
I (278) octal_psram: VCC : 0x01 (3V)
I (282) octal_psram: SRF : 0x01 (Fast Refresh)
I (287) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (291) octal_psram: BurstLen : 0x01 (32 Byte)
I (296) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (301) octal_psram: DriveStrength: 0x00 (1/1)
I (306) MSPI Timing: PSRAM timing tuning index: 5
I (310) esp_psram: Found 8MB PSRAM device
I (314) esp_psram: Speed: 80MHz
I (331) mmu_psram: Read only data copied and mapped to SPIRAM
I (391) mmu_psram: Instructions copied and mapped to SPIRAM
I (392) cpu_start: Multicore app
I (774) esp_psram: SPI SRAM memory test OK
I (782) cpu_start: Pro cpu start user code
I (782) cpu_start: cpu freq: 160000000 Hz
I (782) app_init: Application information:
I (783) app_init: Project name: esp_project
I (787) app_init: App version: fccf92f-dirty
I (791) app_init: Compile time: Jan 10 2025 00:28:44
I (796) app_init: ELF file SHA256: c74bd4fff...
I (800) app_init: ESP-IDF: v5.4
I (804) efuse_init: Min chip rev: v0.0
I (808) efuse_init: Max chip rev: v0.99
I (812) efuse_init: Chip rev: v0.2
I (816) heap_init: Initializing. RAM available for dynamic allocation:
I (822) heap_init: At 3FCB1FE8 len 00037728 (221 KiB): RAM
I (827) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (832) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (838) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (843) esp_psram: Adding pool of 7232K of PSRAM memory to heap allocator
I (850) spi_flash: detected chip: gd
I (853) spi_flash: flash io: qio
W (856) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
I (866) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (872) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (879) main_task: Started on CPU0
I (899) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (899) main_task: Calling app_main()
I (899) ESP-Display: Turn off LCD backlight
I (899) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (909) ESP-Display: Install RGB LCD panel driver
I (959) ESP-Display: Initialize RGB LCD panel
I (959) ESP-Display: Initialize LVGL library
I (959) ESP-Display: Allocate separate LVGL draw buffers from PSRAM
I (969) ESP-Display: Register display driver to LVGL
I (969) ESP-Display: Waiting driver correctly charged!
I (1979) ESP-Display: Initializing I2C
I (1979) gpio: GPIO[38]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
W (1979) GT911: Unable to initialize the I2C address
I (1999) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2
I (1999) GT911: TouchPad_ID:0x39,0x31,0x31
I (1999) GT911: TouchPad_Config_Version:65
I (2009) Main: ESP_WIFI_MODE_STA
I (2009) pp: pp rom version: e7ae62f
I (2009) net80211: net80211 rom version: e7ae62f
I (2029) wifi:wifi driver task: 3fcc653c, prio:23, stack:6656, core=0
I (2029) wifi:wifi firmware version: 48ea317a7
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 (4729) 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 (4769) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us
I (4769) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (5769) esp_netif_handlers: sta ip: 192.168.X.X, mask: 255.255.255.0, gw: 192.168.X.X
I (5769) wifi_connect: got ip:192.168.X.X
I (5769) wifi_connect: connected to ap SSID:YourSSID password:YourPASSWORD
I (5769) Main: End of main
I (5779) main_task: Returned from app_main()