Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp_image: invalid segment length #676

Closed
davidqge opened this issue Sep 4, 2024 · 1 comment
Closed

esp_image: invalid segment length #676

davidqge opened this issue Sep 4, 2024 · 1 comment

Comments

@davidqge
Copy link
Contributor

davidqge commented Sep 4, 2024

cargo add esp-storage to esp-idf-template cause error in loader after flash:

`
$ espflash.exe flash target/riscv32imac-esp-espidf/debug/esp-idf-template --monitor
[2024-09-04T18:24:25Z INFO ] Serial port: 'COM6'
[2024-09-04T18:24:25Z INFO ] Connecting...
[2024-09-04T18:24:26Z INFO ] Using flash stub
Chip type: esp32c6 (revision v0.0)
Crystal frequency: 40 MHz
Flash size: 4MB
Features: WiFi 6, BT 5
MAC address: 54:32:04:0c:e5:fc
App/part. size: 523,824/4,128,768 bytes, 12.69%
[2024-09-04T18:24:26Z INFO ] Segment at address '0x0' has not changed, skipping write
[2024-09-04T18:24:26Z INFO ] Segment at address '0x8000' has not changed, skipping write
[00:00:02] [========================================] 228/228 0x10000 [2024-09-04T18:24:30Z INFO ] Flashing has completed!
Commands:
CTRL+R Reset chip
CTRL+C Exit

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0x5c (SPI_FAST_FLASH_BOOT)
Saved PC:0x4080053c
0x4080053c - esp_mspi_pin_init
at /home/embedded/esp-idf-template/.embuild/espressif/esp-idf/v5.2.2/components/spi_flash/flash_ops.c:138
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c410,len:0xd48
load:0x4086e610,len:0x2d68
load:0x40875720,len:0x1800
entry 0x4086c410
I (23) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (23) boot: compile time Jun 7 2023 08:02:08
I (24) boot: chip revision: v0.0
I (28) boot.esp32c6: SPI Speed : 40MHz
I (33) boot.esp32c6: SPI Mode : DIO
I (37) boot.esp32c6: SPI Flash Size : 4MB
I (42) boot: Enabling RNG early entropy source...
I (48) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 003f0000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=00010020 vaddr=42000020 size=495e0h (300512) map
I (155) esp_image: segment 1: paddr=00059608 vaddr=40800000 size=09008h ( 36872) load
I (164) esp_image: segment 2: paddr=00062618 vaddr=40809010 size=01624h ( 5668) load
E (166) esp_image: invalid segment length 0x59b2
E (167) boot: Factory app partition is not bootable
E (172) boot: No bootable app partitions in the partition table
`
here is the minimal code to duplicate:
https://github.com/davidqge/esp-idf-template/branches

@SergioGasquez
Copy link
Member

As mentioned in HaoboGu/rmk#62 (comment), this is not an espflash issue.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants