Skip to content

Instantly share code, notes, and snippets.

@stolk
Created December 16, 2022 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stolk/d7a865e6c5fec9a07bb40c79e072aa02 to your computer and use it in GitHub Desktop.
Save stolk/d7a865e6c5fec9a07bb40c79e072aa02 to your computer and use it in GitHub Desktop.
stolk@workpc:~/src/bl808_linux$ bflb-mcu-tool --chipname=bl808 --port=/dev/ttyACM2 --baudrate=2000000 --firmware=out/low_load_bl808_m0.bin
[16:03:52.056] -
[16:03:52.056] - ==================================================
[16:03:52.056] - Chip name is bl808
[16:03:52.056] - Serial port is /dev/ttyACM2
[16:03:52.056] - Baudrate is 2000000
[16:03:52.056] - Firmware is out/low_load_bl808_m0.bin
[16:03:52.056] - Device Tree is None
[16:03:52.056] - ==================================================
[16:03:52.056] - Default xtal is 40M
[16:03:52.056] - Default flash clock is XTAL
[16:03:52.056] - Default mcu clock is WIFIPLL 320M
[16:03:52.059] - EFUSE_CFG
[16:03:52.059] - BOOTHEADER_GROUP0_CFG
[16:03:52.059] - BOOTHEADER_GROUP1_CFG
[16:03:52.061] - Create bootheader using /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini
[16:03:52.062] - Updating data according to </home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_GROUP0_CFG]>
[16:03:52.062] - Created file len:352
[16:03:52.063] - Create bootheader using /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini
[16:03:52.063] - Updating data according to </home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_GROUP1_CFG]>
[16:03:52.064] - Created file len:352
[16:03:52.065] - Create efuse using /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini
[16:03:52.065] - Updating data according to </home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/efuse_bootheader_cfg.ini[EFUSE_CFG]>
[16:03:52.066] - Created file len:256
[16:03:52.066] - ef_sw_usage_0 not exist
[16:03:52.066] - ef_sw_usage_1 not exist
[16:03:52.067] - Image create path: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu
[16:03:52.067] - Config file: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/img_create_mcu/img_create_cfg.ini
[16:03:52.067] - Image hash is b'05da438a12bfb83fdf552206806a9762f3f30a81f71ffec2f79ccdc610703d0f'
[16:03:52.071] - Header crc: b'd529b7eb'
[16:03:52.071] - Write flash img
[16:03:52.071] - Image hash is b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
[16:03:52.071] - Header crc: b'76c33566'
[16:03:52.071] - Write flash img
[16:03:52.071] - Encrypt efuse data
[16:03:52.072] - ========= eflash loader config =========
[16:03:52.074] - Version: eflash_loader_v2.4.3
[16:03:52.074] - Program Start
[16:03:52.074] - ========= eflash loader cmd arguments =========
[16:03:52.074] - None
[16:03:52.074] - Config file: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/eflash_loader/eflash_loader_cfg.ini
[16:03:52.074] - serial port is /dev/ttyACM2
[16:03:52.075] - cpu_reset=False
[16:03:52.075] - chiptype: bl808
[16:03:52.075] - ========= Interface is uart =========
[16:03:52.075] - com speed: 2000000
[16:03:52.075] - Bootrom load
[16:03:52.075] - ========= get_boot_info =========
[16:03:52.075] - ========= image get bootinfo =========
[16:03:52.075] - clean buf
[16:03:52.075] - send sync
[16:03:52.580] - ack is b'4f4b'
[16:03:52.610] - shake hand success
[16:03:53.112] - data read is b'01000808000000000b14c1026df82bcf0eb455002ff4fb18'
[16:03:53.112] - ========= ChipID: b40ecf2bf86d =========
[16:03:53.112] - Get bootinfo time cost(ms): 1037.64453125
[16:03:53.112] - clock para file: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/efuse_bootheader/clock_para.bin
[16:03:53.112] - change bdrate: 2000000
[16:03:53.112] - Clock PLL set
[16:03:53.112] - clock para:
[16:03:53.112] - 504346470404000003010300010200020101000101010101c0c4e229
[16:03:53.114] - Set clock time cost(ms): 1.292236328125
[16:03:53.224] - Read mac addr
[16:03:53.225] - flash set para
[16:03:53.225] - set flash cfg: 14180
[16:03:53.225] - Set flash config
[16:03:53.228] - Set para time cost(ms): 2.18310546875
[16:03:53.228] - ========= flash read jedec ID =========
[16:03:53.229] - Read flash jedec ID
[16:03:53.229] - readdata:
[16:03:53.229] - b'ef601800'
[16:03:53.229] - Finished
[16:03:53.232] - Program operation
[16:03:53.232] - Dealing Index 0
[16:03:53.232] - ========= programming chips/bl808/img_create_mcu/bootinfo_group0.bin to 0x00000000
[16:03:53.236] - flash para file: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/efuse_bootheader/flash_para.bin
[16:03:53.236] - Set flash config
[16:03:53.238] - Set para time cost(ms): 2.496337890625
[16:03:53.239] - ========= flash load =========
[16:03:53.239] - ========= flash erase =========
[16:03:53.239] - Erase flash from 0x0 to 0x653
[16:03:53.264] - Erase time cost(ms): 25.58740234375
[16:03:53.274] - Load 1620/1620 {"progress":100}
[16:03:53.274] - Load 1620/1620 {"progress":100}
[16:03:53.274] - Write check
[16:03:53.278] - Flash load time cost(ms): 13.440185546875
[16:03:53.278] - Finished
[16:03:53.278] - Sha caled by host: 97118f743435ea0c31da3ee718412f8931bcb6bb30629dc055b3db2efc37e536
[16:03:53.278] - xip mode Verify
[16:03:53.281] - Read Sha256/1620
[16:03:53.281] - Flash xip readsha time cost(ms): 2.33203125
[16:03:53.281] - Finished
[16:03:53.282] - Sha caled by dev: 97118f743435ea0c31da3ee718412f8931bcb6bb30629dc055b3db2efc37e536
[16:03:53.282] - Verify success
[16:03:53.282] - Dealing Index 1
[16:03:53.282] - ========= programming chips/bl808/img_create_mcu/img_group0.bin to 0x00002000
[16:03:53.285] - flash para file: /home/stolk/.local/lib/python3.10/site-packages/bflb_mcu_tool/chips/bl808/efuse_bootheader/flash_para.bin
[16:03:53.285] - Set flash config
[16:03:53.288] - Set para time cost(ms): 2.4150390625
[16:03:53.288] - ========= flash load =========
[16:03:53.288] - ========= flash erase =========
[16:03:53.288] - Erase flash from 0x2000 to 0xb4ef
[16:03:53.570] - Erase time cost(ms): 281.416748046875
[16:03:53.594] - decompress flash load 21584
[16:03:53.616] - Load 4096/21584 {"progress":18}
[16:03:53.644] - Load 8192/21584 {"progress":37}
[16:03:53.673] - Load 12288/21584 {"progress":56}
[16:03:53.713] - Load 16384/21584 {"progress":75}
[16:03:53.752] - Load 20480/21584 {"progress":94}
[16:03:53.789] - Load 21584/21584 {"progress":100}
[16:03:53.789] - Load 21584/21584 {"progress":100}
[16:03:53.790] - Write check
[16:03:53.808] - Flash load time cost(ms): 237.924560546875
[16:03:53.808] - Finished
[16:03:53.808] - Sha caled by host: 05da438a12bfb83fdf552206806a9762f3f30a81f71ffec2f79ccdc610703d0f
[16:03:53.808] - xip mode Verify
[16:03:53.841] - Read Sha256/38128
[16:03:53.841] - Flash xip readsha time cost(ms): 32.33154296875
[16:03:53.841] - Finished
[16:03:53.842] - Sha caled by dev: 05da438a12bfb83fdf552206806a9762f3f30a81f71ffec2f79ccdc610703d0f
[16:03:53.842] - Verify success
[16:03:53.842] - Program Finished
[16:03:53.842] - All time cost(ms): 1767.853759765625
[16:03:53.945] - close interface
[16:03:53.945] - [All Success]
@SLASH-JEET
Copy link

Hello, I am trying to Flash BL808 but unfortunately I am not able to get past the JEDEC ID it just returns 00000000, can you please help me!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment