Skip to content

Contributed by WT_0213, curated by Ai-Thinker

This article introduces some problems encountered while running examples and how to deal with them. It is assumed that the default environment has already been set up.

Operation Steps

1
Open the project in the integrated terminal

Right-click the hello world project and select “Open in Integrated Terminal”.

2
Confirm the terminal window

A terminal window appears on the right.

3
Run make to compile

Type make and press Enter, then wait for compilation to finish (see the complete build log in the collapsible section below).

4
Recompile with the CHIP / BOARD from README

If the environment is configured correctly, compilation basically passes. After checking README.md, the missing parameters were CHIP=bl616 BOARD=bl616dk; run make CHIP=bl616 BOARD=bl616dk again to compile the specified firmware.

5
Flash the firmware

Flash with make flash CHIP=bl616 COMX=COM7. If it fails, first check the COM port in Device Manager (change 7 to the actual port number); the chip_name in the command should be bl616.

Before flashing, put the board into flash mode: unplug the USB cable, turn the Type-C port downward, hold the right BOOT button, plug in the USB cable, release, then run the flash command.

6
Serial verification and baud rate fix

Open the serial monitor and press the EN button (the left button when the Type-C port faces downward) to start output. If it outputs garbage characters, the baud rate does not match - change the 2000000 baud rate on line 193 of bsp -> board -> bl616dk -> board.c to 115200, recompile and flash, then verify again.

