Make it easier to build and flash with jag#3025
Make it easier to build and flash with jag#3025addshore wants to merge 1 commit intotoitlang:masterfrom
Conversation
I once again found myself wanting to poke the toit code with an app runnable via jaguar, and encountered some issue while following the README, but to me it's all very nice and eacy to follow and or copy and paste now! Changes: README: Hints about other chip builds README: Hints about other port formats README: Section on "Flashing with Jaguar (live reloading)" README: remove external esptool download/ESPTOOL_PATH workaround? Remove underscore→hyphen conversion in firmware.toit so bundled esptool v4.x works Rebuild SDK and verify flashing with bundled esptool
|
I'm stilly trying to figure out the "most ideal" way to be able to quickly iterate on the toit repo while also wanting to run custom code via jag the normal way. |
|
|
||
| esptool := find-esptool_ | ||
|
|
||
| // The new esptool has deprecated underscores in some arguments. |
There was a problem hiding this comment.
I'm not a fan of unconditionally removing the replacements.
Arch users have the latest esptool installed and that would yield errors. The 5.2 esptool version which is shipped with Toit handles the '-' just fine.
Compromise:
until we update the esp-idf we can make these replacements on whether JAG_TOIT_REPO_PATH is not set.
| `export ESPTOOL_PATH=$PWD/third_party/esp-idf/components/esptool_py/esptool/esptool.py`). | ||
| Assuming your device is connected through `/dev/ttyUSB0` | ||
| you can then flash a device as follows: | ||
| tool. Internally it calls the bundled esptool from the esp-idf submodule. |
There was a problem hiding this comment.
That only works if one has sourced the export.sh. Otherwise it doesn't. (I didn't know that until today...)
|
|
||
| ``` sh | ||
| build/host/sdk/lib/toit/tool firmware -e build/esp32/firmware.envelope \ | ||
| build/host/sdk/bin/toit tool firmware -e build/esp32/firmware.envelope \ |
|
|
||
| ### Flashing with Jaguar (live reloading) | ||
|
|
||
| To run Jaguar on your locally built firmware, compile the Jaguar service snapshot |
There was a problem hiding this comment.
Normally I use JAG_TOIT_REPO_PATH from the Jaguar directory. When would you use the approach here instead of the env-variable one?
I once again found myself wanting to poke the toit code with an app runnable via
jaguar, and encountered some issue while following the README, but to me it's all
very nice and eacy to follow and or copy and paste now!
Changes:
README: Hints about other chip builds
README: Hints about other port formats
README: Section on "Flashing with Jaguar (live reloading)"
README: remove external esptool download/ESPTOOL_PATH workaround?
Remove underscore→hyphen conversion in firmware.toit so bundled esptool v4.x works
Rebuild SDK and verify flashing with bundled esptool