bouffalolab / bouffalo_sdk

BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
349 stars 121 forks source link

"BFLB LOAD HELP BIN FAIL" when flashing helloword example (BL616) #208

Closed dsptech closed 1 month ago

dsptech commented 1 month ago

Sdk Commit: 9a267ff0f9c40fce3efcd4c92a726349381a9b31 IDE: Eclipse CDT OS: Windows 11 pro.

Hi, I'm new to this SDK, and I'm facing the error "BFLB LOAD HELP BIN FAIL" when attempting to flash the 'helloworld' example.

I've downloaded both the SDK and the toolchain, installed them, and finally imported the SDK into Eclipse CDT. It seems that I can successfully compile the examples (both 'helloworld' and 'freertos'). However, when I try to flash the 'helloworld' example onto two BL616 devices (two Sipeed M0S modules with docks), I encounter the error: "BFLB LOAD HELP BIN FAIL." The captured log displays the error message along with the corresponding command line used.

16:13:55 Build of configuration Default for project bouffalo_sdk make flash CHIP=bl616 COMX=COM6 -C examples/helloworld make: Entering directory 'C:/MyPRJ/gitOther/BOUFFALO_LAB/bouffalo_sdk/examples/helloworld' ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM6 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini [16:14:01.152] - Serial port is COM6 [16:14:01.152] - ================================================== [16:14:01.162] - Program Start [16:14:01.162] - ========= eflash loader cmd arguments ========= [16:14:01.172] - serial port is COM6 [16:14:01.172] - chiptype: bl616 [16:14:01.172] - cpu_reset=False [16:14:01.240] - com speed: 2000000 [16:14:01.240] - ========= Interface is uart ========= [16:14:01.240] - Bootrom load [16:14:01.240] - ========= get_boot_info ========= [16:14:01.240] - ========= image get bootinfo ========= [16:14:01.263] - default set DTR high [16:14:01.367] - usb serial port [16:14:01.430] - clean buf [16:14:01.465] - send sync [16:14:01.569] - ack is b'' [16:14:01.569] - retry [16:14:01.570] - default set DTR high [16:14:01.680] - usb serial port [16:14:01.742] - clean buf [16:14:01.777] - send sync [16:14:01.882] - ack is b'' [16:14:01.882] - retry [16:14:01.882] - default set DTR high [16:14:01.991] - usb serial port [16:14:02.053] - clean buf [16:14:02.089] - send sync [16:14:02.194] - ack is b'' [16:14:02.194] - retry [16:14:02.212] - shake hand fail [16:14:02.212] - ######################################################################## [16:14:02.212] - 'charmap' codec can't encode characters in position 17-28: character maps to [16:14:02.212] - {"ErrorCode": "0003","ErrorMsg":"BFLB LOAD HELP BIN FAIL"} [16:14:02.214] - Burn Retry [16:14:02.214] - Burn return with retry fail make: Leaving directory 'C:/MyPRJ/gitOther/BOUFFALO_LAB/bouffalo_sdk/examples/helloworld'

16:14:02 Build Finished. 0 errors, 0 warnings. (took 6s.310ms)

I also attempted the flashing with Flashcube GUI but the result is a different error code (google translation):

[16:38:41.240] - serial type is bouffalo [16:38:41.305] - Open COM6 Success [16:38:45.341] - Close COM6 Success [16:38:45.345] - Program Start [16:38:45.345] - ========= eflash loader cmd arguments ========= [16:38:45.350] - serial port is COM6 (PROG) [16:38:45.350] - chiptype: bl616 [16:38:45.350] - cpu_reset=False [16:38:45.404] - com speed: 2000000 [16:38:45.405] - ========= Interface is uart ========= [16:38:45.405] - Bootrom load [16:38:45.405] - ========= get_boot_info ========= [16:38:45.405] - ========= image get bootinfo ========= [16:38:45.429] - default set DTR high [16:38:45.541] - usb serial port [16:38:45.603] - clean buf [16:38:45.640] - send sync [16:38:45.743] - ack is b'' [16:38:45.745] - retry [16:38:45.746] - default set DTR high [16:38:45.852] - usb serial port [16:38:45.915] - clean buf [16:38:45.951] - send sync [16:38:46.054] - ack is b'' [16:38:46.058] - retry [16:38:46.060] - default set DTR high [16:38:46.163] - usb serial port [16:38:46.225] - clean buf [16:38:46.262] - send sync [16:38:46.366] - ack is b'' [16:38:46.367] - retry [16:38:46.384] - shake hand fail [16:38:46.384] - ######################################## ############################## [16:38:46.384] - Please troubleshoot the problem as described below: [16:38:46.384] - Is the Boot pin pulled up to the board’s own 3.3V instead of the external 3.3V? [16:38:46.385] - Is the UART RX connected to the TX pin of the USB to serial port? [16:38:46.385] - Is the UART TX connected to the RX pin of the USB to serial port? [16:38:46.385] - Before using the burning software for burning, did you use Reset/Chip_En to reset the chip when the Boot pin was pulled high? [16:38:46.385] - Whether the COM port selected by the burning software is the serial port connected to the chip [16:38:46.385] - Whether the baud rate selected on the burning software is the baud rate supported by the USB to serial port [16:38:46.385] - Is the 3.3V power supply normal? [16:38:46.385] - Is the board power supply current normal (in burning mode, the chip consumes 5-7mA) [16:38:46.385] - ######################################### ############################## [16:38:46.386] - shake hand fail [16:38:46.405] - ========= ChipID: ========= [16:38:46.418] - Get bootinfo time cost(ms): 1013.315185546875 [16:38:46.418] - {"ErrorCode": "0050","ErrorMsg":"BFLB IMG LOAD SHAKEHAND FAIL"} [16:38:46.418] - Burn Retry [16:38:46.418] - Burn return with retry fail

It seems like the error may be related to a connection issue, although the (USB) serial port appears to be correctly installed in the Windows peripherals.

I already searched between the other issues with similar error, but this not helped me. Might the devices be defective? An sdk issue ? Or am I probably doing something wrong? I'm stuck with this problem, so any suggestions would be greatly appreciated. Thank you.

dsptech commented 1 month ago

My bad. I didn't realize that with "boot", windows allocates a new serial port. The flashing operation appear to work correctly now.