-
-
Notifications
You must be signed in to change notification settings - Fork 35
Bootloader source code #23
Comments
Just chiming in that it would be very useful to be able to have some info on how to compile the bootloader for the Nano 33 BLE Sense. |
Does reading work on the bootloader that is flashed on the board by default? I'm trying:
and getting:
Writing is working as expected. |
@facchinm Sorry to keep bugging on this, but could you leave a quick comment on the state of the bootloader? Is it: closed source, just going to take some time to make available, or already available somewhere? We want to use the board for an open source project (tock), but our use case requires being able to read flash before writing new apps to the board. |
I'm also wondering about this - I much prefer the UF2 bootloaders used on a variety of boards, including all recent Adafruit ones (see https://github.com/adafruit/Adafruit_nRF52_Bootloader for their nrf52840 port that includes some nano 33 ble support), but since SAM-BA isn't a terribly common protocol on nrf chips, that's not supported by default with the nrf52 uf2 bootloader so the Arduino IDE breaks. If I had the bootloader source, I could possibly integrate that protocol as well. |
Can the bootloader update itself? |
Not sure, but I couldn't replace it with another bootloader without using a debug tool. |
I'm now thinking about a trojan horse application that would replace the bootloader on first boot. |
Yeah, that's how many of the Adafruit UF2 bootloader upgraders/installers work (I don't remember if https://github.com/adafruit/Adafruit_nRF52_Bootloader had it or only the ones for the SAMD chips). I considered it but didn't have the time to dedicate to making it. |
Hi everyone Bossa for nrf52 is here https://github.com/arduino/BOSSA |
I can't find the bootloader in that code, though, only the programming utility (which mostly looks stubbed-out on the NRF52 branch) |
@facchinm Why on earth is the boot loader source code not available on GitHub? I've run into an issue with the MKR WAN 1310. The boot loader that comes preinstalled with the hardware is causing excessive current consumption. I am disappointed with this experience because it took much longer than it should have to isolate the problem. Having access to the boot loader source would have saved considerable time. I recommend you ship all Arduino boards with the SWD connector installed so we can easily replace the boot loader. |
We have port this core to be compatible with the bootloader UF2, if you want to test, is available here https://github.com/ElectronicCats/ArduinoCore-nRF528x-mbedos, UF2 is open source now |
Yes, I am using UF2. That was how I discovered the problem. I had developed my app on a board I was using with UF2. Everything worked fine. When I tried to assemble and flash a set of "new" boards, I used the Arduino boot loader (flashing UF2 on the MKR WAN requires adding another connector to the MKR WAN and using SWD). I noticed the power consumption was 100x what it was supposed to be for the new set of boards. I didn't realize at first that the problem was the boot loader ... I went searching for other sources of the problem, hardware differences between v2 and v3 boards, firmware issues with my app, etc. I finally realized that the only difference was the boot loader. So, I reflashed one of the new boards with UF2 and viola, works like a charm. What concerns me is the time required to track the problem down to the boot loader. And, I would like to avoid having to reflash the Arduino's with UF2. Preferably, Arduino should be using UF2 by now and shipping their products with UF2. Thanks for the link. I'm am working towards migrating to nRF into my next products to avoid power consumption problems with Atmel SAMD/E. |
I have also used (the Adafruit) UF2 bootloader with this, which is why I wanted this source initially, to add compatibility with the BOSSA protocol the Arduino IDE uses by default - the alternative is having to create a separate or forked core. I was very surprised when I got the Nano 33 BLE that Arduino hasn't moved to UF2 yet. |
Indeed. I have also determined there are other issues with the Arduino boot loader that affect my application. I have also observed there is something going on with respect to the RTC on SAMD boards that causes problems when waking from sleep. Since I have no way to debug what is going on because I have no access to source code I cannot explain what is causing this issue. What I can suggest is that experimentally, UF2 appears to eliminate this issue. I was surprised by these observations and it is not obvious to me how the boot loader could be affecting the RTC and power consumption. Nevertheless, it does appear to do so and UF2 appears to not have these undesirable side effects. I tried the UF2 "update sketch" to update the boot loader but that bricked my board. So, I had to attach wires so I could attach a SWD debugger and flash the new boot loader. Have you had success updating the boat loader using the "update sketch" that the UF2 build process generates? |
No, unfortunately, I didn't even notice that it created an "update sketch" for this board. I built a little fixture with pogo pins to connect a debugger to the SWD pads to switch between the two bootloaders (and, because I didn't bother modifying the Arduino-supplied core, switching between BSP's) |
@sslupsky. This issue is about the Arduino Nano 33 BLE bootloader. Discussing problems with the bootloader of SAMD boards like your MKR WAN 1310 is off topic here. As for the source code of that bootloader, it's right here: |
Does anyone have a guide on how to replace the bootloader on the nano33 with a better one (without J-Link)? |
Since the bossa bootloader is not open source, I developed a method for replacing the bootloader: https://github.com/tock/tock/blob/master/boards/nano33ble/README.md#getting-started The bootloader we use for TockOS is custom, but mostly works like any other bootloader. Maybe it could be useful to someone even if not using Tock. In any case, it is open source: https://github.com/tock/tock-bootloader. |
Hello, I'm working on a project using this board, is it possible to have the source code of the bootloader? Is it a Bossa bootloader, right? I would like to implement a DFU mode like the Nordic bootloader.
Thank you very much!
The text was updated successfully, but these errors were encountered: