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

idf.py erase-otadata broken? (IDFGH-6687) #8317

Closed
chegewara opened this issue Jan 29, 2022 · 4 comments
Closed

idf.py erase-otadata broken? (IDFGH-6687) #8317

chegewara opened this issue Jan 29, 2022 · 4 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@chegewara
Copy link
Contributor

There is no option to set port and baud, like with all other idf.py commands:

idf.py erase-otadata --help
Usage: idf.py erase-otadata [OPTIONS]

  Erase otadata partition. Deprecated alias: "erase_otadata".

Options:
  -C, --project-dir PATH         Project directory.
  -D, --define-cache-entry TEXT  Create a cmake cache entry. This option can be used at most once either globally, or for one subcommand.
  --help                         Show this message and exit.

Instead we have to create env params:

Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python 
otatool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.
Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python 
otatool.py will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 29, 2022
@github-actions github-actions bot changed the title idf.py erase-otadata broken? idf.py erase-otadata broken? (IDFGH-6687) Jan 29, 2022
@dobairoland
Copy link
Collaborator

dobairoland commented Jan 30, 2022

@chegewara idf.py erase-otadata --help will show you only the erase-otadata's local options. The global options from idf.py --help should work.

idf.py -p /dev/ttyUSB1 flash monitor  # port is global and it applies to all subcommands

So please try this:

idf.py -p <port> -b <baud> erase-otadata

@chegewara
Copy link
Contributor Author

Hi,
if it would work i would not open issue.
Please read the next few lines, it is error printed when i am trying to use -p PORT:

idf.py -p /dev/ttyUSB0 erase-otadata 
Executing action: erase-otadata
Running ninja in directory /home/chegewara/.../.../project/build
Executing "ninja erase-otadata"...
[0/1] cd /home/chegewara/esp/master/components/app_update && /usr/bin/cmake -D IDF...t/build" -P /home/chegewara/esp/master/components/esptool_py/run_serial_tool.cmake
Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python /home/chegewara/esp/master/components/app_update/otatool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.
Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python /home/chegewara/esp/master/components/app_update/otatool.py will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.
chegewara@ubuntu:~/.../.../project$ idf.py erase-otadata -p /dev/ttyUSB0  
Usage: idf.py erase-otadata [OPTIONS]
Try 'idf.py erase-otadata --help' for help.

Error: No such option: -p

@chegewara
Copy link
Contributor Author

chegewara commented Jan 30, 2022

Now funny part:

idf.py erase-otadata 
Executing action: erase-otadata
Running ninja in directory /home/chegewara/../../project/build
Executing "ninja erase-otadata"...
[0/1] cd /home/chegewara/esp/master/components/app_update && /usr/bin/cmake -D IDF_...ct/build" -P /home/chegewara/esp/master/components/esptool_py/run_serial_tool.cmake
Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python /home/chegewara/esp/master/components/app_update/otatool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.
Note: /home/chegewara/.espressif/python_env/idf5.0_py3.8_env/bin/python /home/chegewara/esp/master/components/app_update/otatool.py will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.

chegewara@ubuntu:~$ cd ~/esp/master/examples/get-started/hello_world/
chegewara@ubuntu:~/esp/master/examples/get-started/hello_world$ idf.py erase-otadata 
Executing action: erase-otadata
Running ninja in directory /home/chegewara/esp/master/examples/get-started/hello_world/build
Executing "ninja erase-otadata"...
ninja: error: unknown target 'erase-otadata'
ninja failed with exit code 1

It is from espressif example, where build and monitor work perfectly fine. It the same terminal window, the same environment, just changed folder to examples hello-world. As you can see from my project i can call erase-otadata, even if it does not work, and from hello-world i cant even call it.

@dobairoland
Copy link
Collaborator

Ok, thanks @chegewara. We'll look into this why it is not working.

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Feb 15, 2022
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Mar 11, 2022
espressif-bot pushed a commit that referenced this issue Mar 14, 2022
Bugfix: Allow setting options port -p and baudrate -b, with idf.py otatool commands.

Closes #8317
espressif-bot pushed a commit that referenced this issue Apr 20, 2022
Bugfix: Allow setting options port -p and baudrate -b, with idf.py otatool commands.

Closes #8317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants