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
Make flash fails if ota_0 used as app partition #2086
Comments
Like i said on forum, did you do |
Yes. I have done a make erase_flash. This error happens before it even tries to flash anything. I have not actually used OTA yet. The error is that it reads the partition table and doesn't see that ota_0 is an app partition, and therefore it assumes that app is at 0x0 (or so it seems). According to the documentation, it is valid to use ota_0 as the main app partition to save space. |
Its true, i am using ota_0 all the time without factory partition. Could you use only |
This is from the latest commit on
I believe the latest esptool is supposed to read the partition table to figure out where the app partition is. |
Here is the error: |
It's still a bug, since I shouldn't have to change that and run the command manually. If I use the The point is that in previous versions, they had a configuration value to set this app offset. They took it out in the most recent release because they added smarts to the tool to figure that offset out. |
Looking at the
This makes sense, because it's specifically looking for the factory subtype. I assume in my case, it's not finding that so it's defaulting to 0x0. I think the logic should, if it doesn't find the factory subtype, look for ota_0 instead. |
Ok, for testing purpose i compiled modified hello-world example and i can confirm that its somewhere bug because my flash command looks the same if there is no factory partition:
App bin is flashed from address 0x0. Here is my partition table:
|
Here's a patch for
It's a little tricky to do this within Makefiles, but that will essentially check to see if Full version of file attached. This might not be the best way to solve the problem, since my knowledge of the partition component is limited. |
I just ran into the same issue and can confirm @nick-atmosphereiot 's patch fixes it. |
Thanks for reporting this, folks. I think the best fix will be to add some kind of |
…t boot partition Generates correct "make flash" command even when partition table has no factory partition. Also adds unit tests for parttool.py Closes #2086
…t boot partition Generates correct "make flash" command even when partition table has no factory partition. Also adds unit tests for parttool.py Closes espressif/esp-idf#2086
…t boot partition Generates correct "make flash" command even when partition table has no factory partition. Also adds unit tests for parttool.py Closes espressif/esp-idf#2086
Environment
git rev-parse --short HEAD
to get the commit id.):4b91c82 (also in release 3.1)
Problem Description
make flash fails, thinking that the app is at 0x0. My partition table uses ota_0 instead of factory for the app location. If I change ota_0 to factory, make flash works just fine and detects the app at the correct space.
Here's the make flash output:
Expected Behavior
It should detect ota_0 as an app space.
Actual Behavior
Make flash incorrectly reads the partition table, thinking the app is at 0x0
Steps to reproduce
Use this partition table:
Code to reproduce this issue
N/A
Debug Logs
See problem description for make flash log.
Uploaded partition and sdkconfig
esptest4.zip
The text was updated successfully, but these errors were encountered: