-
Notifications
You must be signed in to change notification settings - Fork 171
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 0x3ffb0000 #98
Comments
For comparison this is what I get if downgrade the esp-* packages to a working version:
|
This is the bad image: build and flash with espflash:
build with espflash but flash with esptool.py:
build and flash with esptool.py:
|
Not sure what's going on here, but imo the 'bad' image is actually correct. From the section description (emphasis mine): [ 9] .dram0.data PROGBITS 3ffb0000 051000 0037f8 00 WA 0 0 16 This data with length
In the 'bad' image, however, the full section length is loaded:
|
Also: If I downgrade diff --git a/Cargo.toml b/Cargo.toml
index b1c20b2..e285486 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,7 +51,7 @@ log = "0.4"
url = "2"
esp-idf-sys = { version = "0.31.6", features = ["binstart"] }
esp-idf-svc = { version = "0.42.0", features = ["experimental"] }
-esp-idf-hal = { version = "0.38.0" }
+esp-idf-hal = { version = "0.37.4" }
embedded-svc = "0.22.0"
embedded-hal = "=1.0.0-alpha.8"
embedded-graphics = "0.7.1" But if I downgrade the other two pages it works: diff --git b/Cargo.toml a/Cargo.toml
index e285486..339bf6f 100644
--- b/Cargo.toml
+++ a/Cargo.toml
@@ -46,13 +46,12 @@ robotica = [
[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
-heapless = "0.7.15"
log = "0.4"
url = "2"
esp-idf-sys = { version = "0.31.6", features = ["binstart"] }
-esp-idf-svc = { version = "0.42.0", features = ["experimental"] }
+esp-idf-svc = { version = "0.41.4", features = ["experimental"] }
esp-idf-hal = { version = "0.37.4" }
-embedded-svc = "0.22.0"
+embedded-svc = "0.21.3"
embedded-hal = "=1.0.0-alpha.8"
embedded-graphics = "0.7.1"
display-interface = { version = "0.4", optional = true } See brianmay/robotica-remote-rust@e13027f...10df3b0 for full list of changes from good to bad. |
I stuffed up some of the It seems that the later git commit will never work, regardless of the tool I use to build it or the tool I use to flash it. Furthermore the esptool.py image_info can't always read the image, but I suspect that might be an unrelated issue. I believe the error is occurring before it is even running my code, so I think this rules out my code being the culprit. |
Is it possible that with the latest libraries my code has grown too big for the esp32? Good:
Bad:
The IROM partition in particular, seems to have grown a lot. Not sure why. Or what the upper bound is. |
IROM is code, so its possible upgrading has inflated the code size. An easy way to test this would be to build in release mode, or |
I think my dev mode was already using Wondering what I can do to reduce my image size. While it works, makes me concerned that I am close to the limit. But my guess is that most of the space is taken up by IDF... |
This is a longer-term issue, I think if we can get LTO enabled we will see a pretty big drop in binary size as the linker will be able to discard a lot of unused esp-idf stuff that isn't even used. What flash size do you have on the chip? You can change the partition size for the default application if you have spare flash. Here are the docs for the partition table format: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html. |
What does LTO stand for? I know of LTO tape, somehow I don't think that is it. Sounds like a good optimisation to have. Hmmm. I think ESP32 chips come minimum with 4MB flash. At least mine appears to do so.
What is a good way to get started with partitioning? Is there some where I get the default partitions table that has the 1MB limit? |
I tried:
I get:
Hmmm. Something else going on here I think. 3Mb should be enough. Also I tried 4Mb and I see:
Which is weird, it clearly says I should have 4Mb:
|
@brianmay is this still an issue for you or relevant? |
Not sure. I think I resolved it but can't remember what I did and don't have time to check. Will close it. If I still have problems will reopen. |
Error when booting:
The text was updated successfully, but these errors were encountered: