-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
More user friendly flashing if the build results need to be moved to another location (IDFGH-9856) #11181
Comments
idf.py flash
without (re)building project.idf.py flash
without (re)building project. (IDFGH-9856)
Thank you for the suggestion. This is not as simple as it may seem. Underneath
It figures out the flashing settings based on the project configuration - which is linked to at least basic cmake project configuration. I think the current error message requesting to run I think using esptool directly for flashing binaries should be the preferred way. Perhaps we need to think about how to make this more user friendly, e.g. create an archive with binaries, file with esptool arguments and README.txt of how to invoke esptool without bothering about the right arguments. |
Thank you for your prompt answer.
That would actually also work for me. File transfer is no issue, I just don't have the CPU power to build the projects comfortably from the remote device meant for flashing. Unless it is a CMake behaviour, I still think it is best to use relative paths for the project files; in the interest of portability Wouldn't it be possible to recreate the esptool settings given the config files? [Edit] I didn't realise you actually addressed that point already, thank you!
Example: $ generate_esptool_flash_command -p /dev/ttyUSB1 --project_dir . > flash_target.sh
$ sh ./flash_target.sh
[ ... esptool output ... ]
$ idf.py monitor
[ ... monitor output ... ] |
Should I rename/move this issue to focus on having a more user-friendly esptool? |
idf.py flash
without (re)building project. (IDFGH-9856)
I updated the title. This needs to be addressed here, not in esptool. Thank you for the suggestion! |
What I usually do is to Not sure if that helps in your case or not. |
That is actually suuuper convenient and really helps, I was totally unaware! I wish that was the default behaviour of Current behaviour: .../firmware/build $ esptool.py write_flash
esptool write_flash: error: the following arguments are required: <address> <filename> Perhaps this tip could be the basic showcase for Thank you again for the help 👍 |
For a long time we have tried to keep esptool code and docs as free as possible from IDF-isms, which is the reason why However, we did mention |
The issue with running just Here is a work-in-progress output change printed out in the end of
You can see that the last command is based on the above suggestion to use |
Is your feature request related to a problem?
I build the project from a different machine than the one I am flashing the device(s) from.
This message shows up:
I could use
esptool
as the output of the build suggest, but all the options will change from one project to another and I would need to create extra logic to parse the files or create theesptool
command on the fly after each build.I would prefer to use
idf.py flash
as it figures out what and where to flash the binaries from the current working directory.Describe the solution you'd like.
idf.py flash --skip-build
would ignore the build step and use the files inwork_dir/build/
to figure out what to flash.idf.py build flash --skip-build
has conflicting options. I suggest thebuild
command takes precedence over--skip-build
. This allows thebuild
step to ignore the--skip-build
flag.Describe alternatives you've considered.
Alternatively my problem could be resolved with:
Flash over SSH
idf.py flash
being able to run a remote flash job (say through ssh) using local build filesExample:
idf.py flash -p flash_user@address:/dev/ttyUSB1
usbipd
usbipd
could be used to create a virtual usb forward to the build machine. Perhaps there could be some documentation on how to use it, or a built-in functionality that could be used transparently using the syntax described in "Flash over SSH"Relative paths
the project configuration would use relative paths instead of absolute paths. It would make any project much more portable. This way you can sync all the build files which would skip/shorten the build step on underpowered machines.
Additional context.
No response
The text was updated successfully, but these errors were encountered: