Metadata-Version: 2.4
Name: bflb-efuse-tool
Version: 0.0.1
Summary: Manipulate efuses file, toggle flags, apply masks...
Project-URL: Homepage, https://github.com/josuah/bflb-efuse-tool
Project-URL: Issues, https://github.com/josuah/bflb-efuse-tool/issues
Author-email: Josuah Demangeon <me@josuah.net>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# bflb-efuse-tool

Dump and modify efuse files extracted from BouffaloLabs chips so they can be programmed back.

The files can be extracted using
[`BLFlashCommand`](https://github.com/bouffalolab/bouffalo_sdk/blob/master/tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand-ubuntu):

For instance, after switching the chip to bootloader mode, extract an efuse file for bl616:

```
./BLFlashCommand-ubuntu --chipname bl616 --efuse --read --start 0x00 --end 0x200 --file efuse_bl616.bin
```

Then move JTAG from pins 1 2 3 4 to pins 16 17 18 19:

```
bflb-efuse-tool --chip bl616 --in-file efuse_bl616.bin --out-file efuse_bl616_modified.bin --set jtag_cfg=3
```

Then program the efuse file back:

```
./BLFlashCommand-ubuntu --chipname bl616 --efuse --write --start 0x00 --end 0x200 --efusefile efuse_bl616.bin
```
