-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
Add board: Seeed XIAO BLE #2591
base: master
Are you sure you want to change the base?
Conversation
Thanks - this looks great! Do you think it'd be possible to change |
febd4be
to
6fc4180
Compare
to allow flashing an image built with that option, to recover from .boot0 containing bad stuff
Thanks for the feedback! |
Does the board definition file need to use |
on devices that have such a bootloader the device will reappear as a USB drive
"link": ["https://www.seeedstudio.com/Seeed-XIAO-BLE-nRF52840-p-5201.html"], | ||
"default_console": "EV_USBSERIAL", | ||
"variables": 14000, # How many variables are allocated for Espruino to use. RAM will be overflowed if this number is too high and code won't compile. | ||
"binary_name": "espruino_%v_xiaoble.hex", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this is .uf2? It may be you don't need the ifdef XIAOBLE ... proj: $(PROJ_NAME).uf2
line if it is...
@@ -2887,6 +2887,14 @@ void jshReboot() { | |||
NVIC_SystemReset(); | |||
} | |||
|
|||
#ifdef ESPR_HAS_BOOTLOADER_UF2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks! Please could you add a comment in https://github.com/espruino/Espruino/blob/master/README_BuildProcess.md#infomakefile-definitions though? I'm trying to keep all the defines documented somewhere
@@ -1374,6 +1374,7 @@ JsVar *jsfGetBootCodeFromFlash(bool isReset) { | |||
|
|||
bool jsfLoadBootCodeFromFlash(bool isReset) { | |||
// Load code in .bootFirst at first boot UNLESS BTN1 IS HELD DOWN (BTN3 for Dickens) | |||
#ifndef ESPR_NO_BOOT_JS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame the board doesn't have a button so this is needed - but I feel like it's very unlikely anyone would make a custom build that includes this?
Maybe you could:
- Make the UF2 include the flash area used for saved code so it always overwrites it
- Make a special UF2 that just overwrites the saved code area to allow you to clear it if you want to?
Thanks for those changes to UF2 reboot - that looks really good.
No, that's fine - generate_pins was just a utility function to generate a bunch of contiguous pins. If you want to renumber the pins so they match the board what you've done is the right way to handle it. |
This adds support for the Seeed XIAO BLE, a tiny development board with a nRF52840 and 2 MB of external flash.
The board definition file is based on this one by Espruino forums user parasquid.
Some goodies that are included as well:
E.rebootToDFU()
triggers a reboot to UF2 bootloader mode