turgu1 / ESP-IDF-InkPlate

A porting effort to the ESP-IDF framework for the e-Radionica InkPlate software.
15 stars 9 forks source link

ESP-IDF v5: Native IDF Hello World not working - Waveform load failed #18

Closed tobymurray closed 1 year ago

tobymurray commented 1 year ago

Prompted by:

The example was tested only with ESP-IDF version 4.4.1. However, as the library and example itself were made as universal as they could, past and future versions should work as well. If not, please open a new issue and let us know.

I've just set up my ESP-IDF on the head of release/v5.0 (currently here).

I've cloned this repo and checked out idf-v5.0-support (currently here).

Trying to run the Native_IDF/Hello_World example on my Inkplate 6 Plus get the following:

I (29) boot: ESP-IDF v5.0-541-g885e501d99 2nd stage bootloader
I (29) boot: compile time 21:27:01
I (29) boot: chip revision: v1.0
I (33) boot.esp32: SPI Speed      : 40MHz
I (38) boot.esp32: SPI Mode       : DIO
I (42) boot.esp32: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (52) boot: Partition Table:
I (56) boot: ## Label            Usage          Type ST Offset   Length
I (63) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (71) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (78) boot:  2 ota_0            OTA app          00 10 00010000 00150000
I (85) boot:  3 ota_1            OTA app          00 11 00160000 00150000
I (93) boot:  4 phy_init         RF data          01 01 002b0000 00001000
I (100) boot: End of partition table
I (105) boot: No factory image, trying OTA 0
I (110) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2587ch (153724) map
I (174) esp_image: segment 1: paddr=000358a4 vaddr=3ffb0000 size=02a2ch ( 10796) load
I (178) esp_image: segment 2: paddr=000382d8 vaddr=40080000 size=07d40h ( 32064) load
I (193) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=5d564h (382308) map
I (331) esp_image: segment 4: paddr=0009d58c vaddr=40087d40 size=0e9dch ( 59868) load
I (367) boot: Loaded app from partition at offset 0x10000
I (399) boot: Set actual ota_seq=1 in otadata[0]
I (399) boot: Disabling RNG early entropy source...
I (410) quad_psram: This chip is ESP32-D0WD
I (412) esp_psram: Found 8MB PSRAM device
I (413) esp_psram: Speed: 40MHz
I (414) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (422) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (431) cpu_start: Pro cpu up.
I (435) cpu_start: Starting app cpu, entry point is 0x40081818
0x40081818: call_start_cpu1 at /home/toby/esp/esp-idf/components/esp_system/port/cpu_start.c:142

I (0) cpu_start: App cpu up.
I (1344) esp_psram: SPI SRAM memory test OK
I (1352) cpu_start: Pro cpu start user code
I (1352) cpu_start: cpu freq: 240000000 Hz
I (1352) cpu_start: Application information:
I (1356) cpu_start: Project name:     Hello_World
I (1361) cpu_start: App version:      4a78e5b-dirty
I (1367) cpu_start: Compile time:     Feb  7 2023 21:44:23
I (1373) cpu_start: ELF file SHA256:  6188d6bbbc6589fe...
I (1379) cpu_start: ESP-IDF:          v5.0-541-g885e501d99
I (1385) cpu_start: Min chip rev:     v0.0
I (1390) cpu_start: Max chip rev:     v3.99 
I (1395) cpu_start: Chip rev:         v1.0
I (1400) heap_init: Initializing. RAM available for dynamic allocation:
I (1407) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1413) heap_init: At 3FFB6120 len 00029EE0 (167 KiB): DRAM
I (1419) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1426) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1432) heap_init: At 4009671C len 000098E4 (38 KiB): IRAM
I (1439) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator
I (1447) spi_flash: detected chip: gd
I (1450) spi_flash: flash io: dio
W (1455) ADC: legacy driver is deprecated, please migrate to `esp_adc/adc_oneshot.h`
I (1546) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1548) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1558) Main: Main task has started
I (2408) MCP23017: MCP at address 0x20 has been detected
I (2448) MCP23017: MCP at address 0x22 has been detected
I (2478) NVSMgr: Reading data size 76 from segment eeprom...
E (2488) NVSMgr: Segment length 64 is to small to contain requested data of length 76.
I (2488) EInk10: Wavefrom load failed! Upload new waveform in EEPROM. Using default waveform.
I (3468) Main: Display size: width: 1200, height: 825
I (6648) Main: Main task has ended

The device does not appear to display anything.

tobymurray commented 1 year ago

The issue here was that I did not configure the device in the Inkplate component as the docs say. After:

This worked successfully and I see Hello World

turgu1 commented 1 year ago

Thanks for this information. I will adjust the Readme file to integrate additional configuration information.

tobymurray commented 1 year ago

The info was all there, this was just a reading comprehension fail on my part. Been a while since I've played with the ESP-IDF - sorry for the noise.