mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-12 12:08:13 +08:00
Document how to update the SoftDevice or Bootloader.
This commit is contained in:
14
README.md
14
README.md
@@ -35,3 +35,17 @@ $ node example_node <device-type>
|
||||
```
|
||||
|
||||
Where ```<device-type>``` is one of ```nrf51``` or ```nrf52```.
|
||||
|
||||
## Updating the SoftDevice or Bootloader
|
||||
|
||||
When updating the application nothing special needs to be done - the only input required is APPLICATION.hex. However it is possible to update the SoftDevice or Bootloader as well.
|
||||
|
||||
Softdevice: When updating the SoftDevice we must not rewrite the [Master Boot Record (MBR)](https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds.v0.5/dita/softdevices/s130/mbr_bootloader/mbr_bootloader.html?cp=1_3_0_0_9).
|
||||
As the MBR is included in Nordic's SoftDevices at the beggining of FLASH, the end address of the MBR will need to be specified when converting the hex file (i.e. hex2bin(softdevice.hex, 0x1000);). This way when updating the SoftDevice
|
||||
the current MBR already on the device will be preserved, but the SoftDevice will be replaced. User is responsible for determining the end address of the MBR for their specific SoftDevice and specifying this as an input to hex2bin.
|
||||
|
||||
Bootloader: When updating the bootloader we must not rewrite the [UICR](https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/uicr.html?cp=1_2_0_12#concept_rnp_grp_xr). The UICR is a special page of FLASH located
|
||||
in a different memory region on Nordic Devices. Nordic's DFU protocol does not support transferring data that is located in this memory region, and thus it needs to be trimmed off of our BOOTLOADER.hex file. However hex2bin will
|
||||
take care of this automatically and no special care needs to be taken when doing this type of update.
|
||||
|
||||
Note: Currently updating the SoftDevice and Bootloader at the same time is not supported.
|
||||
|
||||
2
dist/hex2bin.js
vendored
2
dist/hex2bin.js
vendored
@@ -111,7 +111,7 @@
|
||||
* And we are not to send UICR data (above maxAddress) when updating the bootloader or application.
|
||||
*/
|
||||
return function(hex, minAddress, maxAddress) {
|
||||
maxAddress = maxAddress || 0xFFFFFFFF;
|
||||
maxAddress = maxAddress || 0x80000; // This will always cut off the UICR and the user will not have to every specify this parameter.
|
||||
minAddress = minAddress || 0x0;
|
||||
|
||||
var startAddress = helperGetBinaryStartAddress(hex.split("\n"), minAddress);
|
||||
|
||||
Reference in New Issue
Block a user