Skip to content

Make it easier to build and flash with jag#3025

Open
addshore wants to merge 1 commit intotoitlang:masterfrom
addshore:easier-custom-build-usage
Open

Make it easier to build and flash with jag#3025
addshore wants to merge 1 commit intotoitlang:masterfrom
addshore:easier-custom-build-usage

Conversation

@addshore
Copy link
Copy Markdown
Contributor

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 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
@addshore
Copy link
Copy Markdown
Contributor Author

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.
I think this PR is part way there, but not all the way?

Comment thread tools/firmware.toit

esptool := find-esptool_

// The new esptool has deprecated underscores in some arguments.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md
`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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That only works if one has sourced the export.sh. Otherwise it doesn't. (I didn't know that until today...)

Comment thread README.md

``` 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 \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good change. thanks.

Comment thread README.md

### Flashing with Jaguar (live reloading)

To run Jaguar on your locally built firmware, compile the Jaguar service snapshot
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally I use JAG_TOIT_REPO_PATH from the Jaguar directory. When would you use the approach here instead of the env-variable one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants