Jaguar: Live reloading for the ESP32
Jaguar: Live reloading for the ESP32
Jaguar is a small Toit program that runs on your ESP32. It uses the capabilities of the Toit virtual machine to let you update and restart your ESP32 applications written in Toit over WiFi. Change your Toit code in your editor, update the application on your device, and restart it all within seconds. No need to flash over serial, reboot your device, or wait for it to reconnect to your network. It is live reloading on a microcontroller
Watch a short video that shows how you can experience Jaguar on your ESP32 in less than 3 minutes:
Jaguar is free and open source. It is based on the Toit language and it makes good use of the underlying capabilities of the Toit virtual machine. You can find the source code and start contributing to Jaguar on GitHub: https://github.com/toitlang/jaguar.
I would love your feedback!
Watch a short video that shows how you can experience Jaguar on your ESP32 in less than 3 minutes:
Jaguar is free and open source. It is based on the Toit language and it makes good use of the underlying capabilities of the Toit virtual machine. You can find the source code and start contributing to Jaguar on GitHub: https://github.com/toitlang/jaguar.
I would love your feedback!
Last edited by kasperl on Tue Dec 14, 2021 10:24 am, edited 1 time in total.
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Jaguar: A fast way to develop for the ESP32
Hi kasperl,
The speed of loading the application (and the possibility to quickly iterate the code updates) is indeed impressive!
I was initially hesitant to try it out because of the need to install an additional set of the software (go and Jaguar).
However, after watching your video I decided to give it a try and the installation went quickly and without any issues.
I have some questions:
- After loading the application with jag command and then resetting the device I do not see the application restarting automatically. I need to use jag command to run the application again. Is it expected behavior or did I miss some configuration?
- How to load and run different applications on multiple devices entirely from the command line without first scanning and then manually selecting a device with "Choose what Jaguar device you want to use:"?
- Does Jaguar support loading applications into separate containers on the same esp device like it can be done when developing with the cloud version of Toit (by using .yaml files to specify unique application names)?
The speed of loading the application (and the possibility to quickly iterate the code updates) is indeed impressive!
I was initially hesitant to try it out because of the need to install an additional set of the software (go and Jaguar).
However, after watching your video I decided to give it a try and the installation went quickly and without any issues.
I have some questions:
- After loading the application with jag command and then resetting the device I do not see the application restarting automatically. I need to use jag command to run the application again. Is it expected behavior or did I miss some configuration?
- How to load and run different applications on multiple devices entirely from the command line without first scanning and then manually selecting a device with "Choose what Jaguar device you want to use:"?
- Does Jaguar support loading applications into separate containers on the same esp device like it can be done when developing with the cloud version of Toit (by using .yaml files to specify unique application names)?
Re: Jaguar: A fast way to develop for the ESP32
Thank you for trying out Jaguar on your ESP32. Let me try to answer your questions.
1) You're right that resetting the device causes it to forget about the installed application. It is still in flash though, so you could change the code to find it there (maybe keep track of its position in NVS?) and automatically start it. Patches are welcome!
2) We should probably add a way to choose the device from the command line for 'jag run'. Would that solve your issue? We'd like to give all devices a unique name so this is easier going forward (https://github.com/toitlang/jaguar/issues/23).
3) Jaguar works by loading the application into a separate container, but it only runs one at a time. We start installing the program here https://github.com/toitlang/jaguar/blob ... r.toit#L49 (this is what kills the old version of the program) and we start running it here https://github.com/toitlang/jaguar/blob ... r.toit#L60.
Hope that helps!
1) You're right that resetting the device causes it to forget about the installed application. It is still in flash though, so you could change the code to find it there (maybe keep track of its position in NVS?) and automatically start it. Patches are welcome!
2) We should probably add a way to choose the device from the command line for 'jag run'. Would that solve your issue? We'd like to give all devices a unique name so this is easier going forward (https://github.com/toitlang/jaguar/issues/23).
3) Jaguar works by loading the application into a separate container, but it only runs one at a time. We start installing the program here https://github.com/toitlang/jaguar/blob ... r.toit#L49 (this is what kills the old version of the program) and we start running it here https://github.com/toitlang/jaguar/blob ... r.toit#L60.
Hope that helps!
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Jaguar: A fast way to develop for the ESP32
Thank you for the tips.
After checking the links I learned and appreciate how concise the Jaguar code is!
For items 1 and 3 I have entered https://github.com/toitlang/jaguar/issues/27 and https://github.com/toitlang/jaguar/issues/28
After checking the links I learned and appreciate how concise the Jaguar code is!
For items 1 and 3 I have entered https://github.com/toitlang/jaguar/issues/27 and https://github.com/toitlang/jaguar/issues/28
Re: Jaguar: A fast way to develop for the ESP32
Perfect. Really appreciate the filed issues!
Re: Jaguar: A fast way to develop for the ESP32
Just shipped a new version (v0.0.5) of Jaguar that gives flashed device a unique id - and a catchy name - so they are easy to find later.
Code: Select all
% jag scan
Choose what Jaguar device you want to use:
▸ elegant-disease (address: http://0.0.0.0:49458, 64-bit)
local-bank (address: http://192.168.86.26:9000, 32-bit)
spare-dog (address: http://0.0.0.0:49457, 64-bit)
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Jaguar: A fast way to develop for the ESP32
Jaguar is like a box of chocolates. You never know what name you're gonna get.
Re: Jaguar: A fast way to develop for the ESP32
My favorite name so far is magical-juice, but I haven't flashed so many device yet, so something better might pop up
Re: Jaguar: A fast way to develop for the ESP32
Pardon me, good sir... would you happen to have a spare-dog, please?kasperl wrote: ↑Tue Dec 14, 2021 6:02 amJust shipped a new version (v0.0.5) of Jaguar that gives flashed device a unique id - and a catchy name - so they are easy to find later.
Code: Select all
% jag scan Choose what Jaguar device you want to use: ▸ elegant-disease (address: http://0.0.0.0:49458, 64-bit) local-bank (address: http://192.168.86.26:9000, 32-bit) spare-dog (address: http://0.0.0.0:49457, 64-bit)
And does the elegant-disease leave an exquisite corpse?
Re: Jaguar: Live reloading for the ESP32
Jaguar v0.1.1 (just released) comes with support for live reloading based on file watching, so you can do this:
and whenever you change example.toit or any file it depends on, your ESP32 automatically gets the new code. It is pretty magical.
Code: Select all
jag watch example.toit
Who is online
Users browsing this forum: No registered users and 356 guests