Code Monkey home page Code Monkey logo

Comments (17)

hathach avatar hathach commented on June 11, 2024 1

@jerryneedell current uf2 cannot be used to upgrade the bootloader, bootloader can only be upgraded using cdc interface. Best to use Arduino IDE to do so.

But we could add this feature in future release. Just making sure it doesn’t brick device 😁😁

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024 1

@hathach Thanks -- before I try it, can you please confirm that I can do this with a CircuitPlayground Bluefruit connected to my system via a USB cable. Do I have to manually enter bootloader mode or any other pre-configuration?

You don't need to force it into DFU mode, the command will does the that trick by connecting at baud 1200 bps then disconnect --touch 1200. It will then could upgrade the bootloader as normal. You can add --verbose option right after adafruit-nrfutil as well. Don't reset/disconnect or do anything until you see Device programmed

https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/updating-the-bootloader

from adafruit_nrf52_bootloader.

jerryneedell avatar jerryneedell commented on June 11, 2024 1

worked great! both on CircuitPlayground Bluefruit and feather_nrf52840_express

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

@dhalbert in case the bootloader is corrupted, we must use a jlink to debrick it :D since there is no way to load this app to rewrite the bootloader :D . This would be mainly use to replace whatever bootloader on the board (that could load this image) by our bootloader.

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

opps, I just realized you mean to run an in-place binary script in filesystem to update the bootloader ?

from adafruit_nrf52_bootloader.

dhalbert avatar dhalbert commented on June 11, 2024

No, not in filesystem: we'd use the existing bootloader to load a program that rewrites the bootloader. This program would overwrite CircuitPython or an Arduino sketch or whatever was in flash. It would be supplied .uf2 and .hex format (and maybe .ino).

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

Ah ok, I was thinking on how to correct the current corrupted bootloader. But I guess it is jlink work, this application firmware is only to replace whatever an oem bootloader on a nrf52840 board to our bootloader.

from adafruit_nrf52_bootloader.

dhalbert avatar dhalbert commented on June 11, 2024

Right, or to update the .uf2 bootloader to a newer version, for whatever reason.

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

This is a bit tricky and easy to brick, we will only create one version of this app for a specific board with current sd which is 6.1.0. User needs to go through normal dfu-flash afterward to upgrade bootloader to the latest. Hopefully nordic bootloadrr does not use locked, or any kind of memory protection :D

from adafruit_nrf52_bootloader.

dhalbert avatar dhalbert commented on June 11, 2024

@hathach Does the bootloader protect itself from a user-program overwrite by using the ACL peripheral? I see that once you protect a region by writing the ACL registers, they can't be changed back until there's a hard reset.

I thought perhaps this is how the bootloader protects itself, and if we can get the bootloader to skip the ACL-setting step (e.g. via the second switch or a pin check or something), then we could enable a user-mode bootloader update.

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

@dhalbert currently ACL is not enabled yet, There is an issue to enable ACL here. #21 . So yeah, we are free to do user-mode bootloader update.

from adafruit_nrf52_bootloader.

jerryneedell avatar jerryneedell commented on June 11, 2024

Jus to clarify, Can a user now update the Bootloader by simply creating a .uf2 from the released .hex file and then dragging it to the device? If so, should the release assets include .uf2 versions?
I am mostly asking in regards to the circuit playground bluefruit since it does not have an SWD connector installed.

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

you can also use the adafruit-nrfutil manually as well, i will update this comment with the correct syntax when I got home.

from adafruit_nrf52_bootloader.

jerryneedell avatar jerryneedell commented on June 11, 2024

@hathach Thank you! That would be very helpful!

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

@hathach Thank you! That would be very helpful!

here it is
adafruit-nrfutil dfu serial --package bootloader.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200

from adafruit_nrf52_bootloader.

jerryneedell avatar jerryneedell commented on June 11, 2024

@hathach Thanks -- before I try it, can you please confirm that I can do this with a CircuitPlayground Bluefruit connected to my system via a USB cable. Do I have to manually enter bootloader mode or any other pre-configuration?

That is, no J-link is necessary for this?

from adafruit_nrf52_bootloader.

hathach avatar hathach commented on June 11, 2024

bootloader can be updated using uf2 and cdc now. For non-adafruit such as Nordic bootloader and other vendor bootloader, that will mostly use ACL to protect the bootloader. I feel this issue is out of date, could be reopened or create new one if needed.

from adafruit_nrf52_bootloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.