📜 Click to expand the complete run log (build / flash output)
  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make

  2. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=/dev/ttyUSB0 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  3. -- The C compiler identification is GNU 10.2.0

  4. -- The CXX compiler identification is GNU 10.2.0

  5. -- The ASM compiler identification is GNU

  6. -- Found assembler: D:/aithinker_Ai-M6X_SDK/toolchain_gcc_t-head_windows/bin/riscv64-unknown-elf-gcc.exe

  7. -- Detecting C compiler ABI info

  8. -- Detecting C compiler ABI info - done

  9. -- Check for working C compiler: D:/aithinker_Ai-M6X_SDK/toolchain_gcc_t-head_windows/bin/riscv64-unknown-elf-gcc.exe - skipped

  10. -- Detecting C compile features

  11. -- Detecting C compile features - done

  12. -- Detecting CXX compiler ABI info

  13. -- Detecting CXX compiler ABI info - done

  14. -- Check for working CXX compiler: D:/aithinker_Ai-M6X_SDK/toolchain_gcc_t-head_windows/bin/riscv64-unknown-elf-g++.exe - skipped

  15. -- Detecting CXX compile features

  16. -- Detecting CXX compile features - done

  17. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  18. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  19. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  20. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  21. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  22. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  23. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  24. -- Configuring done

  25. -- Generating done

  26. CMake Warning:

  27. Manually-specified variables were not used by the project:

  28. CONFIG_COMX

  29. CONFIG_USB_HS

  30. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  31. make -C build -j8

  32. [ 0%] [ 0%] Building C object build_out/components/utils/CMakeFiles/utils.dir/log/log.c.obj

  33. Building C object CMakeFiles/app.dir/D_/aithinker_Ai-M6X_SDK/bsp/board/bl616dk/board.c.obj[ 2%] [ 2%]

  34. Building C object build_out/components/utils/CMakeFiles/utils.dir/ring_buffer/ring_buffer.c.objBuilding C object build_out/components/utils/CMakeFiles/utils.dir/bflb_block_pool/bflb_block_pool.c.obj

  35. [ 3%] [ 3%]

  36. Building C object build_out/components/libc/CMakeFiles/libc.dir/newlib/port_memory.c.objBuilding C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_common.c.obj

  37. [ 3%] Building C object build_out/components/mm/CMakeFiles/mm.dir/mem.c.obj

  38. [ 4%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/start.S.obj

  39. [ 4%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/vector.S.obj

  40. [ 5%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/riscv_fpu.S.obj

  41. [ 6%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/start_load.c.obj

  42. [ 7%] Building C object CMakeFiles/app.dir/D_/aithinker_Ai-M6X_SDK/bsp/board/bl616dk/fw_header.c.obj

  43. [ 8%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/system_bl616.c.obj[ 9%]

  44. Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_adc.c.obj

  45. [ 10%] Building C object build_out/components/libc/CMakeFiles/libc.dir/newlib/syscalls_nosys.c.obj

  46. [ 11%] Building C object build_out/components/mm/CMakeFiles/mm.dir/tlsf/tlsf.c.obj

  47. [ 13%] [ 13%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/interrupt.c.objBuilding C object build_out/components/utils/CMakeFiles/utils.dir/bflb_timestamp/bflb_timestamp.c.obj

  48. [ 14%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_acomp.c.obj

  49. [ 15%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_abs.c.obj

  50. [ 16%] Linking C static library build_out\lib\libapp.a

  51. [ 17%] Building C object build_out/components/utils/CMakeFiles/utils.dir/getopt/utils_getopt.c.obj

  52. [ 18%] Building C object build_out/components/mm/CMakeFiles/mm.dir/tlsf/bflb_tlsf.c.obj

  53. [ 19%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_cks.c.obj

  54. [ 19%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_romapi_e907.c.obj

  55. [ 20%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_ef_ctrl.c.obj

  56. [ 21%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_romapi_patch.c.obj[ 21%] Built target app

  57. [ 21%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atof.c.obj

  58. [ 22%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atoi.c.obj

  59. [ 22%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_gpio.c.obj

  60. [ 23%] Linking C static library ....\lib\libutils.a

  61. [ 24%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_common.c.obj

  62. [ 25%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atol.c.obj

  63. [ 26%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_i2c.c.obj

  64. [ 27%] Linking C static library ....\lib\libmm.a

  65. [ 27%] Built target utils

  66. [ 28%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_ef_cfg.c.obj

  67. [ 29%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atoll.c.obj

  68. [ 30%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dma.c.obj

  69. [ 31%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_bsearch.c.obj

  70. [ 32%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_sdh.c.obj

  71. [ 32%] Built target mm

  72. [ 33%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_rtc.c.obj

  73. [ 33%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_checkbase.c.obj

  74. [ 34%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_itoa.c.obj

  75. [ 35%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_aes.c.obj

  76. [ 36%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_tzc_sec.c.obj

  77. [ 37%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_llabs.c.obj

  78. [ 37%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_psram.c.obj

  79. [ 38%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_sha.c.obj

  80. [ 38%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_trng.c.obj

  81. [ 39%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_lldiv.c.obj

  82. [ 40%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_pm.c.obj

  83. [ 41%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_spi.c.obj

  84. [ 42%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_aon.c.obj

  85. [ 43%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_qsort.c.obj

  86. [ 44%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_timer.c.obj

  87. [ 45%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_uart.c.obj

  88. [ 46%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/port/bl616_clock.c.obj

  89. [ 46%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_strtod.c.obj

  90. [ 47%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_wdg.c.obj

  91. [ 48%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffs.c.obj

  92. [ 48%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_flash.c.obj

  93. [ 49%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sf_cfg.c.obj

  94. [ 50%] Linking C static library ........\lib\libstd.a

  95. [ 51%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_xip_sflash.c.obj

  96. [ 52%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffsl.c.obj

  97. [ 53%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sflash.c.obj

  98. [ 54%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffsll.c.obj

  99. [ 55%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_fls.c.obj

  100. [ 56%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sf_ctrl.c.obj

  101. [ 56%] Built target std

  102. [ 56%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dac.c.obj

  103. [ 57%] [ 58%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_flsl.c.obj

  104. Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_emac.c.obj[ 58%]

  105. [ 59%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_flsll.c.obj

  106. Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_ir.c.obj

  107. [ 60%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_mjpeg.c.obj

  108. [ 61%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_index.c.obj

  109. [ 62%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_pwm_v2.c.obj

  110. [ 63%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_cam.c.obj

  111. [ 63%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sdio2.c.obj

  112. [ 64%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memccpy.c.obj

  113. [ 65%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_i2s.c.obj

  114. [ 66%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memchr.c.obj

  115. [ 67%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dbi.c.obj

  116. [ 68%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memcmp.c.obj

  117. [ 69%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_audac.c.obj

  118. [ 69%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memmove.c.obj

  119. [ 70%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memrchr.c.obj

  120. [ 71%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memset.c.obj

  121. [ 72%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_auadc.c.obj

  122. [ 73%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_stpcpy.c.obj

  123. [ 73%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_platform_dma.c.obj[ 74%]

  124. Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_stpncpy.c.obj

  125. [ 75%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_irq.c.obj

  126. [ 75%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcasecmp.c.obj

  127. [ 76%] [ 77%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_l1c.c.obj

  128. Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_mtimer.c.obj

  129. [ 78%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcasestr.c.obj

  130. [ 79%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcat.c.obj

  131. [ 80%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/include/arch/risc-v/t-head/rv_hart.c.obj

  132. [ 80%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/include/arch/risc-v/t-head/rv_pmp.c.obj

  133. [ 81%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strchr.c.obj

  134. [ 82%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcmp.c.obj

  135. [ 83%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcspn.c.obj

  136. [ 84%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/config/bl616/device_table.c.obj

  137. [ 84%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strdup.c.obj

  138. [ 85%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strnlen.c.obj

  139. [ 86%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strpbrk.c.obj

  140. [ 87%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strrchr.c.obj

  141. [ 88%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strsep.c.obj

  142. [ 88%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strspn.c.obj

  143. [ 89%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strstr.c.obj

  144. [ 90%] Linking C static library ....\lib\liblhal.a

  145. [ 91%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strtok.c.obj

  146. [ 92%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strtokr.c.obj

  147. [ 93%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_vikmemcpy.c.obj

  148. [ 94%] [ 94%] Building C object build_out/components/libc/CMakeFiles/libc.dir/snprintf.c.objBuilding C object build_out/components/libc/CMakeFiles/libc.dir/vsnprintf.c.obj

  149. [ 95%] Building C object build_out/components/libc/CMakeFiles/libc.dir/sprintf.c.obj

  150. [ 96%] [ 97%] Building C object build_out/components/libc/CMakeFiles/libc.dir/vsprintf.c.objBuilding C object build_out/components/libc/CMakeFiles/libc.dir/printf.c.obj

  151. [ 97%] Built target lhal

  152. [ 98%] Linking C static library ....\lib\liblibc.a

  153. [ 98%] Built target libc

  154. [ 99%] Building C object CMakeFiles/helloworld_bl616.elf.dir/main.c.obj

  155. [100%] Linking C executable build_out\helloworld_bl616.elf

  156. Generate D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/build_out/helloworld_bl616.bin

  157. [100%] Built target helloworld_bl616.elf

  158. make -C build combine

  159. [11:39:00.763] - bflb firmware post process : V1.2.0

  160. [11:39:00.763] - Chipname: bl616

  161. [11:39:00.764] - Board config dir: ./../../bsp/board/bl616dk/config

  162. [11:39:00.764] - Create partition using partition_cfg_4M.toml

  163. [11:39:00.918] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  164. [11:39:00.918] - Create dts using bl_factory_params_IoTKitA_auto.dts

  165. [11:39:00.945] - 4K header found,append dts file

  166. [11:39:00.946] - Copy boot2_bl616_release_v8.0.8.bin

  167. [11:39:00.973] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  168. [11:39:00.994] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  169. [11:39:00.994] - Create dts using bl_factory_params_IoTKitA_auto.dts

  170. [11:39:01.008] - 4K header found,append dts file

  171. [11:39:01.009] -

  172. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  173. [11:39:01.023] - ========= sp image create =========

  174. [11:39:01.024] - Flash config crc: b'b5fec518'

  175. [11:39:01.024] - Clock config crc: b'4a05f490'

  176. [11:39:01.024] - Image Offset:0x1000

  177. [11:39:01.025] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'

  178. [11:39:01.026] - Encrypt efuse data

  179. [11:39:01.033] - Image Offset:0x1000

  180. [11:39:01.033] - Image hash ignore,not calculate

  181. [11:39:01.033] - Bootheader config crc: b'4ddfb44c'

  182. [11:39:01.034] -

  183. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  184. [11:39:01.036] - ========= sp image create =========

  185. [11:39:01.036] - Flash config crc: b'b5fec518'

  186. [11:39:01.037] - Clock config crc: b'4a05f490'

  187. [11:39:01.037] - Image Offset:0x2000

  188. [11:39:01.038] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  189. [11:39:01.038] - Encrypt efuse data

  190. [11:39:01.044] - Image Offset:0x2000

  191. [11:39:01.045] - Image hash ignore,not calculate

  192. [11:39:01.046] - Bootheader config crc: b'ccbfa125'

  193. [11:39:01.048] -

  194. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  195. [11:39:01.051] - Flash config crc: b'4fb1fe70'

  196. [11:39:01.052] - Clock config crc: b'0b34ef89'

  197. [11:39:01.052] - Image Offset:0x1000

  198. [11:39:01.056] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  199. [11:39:01.057] - Encrypt efuse data

  200. [11:39:01.059] - Image Offset:0x1000

  201. [11:39:01.060] - Bootheader config crc: b'f9cf01e0'

  202. [11:39:01.062] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  203. [11:39:01.081] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  204. [11:39:01.113] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  205. Built target combine

  206. helloworld

  207. Support CHIP

  208. | CHIP | Remark |

  209. |:----------------😐:------😐

  210. |BL602/BL604 | |

  211. |BL702/BL704/BL706 | |

  212. |BL616/BL618 | |

  213. |BL808 | |

  214. Compile

    • BL602/BL604
  215. make CHIP=bl602 BOARD=bl602dk

    • BL702/BL704/BL706
  216. make CHIP=bl702 BOARD=bl702dk

    • BL616/BL618
  217. make CHIP=bl616 BOARD=bl616dk

    • BL808
  218. make CHIP=bl808 BOARD=bl808dk CPU_ID=m0

  219. make CHIP=bl808 BOARD=bl808dk CPU_ID=d0

  220. Flash

  221. make flash CHIP=chip_name COMX=xxx # xxx is your com name

  222. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make CHIP=bl616 BOARD=bl616dk

  223. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=/dev/ttyUSB0 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  224. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  225. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  226. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  227. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  228. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  229. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  230. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  231. -- Configuring done

  232. -- Generating done

  233. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  234. make -C build -j8

  235. [ 2%] Built target app

  236. [ 16%] Built target std

  237. [ 53%] Built target lhal[ 53%]

  238. Built target utils

  239. [ 56%] Built target mm

  240. [ 98%] Built target libc

  241. [100%] Built target helloworld_bl616.elf

  242. make -C build combine

  243. [11:39:15.700] - bflb firmware post process : V1.2.0

  244. [11:39:15.701] - Chipname: bl616

  245. [11:39:15.701] - Board config dir: ./../../bsp/board/bl616dk/config

  246. [11:39:15.701] - Create partition using partition_cfg_4M.toml

  247. [11:39:15.709] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  248. [11:39:15.709] - Create dts using bl_factory_params_IoTKitA_auto.dts

  249. [11:39:15.717] - 4K header found,append dts file

  250. [11:39:15.718] - Copy boot2_bl616_release_v8.0.8.bin

  251. [11:39:15.719] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  252. [11:39:15.721] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  253. [11:39:15.722] - Create dts using bl_factory_params_IoTKitA_auto.dts

  254. [11:39:15.735] - 4K header found,append dts file

  255. [11:39:15.736] -

  256. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  257. [11:39:15.738] - ========= sp image create =========

  258. [11:39:15.739] - Flash config crc: b'b5fec518'

  259. [11:39:15.739] - Clock config crc: b'4a05f490'

  260. [11:39:15.739] - Image Offset:0x1000

  261. [11:39:15.740] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'

  262. [11:39:15.741] - Encrypt efuse data

  263. [11:39:15.744] - Image Offset:0x1000

  264. [11:39:15.745] - Image hash ignore,not calculate

  265. [11:39:15.745] - Bootheader config crc: b'4ddfb44c'

  266. [11:39:15.747] -

  267. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  268. [11:39:15.750] - ========= sp image create =========

  269. [11:39:15.750] - Flash config crc: b'b5fec518'

  270. [11:39:15.751] - Clock config crc: b'4a05f490'

  271. [11:39:15.751] - Image Offset:0x2000

  272. [11:39:15.752] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  273. [11:39:15.752] - Encrypt efuse data

  274. [11:39:15.754] - Image Offset:0x2000

  275. [11:39:15.754] - Image hash ignore,not calculate

  276. [11:39:15.755] - Bootheader config crc: b'ccbfa125'

  277. [11:39:15.756] -

  278. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  279. [11:39:15.758] - Flash config crc: b'4fb1fe70'

  280. [11:39:15.759] - Clock config crc: b'0b34ef89'

  281. [11:39:15.759] - Image Offset:0x1000

  282. [11:39:15.762] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  283. [11:39:15.764] - Encrypt efuse data

  284. [11:39:15.767] - Image Offset:0x1000

  285. [11:39:15.767] - Bootheader config crc: b'f9cf01e0'

  286. [11:39:15.769] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  287. [11:39:15.776] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  288. [11:39:15.810] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  289. Built target combine

  290. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=chip_name COMX=7

  291. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=chip_name -DCPU_ID= -DBOARD=bl616dk

  292. -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  293. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  294. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  295. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  296. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  297. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  298. CMake Error at D:/aithinker_Ai-M6X_SDK/CMakeLists.txt:6 (add_subdirectory):

  299. add_subdirectory given source "drivers/soc/chip_name/std" which is not an

  300. existing directory.

  301. -- Configuring incomplete, errors occurred!

  302. See also "D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/CMakeFiles/CMakeOutput.log".

  303. make: *** [../../project.build:72: build] Error 1

  304. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=chip_name COMX=COM7

  305. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=chip_name -DCPU_ID= -DBOARD=bl616dk

  306. -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  307. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  308. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  309. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  310. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  311. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  312. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  313. CMake Error at D:/aithinker_Ai-M6X_SDK/CMakeLists.txt:6 (add_subdirectory):

  314. add_subdirectory given source "drivers/soc/chip_name/std" which is not an

  315. existing directory.

  316. -- Configuring incomplete, errors occurred!

  317. See also "D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/CMakeFiles/CMakeOutput.log".

  318. make: *** [../../project.build:72: build] Error 1

  319. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7

  320. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  321. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  322. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  323. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  324. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  325. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  326. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  327. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  328. -- Configuring done

  329. -- Generating done

  330. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  331. make -C build -j8

  332. [ 2%] Built target app

  333. [ 5%] Built target mm

  334. [ 10%] Built target utils

  335. [ 53%] Built target std

  336. [ 66%] Built target libc

  337. [ 98%] Built target lhal

  338. [100%] Built target helloworld_bl616.elf

  339. make -C build combine

  340. [11:48:31.748] - bflb firmware post process : V1.2.0

  341. [11:48:31.748] - Chipname: bl616

  342. [11:48:31.748] - Board config dir: ./../../bsp/board/bl616dk/config

  343. [11:48:31.749] - Create partition using partition_cfg_4M.toml

  344. [11:48:31.752] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  345. [11:48:31.752] - Create dts using bl_factory_params_IoTKitA_auto.dts

  346. [11:48:31.757] - 4K header found,append dts file

  347. [11:48:31.758] - Copy boot2_bl616_release_v8.0.8.bin

  348. [11:48:31.760] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  349. [11:48:31.763] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  350. [11:48:31.763] - Create dts using bl_factory_params_IoTKitA_auto.dts

  351. [11:48:31.777] - 4K header found,append dts file

  352. [11:48:31.778] -

  353. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  354. [11:48:31.779] - ========= sp image create =========

  355. [11:48:31.780] - Flash config crc: b'b5fec518'

  356. [11:48:31.780] - Clock config crc: b'4a05f490'

  357. [11:48:31.781] - Image Offset:0x1000

  358. [11:48:31.781] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'

  359. [11:48:31.782] - Encrypt efuse data

  360. [11:48:31.787] - Image Offset:0x1000

  361. [11:48:31.787] - Image hash ignore,not calculate

  362. [11:48:31.788] - Bootheader config crc: b'4ddfb44c'

  363. [11:48:31.789] -

  364. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  365. [11:48:31.790] - ========= sp image create =========

  366. [11:48:31.790] - Flash config crc: b'b5fec518'

  367. [11:48:31.790] - Clock config crc: b'4a05f490'

  368. [11:48:31.790] - Image Offset:0x2000

  369. [11:48:31.791] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  370. [11:48:31.792] - Encrypt efuse data

  371. [11:48:31.797] - Image Offset:0x2000

  372. [11:48:31.798] - Image hash ignore,not calculate

  373. [11:48:31.798] - Bootheader config crc: b'ccbfa125'

  374. [11:48:31.799] -

  375. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  376. [11:48:31.800] - ========= sp image create =========

  377. [11:48:31.801] - Flash config crc: b'4fb1fe70'

  378. [11:48:31.801] - Clock config crc: b'0b34ef89'

  379. [11:48:31.802] - Image Offset:0x1000

  380. [11:48:31.806] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  381. [11:48:31.806] - Encrypt efuse data

  382. [11:48:31.809] - Image Offset:0x1000

  383. [11:48:31.809] - Bootheader config crc: b'f9cf01e0'

  384. [11:48:31.811] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  385. [11:48:31.824] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  386. [11:48:31.850] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  387. Built target combine

  388. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini

  389. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']

  390. [11:48:36.844] - Serial port is COM7

  391. [11:48:36.845] - ==================================================

  392. [11:48:36.856] - Program Start

  393. [11:48:36.856] - ========= eflash loader cmd arguments =========

  394. [11:48:36.893] - serial port is COM7

  395. [11:48:36.894] - chiptype: bl616

  396. [11:48:36.894] - cpu_reset=False

  397. [11:48:36.936] - ========= Interface is uart =========

  398. [11:48:36.937] - Bootrom load

  399. [11:48:36.937] - ========= get_boot_info =========

  400. [11:48:36.938] - ========= image get bootinfo =========

  401. [11:48:37.243] - tx rx and power off, press the machine!

  402. [11:48:37.243] - cutoff time is 0.05

  403. [11:48:37.304] - power on tx and rx

  404. [11:48:38.294] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1

  405. [11:48:38.294] - clean buf

  406. [11:48:38.296] - send sync

  407. [11:48:38.542] - ack is b'000000000000000000000000000000000000000000000000000000f8000080f800008000f8000000f8000000000000f80000f8000000f800f800f8000000000000000000f800f800f8000000000000000000f80000000000f80000f8000000000000000000f800008000000000f800000000000000f8000000f80000008000000000f800f8f800f80000008000000000f80000000080000000f8000000f80000000000000000000000f800f8f80000000000f8000000f80000800000f8000000800000000000f80000000000000000000000000000000000f800f800000000000000f800f8f800008000000000000000f8000000f8780000f800000000000000000000800000000000f80000000000000000f800f878000000000000f80000000000000000f8f88000f800f8000000800000000000000000000000f8000000000000f80000f80000800080000000000000f80078000000000000f800f8f800f80000000080000000000000f8000000000000000000000000808000f800000000f88000000000000000f800000000000000000000f80000000000000000000000000000008000000000000000f80000000000000000000000000000f8f800000000000000000000f800f800f800000000000000f80000000000f80000000000f800780000f8000000000000000000000000f8000000000000f800f80000f800f8f8000000000000f800f8f8f800000000f800f800000000f800f80000000000f800f80000000000000000800000000000f80000800000000000f8000000f8f80000000000f800f8000000'

  408. [11:48:38.543] - reshake

  409. [11:48:38.807] - tx rx and power off, press the machine!

  410. [11:48:38.808] - cutoff time is 0.05

  411. [11:48:38.869] - power on tx and rx

  412. [11:48:39.860] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1

  413. [11:48:39.860] - clean buf

  414. [11:48:39.862] - send sync

  415. [11:48:40.107] - ack is b'000000000000000000000000000000000000800000f8000000f8f8000000000000f80000808000f8f88000007880f8f800f8000000000000f8000000008000f8000000f80000000000000000f800000000f800000000000000000000800000000000000000000000008080000000f80000f800000000f800f8800000f800000000000000f8008000000000808000f80000f8000000000000808000f800f80078000000000000000000f800000078000000f8000000f800f800000080800000000000f8000000f800000000f80000f80000f8000000000000000000f800f80000f800f8f80000000000f800f80000008000f80000000000f8000000f8f800f8000000000000f8f88000f800f800800000f8f8000080f8000000000000f80000f800000000000000000000000000000000000000f8000000f8f8000000000000000000000000f80000007800000000f8000000008000000000f800f800000000000000000000f80000000000f800000000f800000000f8000000f800000000000000000000000000f800f80000000000000000f8000000000000000000f8f80078f80000000000000000f800f800000000000000000080000000f800f8000000f8008000f80000000000000000000000f800f800000000f8000000f80000000000000000f800000000000000000000000000000000f80000000000f8000000000000000000f8000000f80000f8000000f8f80000f8f80000000000000000000080000000000000000000000000008000f8000000f8780000000000000000f80000000000000000800000f80000f8'

  416. [11:48:40.109] - reshake

  417. [11:48:40.386] - tx rx and power off, press the machine!

  418. [11:48:40.386] - cutoff time is 0.05

  419. [11:48:40.446] - power on tx and rx

  420. [11:48:41.437] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1

  421. [11:48:41.437] - clean buf

  422. [11:48:41.438] - send sync

  423. [11:48:41.685] - ack is b'00000000000000000000000000000000000000f8000000000080000000f8000000808000000000000000000078008000000000000000000000f88000000000000000000000f800000000f800f8000000008080f80000f800008000000000f8007800000000000000f800f8008000000000000000000000f8f800f8000000000000000000f8000000000000f8f80000f800000000000000000000f8008000000000f80000000000000000f8800000f80000008000000000f80000f800000000f80080000000000000000000000000000000f8000000000000f80000f8000000000000f800f800000000008000000000f8000000f800800000008000f800f8007880008000000000f80000000000000000f800f80000000000000000000000f80000008000f8f8007800000000f880000000008000000000f8000000800000000000f8f8808000000000008000000000f800000000000000000000000000f8000000f80000f800000000000000780000f8000000000000000000f80000000000000000000000f800f800000000000000000000800000000000f800f800000000000000f80000f800f8000000000000000000000000000000f8f800f80000000000000000f800f80000f800000000000000000080f800000000f80000000000f8f800000000000000000000000000000000f800f8000000000000f800f80000000000000000000000000000f8000000000000f800f8f800788080f80000f80000000000f8f8000000008080008000000000000000000000780000f88000f80000000080f800000000f8000000000000f80000'

  424. [11:48:41.687] - reshake

  425. [11:48:41.688] - shake hand fail

  426. [11:48:41.688] - ########################################################################

  427. [11:48:41.688] - Please troubleshoot according to the following descriptions:

  428. [11:48:41.689] - Is the Boot pin pulled up to the board's own 3.3V rather than an external 3.3V

  429. [11:48:41.689] - Is UART RX connected to the TX pin of the USB-to-serial adapter

  430. [11:48:41.690] - Before flashing with the flashing tool, was the chip reset via Reset/Chip_En while the Boot pin was held high

  431. [11:48:41.690] - Is the COM port selected in the flashing tool the serial port connected to the chip

  432. [11:48:41.690] - Is the baud rate selected in the flashing tool supported by the USB-to-serial adapter

  433. [11:48:41.691] - Is the 3.3V power supply normal

  434. [11:48:41.691] - Is the board's supply current normal (in flash mode, the chip draws 5-7mA)

  435. [11:48:41.691] - ########################################################################

  436. [11:48:41.692] - shake hand fail

  437. [11:48:41.692] - ========= ChipID: =========

  438. [11:48:41.693] - Get bootinfo time cost(ms): 4754.581298828125

  439. [11:48:41.693] -

  440. [11:48:41.693] - Burn Retry

  441. [11:48:41.694] - Burn return with retry fail

  442. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7

  443. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  444. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  445. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  446. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  447. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  448. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  449. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  450. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  451. -- Configuring done

  452. -- Generating done

  453. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  454. make -C build -j8

  455. [ 3%] Built target mm

  456. [ 5%] Built target app

  457. [ 19%] Built target std

  458. [ 24%] Built target utils

  459. [ 72%] Built target libc

  460. [ 98%] Built target lhal

  461. [100%] Built target helloworld_bl616.elf

  462. make -C build combine

  463. [11:49:08.789] - bflb firmware post process : V1.2.0

  464. [11:49:08.789] - Chipname: bl616

  465. [11:49:08.790] - Board config dir: ./../../bsp/board/bl616dk/config

  466. [11:49:08.790] - Create partition using partition_cfg_4M.toml

  467. [11:49:08.794] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  468. [11:49:08.794] - Create dts using bl_factory_params_IoTKitA_auto.dts

  469. [11:49:08.800] - 4K header found,append dts file

  470. [11:49:08.802] - Copy boot2_bl616_release_v8.0.8.bin

  471. [11:49:08.804] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  472. [11:49:08.806] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  473. [11:49:08.806] - Create dts using bl_factory_params_IoTKitA_auto.dts

  474. [11:49:08.816] - 4K header found,append dts file

  475. [11:49:08.818] -

  476. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  477. [11:49:08.820] - ========= sp image create =========

  478. [11:49:08.820] - Flash config crc: b'b5fec518'

  479. [11:49:08.821] - Clock config crc: b'4a05f490'

  480. [11:49:08.821] - Image Offset:0x1000

  481. [11:49:08.821] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'

  482. [11:49:08.822] - Encrypt efuse data

  483. [11:49:08.827] - Image Offset:0x1000

  484. [11:49:08.827] - Image hash ignore,not calculate

  485. [11:49:08.827] - Bootheader config crc: b'4ddfb44c'

  486. [11:49:08.828] -

  487. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  488. [11:49:08.829] - ========= sp image create =========

  489. [11:49:08.829] - Flash config crc: b'b5fec518'

  490. [11:49:08.830] - Clock config crc: b'4a05f490'

  491. [11:49:08.830] - Image Offset:0x2000

  492. [11:49:08.830] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  493. [11:49:08.831] - Encrypt efuse data

  494. [11:49:08.832] - Image Offset:0x2000

  495. [11:49:08.832] - Image hash ignore,not calculate

  496. [11:49:08.833] - Bootheader config crc: b'ccbfa125'

  497. [11:49:08.834] -

  498. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  499. [11:49:08.836] - ========= sp image create =========

  500. [11:49:08.838] - Flash config crc: b'4fb1fe70'

  501. [11:49:08.838] - Clock config crc: b'0b34ef89'

  502. [11:49:08.838] - Image Offset:0x1000

  503. [11:49:08.842] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  504. [11:49:08.843] - Encrypt efuse data

  505. [11:49:08.845] - Image Offset:0x1000

  506. [11:49:08.845] - Bootheader config crc: b'f9cf01e0'

  507. [11:49:08.846] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  508. [11:49:08.854] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  509. [11:49:08.880] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  510. Built target combine

  511. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini

  512. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']

  513. [11:49:11.283] - Serial port is COM7

  514. [11:49:11.283] - ==================================================

  515. [11:49:11.288] - Program Start

  516. [11:49:11.289] - ========= eflash loader cmd arguments =========

  517. [11:49:11.290] - serial port is COM7

  518. [11:49:11.291] - chiptype: bl616

  519. [11:49:11.291] - cpu_reset=False

  520. [11:49:11.324] - ========= Interface is uart =========

  521. [11:49:11.324] - Bootrom load

  522. [11:49:11.325] - ========= get_boot_info =========

  523. [11:49:11.325] - ========= image get bootinfo =========

  524. [11:49:11.596] - tx rx and power off, press the machine!

  525. [11:49:11.596] - cutoff time is 0.05

  526. [11:49:11.658] - power on tx and rx

  527. [11:49:12.646] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1

  528. [11:49:12.646] - clean buf

  529. [11:49:12.648] - send sync

  530. [11:49:12.895] - ack is b'4f4b464c0201'

  531. [11:49:12.940] - shake hand success

  532. [11:49:13.453] - data read is b'010016060000010027128901cd002bcf0eb49a000f758010'

  533. [11:49:13.454] - ========= ChipID: b40ecf2b00cd =========

  534. [11:49:13.454] - Get bootinfo time cost(ms): 2129.41015625

  535. [11:49:13.455] - change bdrate: 2000000

  536. [11:49:13.455] - Clock PLL set

  537. [11:49:13.457] - Set clock time cost(ms): 2.024169921875

  538. [11:49:13.590] - Read mac addr

  539. [11:49:13.592] - flash set para

  540. [11:49:13.593] - get flash pin cfg from bootinfo: 0x24

  541. [11:49:13.593] - set flash cfg: 14124

  542. [11:49:13.594] - Set flash config

  543. [11:49:13.597] - Set para time cost(ms): 3.026123046875

  544. [11:49:13.597] - ========= flash read jedec ID =========

  545. [11:49:13.600] - Read flash jedec ID

  546. [11:49:13.600] - readdata:

  547. [11:49:13.600] - b'5e401700'

  548. [11:49:13.601] - Finished

  549. [11:49:13.650] - Program operation

  550. [11:49:13.651] - Dealing Index 0

  551. [11:49:13.651] - ========= programming D:\aithinker_Ai-M6X_SDK\examples\helloworld.\build\build_out\helloworld_bl616.bin to 0x000000

  552. [11:49:13.658] - flash para file: D:\aithinker_Ai-M6X_SDK\tools\bflb_tools\bouffalo_flash_cube\chips/bl616/efuse_bootheader/flash_para.bin

  553. [11:49:13.658] - Set flash config

  554. [11:49:13.663] - Set para time cost(ms): 3.029052734375

  555. [11:49:13.663] - ========= flash load =========

  556. [11:49:13.663] - ========= flash erase =========

  557. [11:49:13.663] - Erase flash from 0x0 to 0x97bf

  558. [11:49:13.995] - Erase time cost(ms): 331.152099609375

  559. [11:49:14.011] - Load 2048/38848

  560. [11:49:14.027] - Load 4096/38848

  561. [11:49:14.042] - Load 6144/38848

  562. [11:49:14.058] - Load 8192/38848

  563. [11:49:14.074] - Load 10240/38848

  564. [11:49:14.090] - Load 12288/38848

  565. [11:49:14.106] - Load 14336/38848

  566. [11:49:14.121] - Load 16384/38848

  567. [11:49:14.137] - Load 18432/38848

  568. [11:49:14.154] - Load 20480/38848

  569. [11:49:14.170] - Load 22528/38848

  570. [11:49:14.186] - Load 24576/38848

  571. [11:49:14.201] - Load 26624/38848

  572. [11:49:14.217] - Load 28672/38848

  573. [11:49:14.233] - Load 30720/38848

  574. [11:49:14.249] - Load 32768/38848

  575. [11:49:14.265] - Load 34816/38848

  576. [11:49:14.281] - Load 36864/38848

  577. [11:49:14.297] - Load 38848/38848

  578. [11:49:14.297] - Load 38848/38848

  579. [11:49:14.298] - Write check

  580. [11:49:14.303] - Finished

  581. [11:49:14.305] - Sha caled by host: 7171533906de5fe3105f361076760193fd10af4d33c58620dd70dcc5a05d515f

  582. [11:49:14.305] - xip mode Verify

  583. [11:49:14.342] - Read Sha256/38848

  584. [11:49:14.342] - Flash xip readsha time cost(ms): 33.947265625

  585. [11:49:14.342] - Finished

  586. [11:49:14.345] - Sha caled by dev: 7171533906de5fe3105f361076760193fd10af4d33c58620dd70dcc5a05d515f

  587. [11:49:14.345] - Verify success

  588. [11:49:14.347] - Program Finished

  589. [11:49:14.347] - All time cost(ms): 3059.04150390625

  590. [11:49:14.454] - close interface

  591. [11:49:14.455] - [All Success]

  592. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make CHIP=bl616 BOARD=bl616dk

  593. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=/dev/ttyUSB0 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  594. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  595. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  596. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  597. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  598. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  599. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  600. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  601. -- Configuring done

  602. -- Generating done

  603. CMake Warning:

  604. Manually-specified variables were not used by the project:

  605. CONFIG_COMX

  606. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  607. make -C build -j8

  608. [ 0%] Building C object CMakeFiles/app.dir/D_/aithinker_Ai-M6X_SDK/bsp/board/bl616dk/board.c.obj

  609. [ 5%] Built target utils

  610. [ 8%] Built target mm

  611. [ 22%] Built target std

  612. [ 90%] Built target lhal

  613. [ 96%] Built target libc

  614. [ 97%] Linking C static library build_out\lib\libapp.a

  615. [ 98%] Built target app

  616. [ 99%] Linking C executable build_out\helloworld_bl616.elf

  617. Generate D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/build_out/helloworld_bl616.bin

  618. [100%] Built target helloworld_bl616.elf

  619. make -C build combine

  620. [11:53:00.097] - bflb firmware post process : V1.2.0

  621. [11:53:00.098] - Chipname: bl616

  622. [11:53:00.098] - Board config dir: ./../../bsp/board/bl616dk/config

  623. [11:53:00.098] - Create partition using partition_cfg_4M.toml

  624. [11:53:00.101] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  625. [11:53:00.102] - Create dts using bl_factory_params_IoTKitA_auto.dts

  626. [11:53:00.108] - 4K header found,append dts file

  627. [11:53:00.109] - Copy boot2_bl616_release_v8.0.8.bin

  628. [11:53:00.110] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  629. [11:53:00.112] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  630. [11:53:00.112] - Create dts using bl_factory_params_IoTKitA_auto.dts

  631. [11:53:00.121] - 4K header found,append dts file

  632. [11:53:00.122] -

  633. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  634. [11:53:00.166] - ========= sp image create =========

  635. [11:53:00.167] - Flash config crc: b'b5fec518'

  636. [11:53:00.167] - Clock config crc: b'4a05f490'

  637. [11:53:00.167] - Image Offset:0x1000

  638. [11:53:00.168] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'

  639. [11:53:00.169] - Encrypt efuse data

  640. [11:53:00.172] - Image Offset:0x1000

  641. [11:53:00.173] - Image hash ignore,not calculate

  642. [11:53:00.173] - Bootheader config crc: b'4ddfb44c'

  643. [11:53:00.174] -

  644. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  645. [11:53:00.175] - ========= sp image create =========

  646. [11:53:00.176] - Flash config crc: b'b5fec518'

  647. [11:53:00.176] - Clock config crc: b'4a05f490'

  648. [11:53:00.177] - Image Offset:0x2000

  649. [11:53:00.177] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  650. [11:53:00.178] - Encrypt efuse data

  651. [11:53:00.180] - Image Offset:0x2000

  652. [11:53:00.180] - Image hash ignore,not calculate

  653. [11:53:00.181] - Bootheader config crc: b'ccbfa125'

  654. [11:53:00.182] -

  655. [11:53:00.184] - ========= sp image create =========

  656. [11:53:00.185] - Flash config crc: b'4fb1fe70'

  657. [11:53:00.185] - Clock config crc: b'0b34ef89'

  658. [11:53:00.186] - Image Offset:0x1000

  659. [11:53:00.190] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  660. [11:53:00.191] - Encrypt efuse data

  661. [11:53:00.193] - Image Offset:0x1000

  662. [11:53:00.193] - Bootheader config crc: b'f9cf01e0'

  663. [11:53:00.195] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  664. [11:53:00.205] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  665. [11:53:00.233] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  666. Built target combine

  667. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7

  668. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  669. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  670. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  671. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  672. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  673. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  674. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  675. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  676. -- Configuring done

  677. -- Generating done

  678. CMake Warning:

  679. Manually-specified variables were not used by the project:

  680. CONFIG_COMX

  681. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  682. make -C build -j8

  683. [ 2%] Built target app

  684. [ 10%] Built target utils[ 10%] Built target mm

  685. [ 24%] Built target std

  686. [ 66%] Built target libc

  687. [ 98%] Built target lhal

  688. [100%] Built target helloworld_bl616.elf

  689. make -C build combine

  690. [11:53:14.194] - bflb firmware post process : V1.2.0

  691. [11:53:14.195] - Chipname: bl616

  692. [11:53:14.195] - Board config dir: ./../../bsp/board/bl616dk/config

  693. [11:53:14.195] - Create partition using partition_cfg_4M.toml

  694. [11:53:14.199] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  695. [11:53:14.199] - Create dts using bl_factory_params_IoTKitA_auto.dts

  696. [11:53:14.204] - 4K header found,append dts file

  697. [11:53:14.205] - Copy boot2_bl616_release_v8.0.8.bin

  698. [11:53:14.206] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  699. [11:53:14.208] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  700. [11:53:14.209] - Create dts using bl_factory_params_IoTKitA_auto.dts

  701. [11:53:14.221] - 4K header found,append dts file

  702. [11:53:14.222] -

  703. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  704. [11:53:14.223] - ========= sp image create =========

  705. [11:53:14.223] - Flash config crc: b'b5fec518'

  706. [11:53:14.223] - Clock config crc: b'4a05f490'

  707. [11:53:14.224] - Image Offset:0x1000

  708. [11:53:14.224] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'

  709. [11:53:14.225] - Encrypt efuse data

  710. [11:53:14.231] - Image Offset:0x1000

  711. [11:53:14.232] - Image hash ignore,not calculate

  712. [11:53:14.233] - Bootheader config crc: b'4ddfb44c'

  713. [11:53:14.234] -

  714. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  715. [11:53:14.235] - ========= sp image create =========

  716. [11:53:14.235] - Flash config crc: b'b5fec518'

  717. [11:53:14.236] - Clock config crc: b'4a05f490'

  718. [11:53:14.236] - Image Offset:0x2000

  719. [11:53:14.236] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  720. [11:53:14.237] - Encrypt efuse data

  721. [11:53:14.238] - Image Offset:0x2000

  722. [11:53:14.238] - Image hash ignore,not calculate

  723. [11:53:14.239] - Bootheader config crc: b'ccbfa125'

  724. [11:53:14.239] -

  725. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  726. [11:53:14.240] - ========= sp image create =========

  727. [11:53:14.242] - Flash config crc: b'4fb1fe70'

  728. [11:53:14.242] - Clock config crc: b'0b34ef89'

  729. [11:53:14.243] - Image Offset:0x1000

  730. [11:53:14.248] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  731. [11:53:14.249] - Encrypt efuse data

  732. [11:53:14.252] - Image Offset:0x1000

  733. [11:53:14.252] - Bootheader config crc: b'f9cf01e0'

  734. [11:53:14.253] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  735. [11:53:14.266] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  736. [11:53:14.296] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  737. Built target combine

  738. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini

  739. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']

  740. [11:53:16.793] - Serial port is COM7

  741. [11:53:16.793] - ==================================================

  742. [11:53:16.796] - Program Start

  743. [11:53:16.796] - ========= eflash loader cmd arguments =========

  744. [11:53:16.798] - serial port is COM7

  745. [11:53:16.798] - chiptype: bl616

  746. [11:53:16.798] - cpu_reset=False

  747. [11:53:16.827] - ========= Interface is uart =========

  748. [11:53:16.828] - Bootrom load

  749. [11:53:16.828] - ========= get_boot_info =========

  750. [11:53:16.828] - ========= image get bootinfo =========

  751. [11:53:16.829] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)

  752. [11:53:17.834] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)

  753. [11:53:18.839] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)

  754. [11:53:19.845] - Error: 'NoneType' object has no attribute 'timeout'

  755. [11:53:19.845] - shake hand fail

  756. [11:53:19.846] - ########################################################################

  757. [11:53:19.846] - Please troubleshoot according to the following descriptions:

  758. [11:53:19.847] - Is the Boot pin pulled up to the board's own 3.3V rather than an external 3.3V

  759. [11:53:19.847] - Is UART RX connected to the TX pin of the USB-to-serial adapter

  760. [11:53:19.847] - Before flashing with the flashing tool, was the chip reset via Reset/Chip_En while the Boot pin was held high

  761. [11:53:19.847] - Is the COM port selected in the flashing tool the serial port connected to the chip

  762. [11:53:19.848] - Is the baud rate selected in the flashing tool supported by the USB-to-serial adapter

  763. [11:53:19.848] - Is the 3.3V power supply normal

  764. [11:53:19.849] - Is the board's supply current normal (in flash mode, the chip draws 5-7mA)

  765. [11:53:19.849] - ########################################################################

  766. [11:53:19.849] - shake hand fail

  767. [11:53:19.850] - ========= ChipID: =========

  768. [11:53:19.850] - Get bootinfo time cost(ms): 3022.7861328125

  769. [11:53:19.850] -

  770. [11:53:19.851] - Burn Retry

  771. [11:53:19.851] - Burn return with retry fail

  772. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7

  773. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y

  774. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc

  775. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm

  776. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils

  777. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  778. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  779. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal

  780. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std

  781. -- Configuring done

  782. -- Generating done

  783. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build

  784. make -C build -j8

  785. [ 3%] Built target mm

  786. [ 5%] Built target app

  787. [ 10%] Built target utils

  788. [ 24%] Built target std

  789. [ 66%] Built target libc

  790. [ 98%] Built target lhal

  791. [100%] Built target helloworld_bl616.elf

  792. make -C build combine

  793. [11:53:38.015] - bflb firmware post process : V1.2.0

  794. [11:53:38.015] - Chipname: bl616

  795. [11:53:38.016] - Board config dir: ./../../bsp/board/bl616dk/config

  796. [11:53:38.016] - Create partition using partition_cfg_4M.toml

  797. [11:53:38.020] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  798. [11:53:38.021] - Create dts using bl_factory_params_IoTKitA_auto.dts

  799. [11:53:38.029] - 4K header found,append dts file

  800. [11:53:38.031] - Copy boot2_bl616_release_v8.0.8.bin

  801. [11:53:38.032] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin

  802. [11:53:38.034] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  803. [11:53:38.035] - Create dts using bl_factory_params_IoTKitA_auto.dts

  804. [11:53:38.047] - 4K header found,append dts file

  805. [11:53:38.048] -

  806. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin

  807. [11:53:38.049] - ========= sp image create =========

  808. [11:53:38.049] - Flash config crc: b'b5fec518'

  809. [11:53:38.050] - Clock config crc: b'4a05f490'

  810. [11:53:38.050] - Image Offset:0x1000

  811. [11:53:38.051] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'

  812. [11:53:38.051] - Encrypt efuse data

  813. [11:53:38.056] - Image Offset:0x1000

  814. [11:53:38.057] - Image hash ignore,not calculate

  815. [11:53:38.058] - Bootheader config crc: b'4ddfb44c'

  816. [11:53:38.059] -

  817. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin

  818. [11:53:38.061] - ========= sp image create =========

  819. [11:53:38.061] - Flash config crc: b'b5fec518'

  820. [11:53:38.062] - Clock config crc: b'4a05f490'

  821. [11:53:38.062] - Image Offset:0x2000

  822. [11:53:38.063] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'

  823. [11:53:38.063] - Encrypt efuse data

  824. [11:53:38.064] - Image Offset:0x2000

  825. [11:53:38.065] - Image hash ignore,not calculate

  826. [11:53:38.065] - Bootheader config crc: b'ccbfa125'

  827. [11:53:38.066] -

  828. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin

  829. [11:53:38.067] - ========= sp image create =========

  830. [11:53:38.069] - Flash config crc: b'4fb1fe70'

  831. [11:53:38.070] - Clock config crc: b'0b34ef89'

  832. [11:53:38.070] - Image Offset:0x1000

  833. [11:53:38.073] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'

  834. [11:53:38.074] - Encrypt efuse data

  835. [11:53:38.076] - Image Offset:0x1000

  836. [11:53:38.077] - Bootheader config crc: b'f9cf01e0'

  837. [11:53:38.079] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota

  838. [11:53:38.086] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz

  839. [11:53:38.115] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota

  840. Built target combine

  841. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini

  842. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']

  843. [11:53:40.859] - Serial port is COM7

  844. [11:53:40.859] - ==================================================

  845. [11:53:40.862] - Program Start

  846. [11:53:40.863] - ========= eflash loader cmd arguments =========

  847. [11:53:40.863] - serial port is COM7

  848. [11:53:40.864] - chiptype: bl616

  849. [11:53:40.864] - cpu_reset=False

  850. [11:53:40.893] - ========= Interface is uart =========

  851. [11:53:40.894] - Bootrom load

  852. [11:53:40.894] - ========= get_boot_info =========

  853. [11:53:40.894] - ========= image get bootinfo =========

  854. [11:53:41.173] - tx rx and power off, press the machine!

  855. [11:53:41.174] - cutoff time is 0.05

  856. [11:53:41.235] - power on tx and rx

  857. [11:53:42.224] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1

  858. [11:53:42.224] - clean buf

  859. [11:53:42.226] - send sync

  860. [11:53:42.472] - ack is b'4f4b464c0201'

  861. [11:53:42.518] - shake hand success

  862. [11:53:43.031] - data read is b'010016060000010027128901cd002bcf0eb49a000f758010'

  863. [11:53:43.032] - ========= ChipID: b40ecf2b00cd =========

  864. [11:53:43.032] - Get bootinfo time cost(ms): 2137.283203125

  865. [11:53:43.032] - change bdrate: 2000000

  866. [11:53:43.033] - Clock PLL set

  867. [11:53:43.035] - Set clock time cost(ms): 2.0234375

  868. [11:53:43.168] - Read mac addr

  869. [11:53:43.170] - flash set para

  870. [11:53:43.171] - get flash pin cfg from bootinfo: 0x24

  871. [11:53:43.171] - set flash cfg: 14124

  872. [11:53:43.171] - Set flash config

  873. [11:53:43.175] - Set para time cost(ms): 3.026611328125

  874. [11:53:43.175] - ========= flash read jedec ID =========

  875. [11:53:43.178] - Read flash jedec ID

  876. [11:53:43.178] - readdata:

  877. [11:53:43.178] - b'5e401700'

  878. [11:53:43.179] - Finished

  879. [11:53:43.186] - Program operation

  880. [11:53:43.186] - Dealing Index 0

  881. [11:53:43.187] - ========= programming D:\aithinker_Ai-M6X_SDK\examples\helloworld.\build\build_out\helloworld_bl616.bin to 0x000000

  882. [11:53:43.191] - flash para file: D:\aithinker_Ai-M6X_SDK\tools\bflb_tools\bouffalo_flash_cube\chips/bl616/efuse_bootheader/flash_para.bin

  883. [11:53:43.192] - Set flash config

  884. [11:53:43.197] - Set para time cost(ms): 3.953125

  885. [11:53:43.197] - ========= flash load =========

  886. [11:53:43.198] - ========= flash erase =========

  887. [11:53:43.199] - Erase flash from 0x0 to 0x97bf

  888. [11:53:43.504] - Erase time cost(ms): 305.228271484375

  889. [11:53:43.521] - Load 2048/38848

  890. [11:53:43.537] - Load 4096/38848

  891. [11:53:43.553] - Load 6144/38848

  892. [11:53:43.568] - Load 8192/38848

  893. [11:53:43.585] - Load 10240/38848

  894. [11:53:43.601] - Load 12288/38848

  895. [11:53:43.617] - Load 14336/38848

  896. [11:53:43.633] - Load 16384/38848

  897. [11:53:43.649] - Load 18432/38848

  898. [11:53:43.665] - Load 20480/38848

  899. [11:53:43.681] - Load 22528/38848

  900. [11:53:43.698] - Load 24576/38848

  901. [11:53:43.713] - Load 26624/38848

  902. [11:53:43.730] - Load 28672/38848

  903. [11:53:43.746] - Load 30720/38848

  904. [11:53:43.763] - Load 32768/38848

  905. [11:53:43.779] - Load 34816/38848

  906. [11:53:43.795] - Load 36864/38848

  907. [11:53:43.811] - Load 38848/38848

  908. [11:53:43.811] - Load 38848/38848

  909. [11:53:43.811] - Write check

  910. [11:53:43.817] - Flash load time cost(ms): 311.7744140625

  911. [11:53:43.817] - Finished

  912. [11:53:43.818] - Sha caled by host: a2b398b591cd49f1daadc5164f1915af270289a080d32b3ae2025e29ebd31076

  913. [11:53:43.819] - xip mode Verify

  914. [11:53:43.855] - Read Sha256/38848

  915. [11:53:43.856] - Flash xip readsha time cost(ms): 34.873779296875

  916. [11:53:43.856] - Finished

  917. [11:53:43.858] - Sha caled by dev: a2b398b591cd49f1daadc5164f1915af270289a080d32b3ae2025e29ebd31076

  918. [11:53:43.858] - Verify success

  919. [11:53:43.859] - Program Finished

  920. [11:53:43.859] - All time cost(ms): 2997.5947265625

  921. [11:53:43.971] - close interface

  922. [11:53:43.972] - [All Success]

Finally, compilation and flashing succeeded.

make flash CHIP=bl616 COMX=COM7

Here are a few points to note:1. CHIP: corresponds to the CPU2. COMX: must match what you see in Device Manager3. When flashing, you need to press the BOOT button - the button on the right when the Type-C port faces downward.

Have questions?

For other questions, please visit the unified discussion area: Ai-Thinker Discussions

Released under the MIT License. Build Time 2026-09-11 14:52:23