-
-
Notifications
You must be signed in to change notification settings - Fork 212
Add Nano33_updateBootloader sketch to support SoftDevices #146
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
Conversation
Memory usage change @ 2b63db6
Click for full report table
Click for full report CSV
|
…hout splitting the MBR
Memory usage change @ fc55c8e
Click for full report table
Click for full report CSV
|
Memory usage change @ 08ee43c
Click for full report table
Click for full report CSV
|
libraries/Nano33_System/examples/Nano33_updateBootloader/Nano33_updateBootloader.ino
Outdated
Show resolved
Hide resolved
@giulcioffi @facchinm Shall we split this up into a bootloader update sketch and a soft device firmware? Might be a bit easier to understand and find for the the users. Also soft device will probably be flashed more often than the bootloader. |
Memory usage change @ e8ddac2
Click for full report table
Click for full report CSV
|
Hi @sebromero, it may be a good idea. My only concern is that, from the user point of view, it needs to be clear that a soft device firmware update works only if the bootloader update is performed before. For this reason, having everything in one sketch can be simpler. |
@giulcioffi What if we split it up and in the soft device sketch we check for the bootloader version and if it doesn't match we ask the user to run the bootloader sketch? At least for the MicroPython/OpenMV use case where we just want people to update the bootloader it would be nice if they had a standalone BL updater and didn't have to think about the Soft Device. Line 32 in bd529a0
|
Hi @sebromero, I split the sketches as you suggested :) |
Memory usage change @ a4a984d
Click for full report table
Click for full report CSV
|
@giulcioffi Splendid! I'll try it out. |
Hi @giulcioffi We just tested it and it seems that for bossac to work both the bootloader and the softdevice sketch need to be run. Can you confirm this? My understanding was that the bootloader update will allow us to flash OpenMV using bossac. |
@sebromero for openmv in particular you need both since it depends on softdevice. For any other sketch the bootloader is enough but you can't tell the difference at "upload time". |
I confirm what @facchinm said. The updated bootloader will always look first for a valid sketch at 0x10000 and this is what ensures backwards compatibility with the standard sketches uploaded from the IDE. If no valid sketch is found (because maybe a SoftDevice has been placed in that portion of flash), the bootloader looks for a valid sketch at 0x26000 and this is the one that you upload with bossac from command line, as written in the instructions of 'Nano33_updateSoftDevice.ino'. In the bootloading phase, the start address is set at 0x10000, which is where the IDE starts writing a sketch. The bossac command that I provided for sketches that use Soft Devices (like for OpenMV) specifies instead an offset of 0x16000, which allows to place the sketch at 0x26000. I hope that this explained a bit better the process :) let me know if you have any other doubt. |
I had a chat with @facchinm about this and I updated the sketch. I'll make a PR on @giulcioffi 's fork. |
Here: giulcioffi#1 I need to test it but don't have a board with me. Will do asap. |
Done. PR is ready giulcioffi#1 |
Thank you @sebromero! :) Would you mind updating/reverting also the instructions at the beginning of the sketch? Thanks! |
@giulcioffi Sure thing, let me take a look |
@giulcioffi Done :-) |
Refactor the updaters back into one sketch
Memory usage change @ 408578a
Click for full report table
Click for full report CSV
|
* Add example to update Nano 33 bootloader to support SoftDevices * Enable the bootloader by writing its address to the UICR memory Co-authored-by: Sebastian Romero <[email protected]>
* Add example to update Nano 33 bootloader to support SoftDevices * Enable the bootloader by writing its address to the UICR memory Co-authored-by: Sebastian Romero <[email protected]>
This sketch allows to update the Bootloader to support SoftDevices and is related to bcmi-labs/zephyr/PR#4.
The sketch can be uploaded at 0x10000 (as in the standard bootloader and core) and then performs the following operations:
The operations performed in flash when the sketch is uploaded are the following: