Page 1 of 1

parttool.py not working as documented??

Posted: Wed Mar 18, 2020 12:39 pm
by gunar.kroeger
how do I correctly use the parttool.py to flash to ota_1 partition?
https://docs.espressif.com/projects/esp ... -interface
tells me that I need to follow this format:

Code: Select all

# Write to partition 'factory' the contents of a file named 'factory.bin'
parttool.py --port "/dev/ttyUSB1" write_partition --partition-name=factory "factory.bin"
but I'm getting this error using idf 4.0 in VS Code Windows 10:
customflasherror.png
customflasherror.png (22.92 KiB) Viewed 6848 times

Re: parttool.py not working as documented??

Posted: Thu Mar 19, 2020 12:53 pm
by gunar.kroeger
Has anyone used parttool in idf 4.0 yet?

Re: parttool.py not working as documented??

Posted: Fri Mar 20, 2020 1:57 pm
by willemmerson
Use --input:

parttool.py --port "/dev/ttyUSB1" write_partition --partition-name=factory --input "factory.bin"

Re: parttool.py not working as documented??

Posted: Fri Mar 20, 2020 2:19 pm
by gunar.kroeger
willemmerson wrote:
Fri Mar 20, 2020 1:57 pm
Use --input:

parttool.py --port "/dev/ttyUSB1" write_partition --partition-name=factory --input "factory.bin"
Still not working unfortunately:
parttool error 2.png
parttool error 2.png (51.87 KiB) Viewed 6747 times

Re: parttool.py not working as documented??

Posted: Fri Mar 20, 2020 2:37 pm
by willemmerson
I have had similar problems with parttool.py, but they turned out to be hardware problems. That command certainly works for me on latest sdk but I'm using linux.
Basically all parttool.py is doing is calling esp_tool.py so just find out that command and run it directly and you will get better errors. You can see from the error it's calling esp_tool read_flash something something, it's probably trying to get the address of the partition you've specified.
If you know your partition table then you can just call esp_tool write_flash directly.

Re: parttool.py not working as documented??

Posted: Fri Mar 20, 2020 2:56 pm
by gunar.kroeger
ok we got it working calling esptool.py
But I guess we can conclude that parttool.py is indeed not working as described in the docs