Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New tutorial: How to rapidly build and test Espruino for banglejs2 #723

Closed
8 tasks done
atjn opened this issue Mar 23, 2024 · 2 comments · Fixed by #725
Closed
8 tasks done

New tutorial: How to rapidly build and test Espruino for banglejs2 #723

atjn opened this issue Mar 23, 2024 · 2 comments · Fixed by #725

Comments

@atjn
Copy link
Contributor

atjn commented Mar 23, 2024

This is a continuation of espruino/Espruino#2476 (comment)

I want to quickly change some code in Espruino, then compile it and flash it to my watch or the web ide emulator so that I can test my changes. That process should be very fast and very safe - no risk of breaking my watch just because I want to test a small change.

I am not able to find any documentation that can help me with that, so I want to write a tutorial specifically for this use case. I will probably need your help in finding a solution that works at all.

It should cover:

I think this would be a very useful guide, what do you think?

@gfwilliams
Copy link
Member

Hi,

yes, this would be a good guide. I think https://github.com/espruino/Espruino/blob/master/README_Building.md#super-easy-github-method is probably what you need though.

To perform a DFU update on an nRF52 device, you need to unzip the BOARDNAME.zip file and then the zip file inside that called espruino_2vXX.YY_boardname.zip is the one you need to use for the firmware updates. On MacOS it may not be immediately apparent that the thing in BOARDNAME.zip named espruino_2vXX.YY_boardname is another zip file, and not a folder.

So linking to that from the tutorial might be good - I think that answers your second question.

How to make sure the upload cannot brick the device

Well, to some extent you can't. But as long as you're not messing with the bootloader you should always be able to recover by flashing this way: https://www.espruino.com/Firmware+Update#nrf52

how to build the Web IDE with an emulator that uses the custom espruino build

https://github.com/espruino/EspruinoWebIDE/blob/master/extras/create_emulator.sh

But the emulator is really got a great test for whether things will work on a real Bangle

@atjn
Copy link
Contributor Author

atjn commented Mar 27, 2024

Thanks for the links, that helped a lot! I am waiting to see if the two open PR's can be merged, then I should be ready with the tutorial :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants