【Ai-M61-32S-Kit 示例】之 hello word

[复制链接]
查看613 | 回复4 | 2023-11-21 14:04:47 | 显示全部楼层 |阅读模式
本帖最后由 WT_0213 于 2023-11-21 14:18 编辑

这里对一些例程运行过程中遇到的问题及处理方法介绍。到这里默认环境已经配置完善。
屏幕截图 2023-11-21 120020.png
在 hello word 项目右键,在集成终端中打开


屏幕截图 2023-11-21 133720.png


右侧出现终端窗口
屏幕截图 2023-11-21 134405.png

输入make 回车,等待编译完成。
  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
复制代码
编译的话如果环境配置的没问题基本上这里都能过。
然后看了一下README.md
  1. # helloworld


  2. ## Support CHIP

  3. |      CHIP        | Remark |
  4. |:----------------:|:------:|
  5. |BL602/BL604       |        |
  6. |BL702/BL704/BL706 |        |
  7. |BL616/BL618       |        |
  8. |BL808             |        |

  9. ## Compile

  10. - BL602/BL604

  11. ```
  12. make CHIP=bl602 BOARD=bl602dk
  13. ```

  14. - BL702/BL704/BL706

  15. ```
  16. make CHIP=bl702 BOARD=bl702dk
  17. ```

  18. - BL616/BL618

  19. ```
  20. make CHIP=bl616 BOARD=bl616dk
  21. ```

  22. - BL808

  23. ```
  24. make CHIP=bl808 BOARD=bl808dk CPU_ID=m0
  25. make CHIP=bl808 BOARD=bl808dk CPU_ID=d0
  26. ```

  27. ## Flash

  28. ```
  29. make flash CHIP=chip_name COMX=xxx # xxx is your com name
  30. ```
复制代码
感觉刚刚编译的时候好像少了点什么。
原来是 CHIP=bl616 BOARD=bl616dk
重新执行 make CHIP=bl616 BOARD=bl616dk 编译指定的bin
  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make CHIP=bl616 BOARD=bl616dk
  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. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  4. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  5. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  6. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  7. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  8. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  9. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  10. -- Configuring done
  11. -- Generating done
  12. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  13. make -C build -j8
  14. [  2%] Built target app
  15. [ 16%] Built target std
  16. [ 53%] Built target lhal[ 53%]
  17. Built target utils
  18. [ 56%] Built target mm
  19. [ 98%] Built target libc
  20. [100%] Built target helloworld_bl616.elf
  21. make -C build combine
  22. [11:39:15.700] - bflb firmware post process : V1.2.0
  23. [11:39:15.701] - Chipname: bl616
  24. [11:39:15.701] - Board config dir: ./../../bsp/board/bl616dk/config
  25. [11:39:15.701] - Create partition using partition_cfg_4M.toml
  26. [11:39:15.709] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  27. [11:39:15.709] - Create dts using bl_factory_params_IoTKitA_auto.dts
  28. [11:39:15.717] - 4K header found,append dts file
  29. [11:39:15.718] - Copy boot2_bl616_release_v8.0.8.bin
  30. [11:39:15.719] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  31. [11:39:15.721] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  32. [11:39:15.722] - Create dts using bl_factory_params_IoTKitA_auto.dts
  33. [11:39:15.735] - 4K header found,append dts file
  34. [11:39:15.736] -
  35. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  36. [11:39:15.738] - ========= sp image create =========
  37. [11:39:15.739] - Flash config crc: b'b5fec518'
  38. [11:39:15.739] - Clock config crc: b'4a05f490'
  39. [11:39:15.739] - Image Offset:0x1000
  40. [11:39:15.740] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'
  41. [11:39:15.741] - Encrypt efuse data
  42. [11:39:15.744] - Image Offset:0x1000
  43. [11:39:15.745] - Image hash ignore,not calculate
  44. [11:39:15.745] - Bootheader config crc: b'4ddfb44c'
  45. [11:39:15.747] -
  46. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  47. [11:39:15.750] - ========= sp image create =========
  48. [11:39:15.750] - Flash config crc: b'b5fec518'
  49. [11:39:15.751] - Clock config crc: b'4a05f490'
  50. [11:39:15.751] - Image Offset:0x2000
  51. [11:39:15.752] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  52. [11:39:15.752] - Encrypt efuse data
  53. [11:39:15.754] - Image Offset:0x2000
  54. [11:39:15.754] - Image hash ignore,not calculate
  55. [11:39:15.755] - Bootheader config crc: b'ccbfa125'
  56. [11:39:15.756] -
  57. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  58. [11:39:15.758] - Flash config crc: b'4fb1fe70'
  59. [11:39:15.759] - Clock config crc: b'0b34ef89'
  60. [11:39:15.759] - Image Offset:0x1000
  61. [11:39:15.762] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  62. [11:39:15.764] - Encrypt efuse data
  63. [11:39:15.767] - Image Offset:0x1000
  64. [11:39:15.767] - Bootheader config crc: b'f9cf01e0'
  65. [11:39:15.769] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  66. [11:39:15.776] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  67. [11:39:15.810] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  68. Built target combine
复制代码
不出所料很顺利编译完成。
下一步就是烧写固件到Ai-M61-32S-Kit。
README.md 提示使用 make flash CHIP=chip_name COMX=xxx # xxx is your com name命令烧写。
  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=chip_name COMX=7
  2. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=chip_name -DCPU_ID= -DBOARD=bl616dk
  3. -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
  4. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  5. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  6. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  7. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  8. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  9. CMake Error at D:/aithinker_Ai-M6X_SDK/CMakeLists.txt:6 (add_subdirectory):
  10.   add_subdirectory given source "drivers/soc/chip_name/std" which is not an
  11.   existing directory.


  12. -- Configuring incomplete, errors occurred!
  13. See also "D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/CMakeFiles/CMakeOutput.log".
  14. make: *** [../../project.build:72: build] Error 1
复制代码
失败了呢,为什么呢?好奇怪。然后把7 改成了COM7,这里需要看电脑对应的com口。
屏幕截图 2023-11-21 135440.png
鼠标右键,此电脑,管理
屏幕截图 2023-11-21 135534.png

设备管理器,端口,可以查看。
然后执行命令 make flash CHIP=chip_name COMX=COM7
  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=chip_name COMX=COM7
  2. ./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=chip_name -DCPU_ID= -DBOARD=bl616dk
  3. -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
  4. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  5. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  6. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  7. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  8. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  9. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  10. CMake Error at D:/aithinker_Ai-M6X_SDK/CMakeLists.txt:6 (add_subdirectory):
  11.   add_subdirectory given source "drivers/soc/chip_name/std" which is not an
  12.   existing directory.


  13. -- Configuring incomplete, errors occurred!
  14. See also "D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/CMakeFiles/CMakeOutput.log".
  15. make: *** [../../project.build:72: build] Error 1
复制代码
又失败了。
make flash CHIP=chip_name COMX=COM7

然后看了一下命令 感觉 chip_name 有猫腻。
将命令改成 make flash CHIP=bl616 COMX=COM7
  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7
  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=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
  3. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  4. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  5. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  6. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  7. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  8. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  9. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  10. -- Configuring done
  11. -- Generating done
  12. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  13. make -C build -j8
  14. [  2%] Built target app
  15. [  5%] Built target mm
  16. [ 10%] Built target utils
  17. [ 53%] Built target std
  18. [ 66%] Built target libc
  19. [ 98%] Built target lhal
  20. [100%] Built target helloworld_bl616.elf
  21. make -C build combine
  22. [11:48:31.748] - bflb firmware post process : V1.2.0
  23. [11:48:31.748] - Chipname: bl616
  24. [11:48:31.748] - Board config dir: ./../../bsp/board/bl616dk/config
  25. [11:48:31.749] - Create partition using partition_cfg_4M.toml
  26. [11:48:31.752] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  27. [11:48:31.752] - Create dts using bl_factory_params_IoTKitA_auto.dts
  28. [11:48:31.757] - 4K header found,append dts file
  29. [11:48:31.758] - Copy boot2_bl616_release_v8.0.8.bin
  30. [11:48:31.760] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  31. [11:48:31.763] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  32. [11:48:31.763] - Create dts using bl_factory_params_IoTKitA_auto.dts
  33. [11:48:31.777] - 4K header found,append dts file
  34. [11:48:31.778] -
  35. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  36. [11:48:31.779] - ========= sp image create =========
  37. [11:48:31.780] - Flash config crc: b'b5fec518'
  38. [11:48:31.780] - Clock config crc: b'4a05f490'
  39. [11:48:31.781] - Image Offset:0x1000
  40. [11:48:31.781] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'
  41. [11:48:31.782] - Encrypt efuse data
  42. [11:48:31.787] - Image Offset:0x1000
  43. [11:48:31.787] - Image hash ignore,not calculate
  44. [11:48:31.788] - Bootheader config crc: b'4ddfb44c'
  45. [11:48:31.789] -
  46. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  47. [11:48:31.790] - ========= sp image create =========
  48. [11:48:31.790] - Flash config crc: b'b5fec518'
  49. [11:48:31.790] - Clock config crc: b'4a05f490'
  50. [11:48:31.790] - Image Offset:0x2000
  51. [11:48:31.791] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  52. [11:48:31.792] - Encrypt efuse data
  53. [11:48:31.797] - Image Offset:0x2000
  54. [11:48:31.798] - Image hash ignore,not calculate
  55. [11:48:31.798] - Bootheader config crc: b'ccbfa125'
  56. [11:48:31.799] -
  57. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  58. [11:48:31.800] - ========= sp image create =========
  59. [11:48:31.801] - Flash config crc: b'4fb1fe70'
  60. [11:48:31.801] - Clock config crc: b'0b34ef89'
  61. [11:48:31.802] - Image Offset:0x1000
  62. [11:48:31.806] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  63. [11:48:31.806] - Encrypt efuse data
  64. [11:48:31.809] - Image Offset:0x1000
  65. [11:48:31.809] - Bootheader config crc: b'f9cf01e0'
  66. [11:48:31.811] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  67. [11:48:31.824] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  68. [11:48:31.850] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  69. Built target combine
  70. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
  71. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
  72. [11:48:36.844] - Serial port is COM7
  73. [11:48:36.845] - ==================================================
  74. [11:48:36.856] - Program Start
  75. [11:48:36.856] - ========= eflash loader cmd arguments =========
  76. [11:48:36.893] - serial port is COM7
  77. [11:48:36.894] - chiptype: bl616
  78. [11:48:36.894] - cpu_reset=False
  79. [11:48:36.936] - ========= Interface is uart =========
  80. [11:48:36.937] - Bootrom load
  81. [11:48:36.937] - ========= get_boot_info =========
  82. [11:48:36.938] - ========= image get bootinfo =========
  83. [11:48:37.243] - tx rx and power off, press the machine!
  84. [11:48:37.243] - cutoff time is 0.05
  85. [11:48:37.304] - power on tx and rx
  86. [11:48:38.294] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
  87. [11:48:38.294] - clean buf
  88. [11:48:38.296] - send sync
  89. [11:48:38.542] - ack is b'000000000000000000000000000000000000000000000000000000f8000080f800008000f8000000f8000000000000f80000f8000000f800f800f8000000000000000000f800f800f8000000000000000000f80000000000f80000f8000000000000000000f800008000000000f800000000000000f8000000f80000008000000000f800f8f800f80000008000000000f80000000080000000f8000000f80000000000000000000000f800f8f80000000000f8000000f80000800000f8000000800000000000f80000000000000000000000000000000000f800f800000000000000f800f8f800008000000000000000f8000000f8780000f800000000000000000000800000000000f80000000000000000f800f878000000000000f80000000000000000f8f88000f800f8000000800000000000000000000000f8000000000000f80000f80000800080000000000000f80078000000000000f800f8f800f80000000080000000000000f8000000000000000000000000808000f800000000f88000000000000000f800000000000000000000f80000000000000000000000000000008000000000000000f80000000000000000000000000000f8f800000000000000000000f800f800f800000000000000f80000000000f80000000000f800780000f8000000000000000000000000f8000000000000f800f80000f800f8f8000000000000f800f8f8f800000000f800f800000000f800f80000000000f800f80000000000000000800000000000f80000800000000000f8000000f8f80000000000f800f8000000'
  90. [11:48:38.543] - reshake
  91. [11:48:38.807] - tx rx and power off, press the machine!
  92. [11:48:38.808] - cutoff time is 0.05
  93. [11:48:38.869] - power on tx and rx
  94. [11:48:39.860] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
  95. [11:48:39.860] - clean buf
  96. [11:48:39.862] - send sync
  97. [11:48:40.107] - ack is b'000000000000000000000000000000000000800000f8000000f8f8000000000000f80000808000f8f88000007880f8f800f8000000000000f8000000008000f8000000f80000000000000000f800000000f800000000000000000000800000000000000000000000008080000000f80000f800000000f800f8800000f800000000000000f8008000000000808000f80000f8000000000000808000f800f80078000000000000000000f800000078000000f8000000f800f800000080800000000000f8000000f800000000f80000f80000f8000000000000000000f800f80000f800f8f80000000000f800f80000008000f80000000000f8000000f8f800f8000000000000f8f88000f800f800800000f8f8000080f8000000000000f80000f800000000000000000000000000000000000000f8000000f8f8000000000000000000000000f80000007800000000f8000000008000000000f800f800000000000000000000f80000000000f800000000f800000000f8000000f800000000000000000000000000f800f80000000000000000f8000000000000000000f8f80078f80000000000000000f800f800000000000000000080000000f800f8000000f8008000f80000000000000000000000f800f800000000f8000000f80000000000000000f800000000000000000000000000000000f80000000000f8000000000000000000f8000000f80000f8000000f8f80000f8f80000000000000000000080000000000000000000000000008000f8000000f8780000000000000000f80000000000000000800000f80000f8'
  98. [11:48:40.109] - reshake
  99. [11:48:40.386] - tx rx and power off, press the machine!
  100. [11:48:40.386] - cutoff time is 0.05
  101. [11:48:40.446] - power on tx and rx
  102. [11:48:41.437] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
  103. [11:48:41.437] - clean buf
  104. [11:48:41.438] - send sync
  105. [11:48:41.685] - ack is b'00000000000000000000000000000000000000f8000000000080000000f8000000808000000000000000000078008000000000000000000000f88000000000000000000000f800000000f800f8000000008080f80000f800008000000000f8007800000000000000f800f8008000000000000000000000f8f800f8000000000000000000f8000000000000f8f80000f800000000000000000000f8008000000000f80000000000000000f8800000f80000008000000000f80000f800000000f80080000000000000000000000000000000f8000000000000f80000f8000000000000f800f800000000008000000000f8000000f800800000008000f800f8007880008000000000f80000000000000000f800f80000000000000000000000f80000008000f8f8007800000000f880000000008000000000f8000000800000000000f8f8808000000000008000000000f800000000000000000000000000f8000000f80000f800000000000000780000f8000000000000000000f80000000000000000000000f800f800000000000000000000800000000000f800f800000000000000f80000f800f8000000000000000000000000000000f8f800f80000000000000000f800f80000f800000000000000000080f800000000f80000000000f8f800000000000000000000000000000000f800f8000000000000f800f80000000000000000000000000000f8000000000000f800f8f800788080f80000f80000000000f8f8000000008080008000000000000000000000780000f88000f80000000080f800000000f8000000000000f80000'
  106. [11:48:41.687] - reshake
  107. [11:48:41.688] - shake hand fail
  108. [11:48:41.688] - ########################################################################
  109. [11:48:41.688] - 请按照以下描述排查问题:
  110. [11:48:41.689] - Boot pin是否上拉到板子自身的3.3V,而不是外部的3.3V
  111. [11:48:41.689] - UART RX是否连接到USB转串口的TX引脚
  112. [11:48:41.690] - 在使用烧录软件进行烧录前,是否在Boot pin拉高的情况下,使用Reset/Chip_En复位了芯片
  113. [11:48:41.690] - 烧录软件所选择的COM口,是否是连接芯片的串口
  114. [11:48:41.690] - 烧录软件上选择的波特率是否是USB转串口支持的波特率
  115. [11:48:41.691] - 3.3V供电是否正常
  116. [11:48:41.691] - 板子供电电流是否正常(烧录模式下,芯片耗电电流5-7mA)
  117. [11:48:41.691] - ########################################################################
  118. [11:48:41.692] - shake hand fail
  119. [11:48:41.692] - ========= ChipID:  =========
  120. [11:48:41.693] - Get bootinfo time cost(ms): 4754.581298828125
  121. [11:48:41.693] - {"ErrorCode": "0050","ErrorMsg":"BFLB IMG LOAD SHAKEHAND FAIL"}
  122. [11:48:41.693] - Burn Retry
  123. [11:48:41.694] - Burn return with retry fail
复制代码
这次差一点就成功了,原因是没有按下烧录按键。
拔掉USB线,然后将Type-c口朝下,右侧按钮按住。插上USB线。松手。重新执行上面的命令。
make flash CHIP=bl616 COMX=COM7

  1. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7
  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=COM7 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
  3. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  4. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  5. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  6. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  7. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  8. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  9. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  10. -- Configuring done
  11. -- Generating done
  12. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  13. make -C build -j8
  14. [  3%] Built target mm
  15. [  5%] Built target app
  16. [ 19%] Built target std
  17. [ 24%] Built target utils
  18. [ 72%] Built target libc
  19. [ 98%] Built target lhal
  20. [100%] Built target helloworld_bl616.elf
  21. make -C build combine
  22. [11:49:08.789] - bflb firmware post process : V1.2.0
  23. [11:49:08.789] - Chipname: bl616
  24. [11:49:08.790] - Board config dir: ./../../bsp/board/bl616dk/config
  25. [11:49:08.790] - Create partition using partition_cfg_4M.toml
  26. [11:49:08.794] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  27. [11:49:08.794] - Create dts using bl_factory_params_IoTKitA_auto.dts
  28. [11:49:08.800] - 4K header found,append dts file
  29. [11:49:08.802] - Copy boot2_bl616_release_v8.0.8.bin
  30. [11:49:08.804] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  31. [11:49:08.806] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  32. [11:49:08.806] - Create dts using bl_factory_params_IoTKitA_auto.dts
  33. [11:49:08.816] - 4K header found,append dts file
  34. [11:49:08.818] -
  35. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  36. [11:49:08.820] - ========= sp image create =========
  37. [11:49:08.820] - Flash config crc: b'b5fec518'
  38. [11:49:08.821] - Clock config crc: b'4a05f490'
  39. [11:49:08.821] - Image Offset:0x1000
  40. [11:49:08.821] - Image hash is b'6ace164cd8c2c3d32acd16bf44324798e2015b118cf716294da9d7115068b52f'
  41. [11:49:08.822] - Encrypt efuse data
  42. [11:49:08.827] - Image Offset:0x1000
  43. [11:49:08.827] - Image hash ignore,not calculate
  44. [11:49:08.827] - Bootheader config crc: b'4ddfb44c'
  45. [11:49:08.828] -
  46. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  47. [11:49:08.829] - ========= sp image create =========
  48. [11:49:08.829] - Flash config crc: b'b5fec518'
  49. [11:49:08.830] - Clock config crc: b'4a05f490'
  50. [11:49:08.830] - Image Offset:0x2000
  51. [11:49:08.830] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  52. [11:49:08.831] - Encrypt efuse data
  53. [11:49:08.832] - Image Offset:0x2000
  54. [11:49:08.832] - Image hash ignore,not calculate
  55. [11:49:08.833] - Bootheader config crc: b'ccbfa125'
  56. [11:49:08.834] -
  57. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  58. [11:49:08.836] - ========= sp image create =========
  59. [11:49:08.838] - Flash config crc: b'4fb1fe70'
  60. [11:49:08.838] - Clock config crc: b'0b34ef89'
  61. [11:49:08.838] - Image Offset:0x1000
  62. [11:49:08.842] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  63. [11:49:08.843] - Encrypt efuse data
  64. [11:49:08.845] - Image Offset:0x1000
  65. [11:49:08.845] - Bootheader config crc: b'f9cf01e0'
  66. [11:49:08.846] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  67. [11:49:08.854] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  68. [11:49:08.880] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  69. Built target combine
  70. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
  71. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
  72. [11:49:11.283] - Serial port is COM7
  73. [11:49:11.283] - ==================================================
  74. [11:49:11.288] - Program Start
  75. [11:49:11.289] - ========= eflash loader cmd arguments =========
  76. [11:49:11.290] - serial port is COM7
  77. [11:49:11.291] - chiptype: bl616
  78. [11:49:11.291] - cpu_reset=False
  79. [11:49:11.324] - ========= Interface is uart =========
  80. [11:49:11.324] - Bootrom load
  81. [11:49:11.325] - ========= get_boot_info =========
  82. [11:49:11.325] - ========= image get bootinfo =========
  83. [11:49:11.596] - tx rx and power off, press the machine!
  84. [11:49:11.596] - cutoff time is 0.05
  85. [11:49:11.658] - power on tx and rx
  86. [11:49:12.646] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
  87. [11:49:12.646] - clean buf
  88. [11:49:12.648] - send sync
  89. [11:49:12.895] - ack is b'4f4b464c0201'
  90. [11:49:12.940] - shake hand success
  91. [11:49:13.453] - data read is b'010016060000010027128901cd002bcf0eb49a000f758010'
  92. [11:49:13.454] - ========= ChipID: b40ecf2b00cd =========
  93. [11:49:13.454] - Get bootinfo time cost(ms): 2129.41015625
  94. [11:49:13.455] - change bdrate: 2000000
  95. [11:49:13.455] - Clock PLL set
  96. [11:49:13.457] - Set clock time cost(ms): 2.024169921875
  97. [11:49:13.590] - Read mac addr
  98. [11:49:13.592] - flash set para
  99. [11:49:13.593] - get flash pin cfg from bootinfo: 0x24
  100. [11:49:13.593] - set flash cfg: 14124
  101. [11:49:13.594] - Set flash config
  102. [11:49:13.597] - Set para time cost(ms): 3.026123046875
  103. [11:49:13.597] - ========= flash read jedec ID =========
  104. [11:49:13.600] - Read flash jedec ID
  105. [11:49:13.600] - readdata:
  106. [11:49:13.600] - b'5e401700'
  107. [11:49:13.601] - Finished
  108. [11:49:13.650] - Program operation
  109. [11:49:13.651] - Dealing Index 0
  110. [11:49:13.651] - ========= programming D:\aithinker_Ai-M6X_SDK\examples\helloworld\.\build\build_out\helloworld_bl616.bin to 0x000000
  111. [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
  112. [11:49:13.658] - Set flash config
  113. [11:49:13.663] - Set para time cost(ms): 3.029052734375
  114. [11:49:13.663] - ========= flash load =========
  115. [11:49:13.663] - ========= flash erase =========
  116. [11:49:13.663] - Erase flash  from 0x0 to 0x97bf
  117. [11:49:13.995] - Erase time cost(ms): 331.152099609375
  118. [11:49:14.011] - Load 2048/38848 {"progress":5}
  119. [11:49:14.027] - Load 4096/38848 {"progress":10}
  120. [11:49:14.042] - Load 6144/38848 {"progress":15}
  121. [11:49:14.058] - Load 8192/38848 {"progress":21}
  122. [11:49:14.074] - Load 10240/38848 {"progress":26}
  123. [11:49:14.090] - Load 12288/38848 {"progress":31}
  124. [11:49:14.106] - Load 14336/38848 {"progress":36}
  125. [11:49:14.121] - Load 16384/38848 {"progress":42}
  126. [11:49:14.137] - Load 18432/38848 {"progress":47}
  127. [11:49:14.154] - Load 20480/38848 {"progress":52}
  128. [11:49:14.170] - Load 22528/38848 {"progress":57}
  129. [11:49:14.186] - Load 24576/38848 {"progress":63}
  130. [11:49:14.201] - Load 26624/38848 {"progress":68}
  131. [11:49:14.217] - Load 28672/38848 {"progress":73}
  132. [11:49:14.233] - Load 30720/38848 {"progress":79}
  133. [11:49:14.249] - Load 32768/38848 {"progress":84}
  134. [11:49:14.265] - Load 34816/38848 {"progress":89}
  135. [11:49:14.281] - Load 36864/38848 {"progress":94}
  136. [11:49:14.297] - Load 38848/38848 {"progress":100}
  137. [11:49:14.297] - Load 38848/38848 {"progress":100}
  138. [11:49:14.298] - Write check
  139. [11:49:14.303] - Finished
  140. [11:49:14.305] - Sha caled by host: 7171533906de5fe3105f361076760193fd10af4d33c58620dd70dcc5a05d515f
  141. [11:49:14.305] - xip mode Verify
  142. [11:49:14.342] - Read Sha256/38848
  143. [11:49:14.342] - Flash xip readsha time cost(ms): 33.947265625
  144. [11:49:14.342] - Finished
  145. [11:49:14.345] - Sha caled by dev: 7171533906de5fe3105f361076760193fd10af4d33c58620dd70dcc5a05d515f
  146. [11:49:14.345] - Verify success
  147. [11:49:14.347] - Program Finished
  148. [11:49:14.347] - All time cost(ms): 3059.04150390625
  149. [11:49:14.454] - close interface
  150. [11:49:14.455] - [All Success]
  151. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make CHIP=bl616 BOARD=bl616dk      
  152. ./../../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
  153. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  154. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  155. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  156. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  157. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  158. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  159. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  160. -- Configuring done
  161. -- Generating done
  162. CMake Warning:
  163.   Manually-specified variables were not used by the project:

  164.     CONFIG_COMX


  165. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  166. make -C build -j8
  167. [  0%] Building C object CMakeFiles/app.dir/D_/aithinker_Ai-M6X_SDK/bsp/board/bl616dk/board.c.obj
  168. [  5%] Built target utils
  169. [  8%] Built target mm
  170. [ 22%] Built target std
  171. [ 90%] Built target lhal
  172. [ 96%] Built target libc
  173. [ 97%] Linking C static library build_out\lib\libapp.a
  174. [ 98%] Built target app
  175. [ 99%] Linking C executable build_out\helloworld_bl616.elf
  176. Generate D:/aithinker_Ai-M6X_SDK/examples/helloworld/build/build_out/helloworld_bl616.bin
  177. [100%] Built target helloworld_bl616.elf
  178. make -C build combine
  179. [11:53:00.097] - bflb firmware post process : V1.2.0
  180. [11:53:00.098] - Chipname: bl616
  181. [11:53:00.098] - Board config dir: ./../../bsp/board/bl616dk/config
  182. [11:53:00.098] - Create partition using partition_cfg_4M.toml
  183. [11:53:00.101] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  184. [11:53:00.102] - Create dts using bl_factory_params_IoTKitA_auto.dts
  185. [11:53:00.108] - 4K header found,append dts file
  186. [11:53:00.109] - Copy boot2_bl616_release_v8.0.8.bin
  187. [11:53:00.110] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  188. [11:53:00.112] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  189. [11:53:00.112] - Create dts using bl_factory_params_IoTKitA_auto.dts
  190. [11:53:00.121] - 4K header found,append dts file
  191. [11:53:00.122] -
  192. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  193. [11:53:00.166] - ========= sp image create =========
  194. [11:53:00.167] - Flash config crc: b'b5fec518'
  195. [11:53:00.167] - Clock config crc: b'4a05f490'
  196. [11:53:00.167] - Image Offset:0x1000
  197. [11:53:00.168] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'
  198. [11:53:00.169] - Encrypt efuse data
  199. [11:53:00.172] - Image Offset:0x1000
  200. [11:53:00.173] - Image hash ignore,not calculate
  201. [11:53:00.173] - Bootheader config crc: b'4ddfb44c'
  202. [11:53:00.174] -
  203. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  204. [11:53:00.175] - ========= sp image create =========
  205. [11:53:00.176] - Flash config crc: b'b5fec518'
  206. [11:53:00.176] - Clock config crc: b'4a05f490'
  207. [11:53:00.177] - Image Offset:0x2000
  208. [11:53:00.177] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  209. [11:53:00.178] - Encrypt efuse data
  210. [11:53:00.180] - Image Offset:0x2000
  211. [11:53:00.180] - Image hash ignore,not calculate
  212. [11:53:00.181] - Bootheader config crc: b'ccbfa125'
  213. [11:53:00.182] -
  214. [11:53:00.184] - ========= sp image create =========
  215. [11:53:00.185] - Flash config crc: b'4fb1fe70'
  216. [11:53:00.185] - Clock config crc: b'0b34ef89'
  217. [11:53:00.186] - Image Offset:0x1000
  218. [11:53:00.190] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  219. [11:53:00.191] - Encrypt efuse data
  220. [11:53:00.193] - Image Offset:0x1000
  221. [11:53:00.193] - Bootheader config crc: b'f9cf01e0'
  222. [11:53:00.195] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  223. [11:53:00.205] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  224. [11:53:00.233] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  225. Built target combine
  226. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7
  227. ./../../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
  228. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  229. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  230. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  231. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  232. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  233. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  234. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  235. -- Configuring done
  236. -- Generating done
  237. CMake Warning:
  238.   Manually-specified variables were not used by the project:

  239.     CONFIG_COMX


  240. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  241. make -C build -j8
  242. [  2%] Built target app
  243. [ 10%] Built target utils[ 10%] Built target mm

  244. [ 24%] Built target std
  245. [ 66%] Built target libc
  246. [ 98%] Built target lhal
  247. [100%] Built target helloworld_bl616.elf
  248. make -C build combine
  249. [11:53:14.194] - bflb firmware post process : V1.2.0
  250. [11:53:14.195] - Chipname: bl616
  251. [11:53:14.195] - Board config dir: ./../../bsp/board/bl616dk/config
  252. [11:53:14.195] - Create partition using partition_cfg_4M.toml
  253. [11:53:14.199] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  254. [11:53:14.199] - Create dts using bl_factory_params_IoTKitA_auto.dts
  255. [11:53:14.204] - 4K header found,append dts file
  256. [11:53:14.205] - Copy boot2_bl616_release_v8.0.8.bin
  257. [11:53:14.206] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  258. [11:53:14.208] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  259. [11:53:14.209] - Create dts using bl_factory_params_IoTKitA_auto.dts
  260. [11:53:14.221] - 4K header found,append dts file
  261. [11:53:14.222] -
  262. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  263. [11:53:14.223] - ========= sp image create =========
  264. [11:53:14.223] - Flash config crc: b'b5fec518'
  265. [11:53:14.223] - Clock config crc: b'4a05f490'
  266. [11:53:14.224] - Image Offset:0x1000
  267. [11:53:14.224] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'
  268. [11:53:14.225] - Encrypt efuse data
  269. [11:53:14.231] - Image Offset:0x1000
  270. [11:53:14.232] - Image hash ignore,not calculate
  271. [11:53:14.233] - Bootheader config crc: b'4ddfb44c'
  272. [11:53:14.234] -
  273. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  274. [11:53:14.235] - ========= sp image create =========
  275. [11:53:14.235] - Flash config crc: b'b5fec518'
  276. [11:53:14.236] - Clock config crc: b'4a05f490'
  277. [11:53:14.236] - Image Offset:0x2000
  278. [11:53:14.236] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  279. [11:53:14.237] - Encrypt efuse data
  280. [11:53:14.238] - Image Offset:0x2000
  281. [11:53:14.238] - Image hash ignore,not calculate
  282. [11:53:14.239] - Bootheader config crc: b'ccbfa125'
  283. [11:53:14.239] -
  284. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  285. [11:53:14.240] - ========= sp image create =========
  286. [11:53:14.242] - Flash config crc: b'4fb1fe70'
  287. [11:53:14.242] - Clock config crc: b'0b34ef89'
  288. [11:53:14.243] - Image Offset:0x1000
  289. [11:53:14.248] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  290. [11:53:14.249] - Encrypt efuse data
  291. [11:53:14.252] - Image Offset:0x1000
  292. [11:53:14.252] - Bootheader config crc: b'f9cf01e0'
  293. [11:53:14.253] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  294. [11:53:14.266] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  295. [11:53:14.296] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  296. Built target combine
  297. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
  298. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
  299. [11:53:16.793] - Serial port is COM7
  300. [11:53:16.793] - ==================================================
  301. [11:53:16.796] - Program Start
  302. [11:53:16.796] - ========= eflash loader cmd arguments =========
  303. [11:53:16.798] - serial port is COM7
  304. [11:53:16.798] - chiptype: bl616
  305. [11:53:16.798] - cpu_reset=False
  306. [11:53:16.827] - ========= Interface is uart =========
  307. [11:53:16.828] - Bootrom load
  308. [11:53:16.828] - ========= get_boot_info =========
  309. [11:53:16.828] - ========= image get bootinfo =========
  310. [11:53:16.829] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)
  311. [11:53:17.834] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)
  312. [11:53:18.839] - could not open port 'COM7': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)
  313. [11:53:19.845] - Error: 'NoneType' object has no attribute 'timeout'
  314. [11:53:19.845] - shake hand fail
  315. [11:53:19.846] - ########################################################################
  316. [11:53:19.846] - 请按照以下描述排查问题:
  317. [11:53:19.847] - Boot pin是否上拉到板子自身的3.3V,而不是外部的3.3V
  318. [11:53:19.847] - UART RX是否连接到USB转串口的TX引脚
  319. [11:53:19.847] - 在使用烧录软件进行烧录前,是否在Boot pin拉高的情况下,使用Reset/Chip_En复位了芯片
  320. [11:53:19.847] - 烧录软件所选择的COM口,是否是连接芯片的串口
  321. [11:53:19.848] - 烧录软件上选择的波特率是否是USB转串口支持的波特率
  322. [11:53:19.848] - 3.3V供电是否正常
  323. [11:53:19.849] - 板子供电电流是否正常(烧录模式下,芯片耗电电流5-7mA)
  324. [11:53:19.849] - ########################################################################
  325. [11:53:19.849] - shake hand fail
  326. [11:53:19.850] - ========= ChipID:  =========
  327. [11:53:19.850] - Get bootinfo time cost(ms): 3022.7861328125
  328. [11:53:19.850] - {"ErrorCode": "0050","ErrorMsg":"BFLB IMG LOAD SHAKEHAND FAIL"}
  329. [11:53:19.851] - Burn Retry
  330. [11:53:19.851] - Burn return with retry fail
  331. PS D:\aithinker_Ai-M6X_SDK\examples\helloworld> make flash CHIP=bl616 COMX=COM7
  332. ./../../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
  333. -- [register library : libc], path:D:/aithinker_Ai-M6X_SDK/components/libc
  334. -- [register library : mm], path:D:/aithinker_Ai-M6X_SDK/components/mm
  335. -- [register library : utils], path:D:/aithinker_Ai-M6X_SDK/components/utils
  336. -- [register library : lhal], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  337. -- [register extern library : libcsi_xt900p32f_dsp], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  338. -- [register extern library : libpka], path:D:/aithinker_Ai-M6X_SDK/drivers/lhal
  339. -- [register library : std], path:D:/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
  340. -- Configuring done
  341. -- Generating done
  342. -- Build files have been written to: D:/aithinker_Ai-M6X_SDK/examples/helloworld/build
  343. make -C build -j8
  344. [  3%] Built target mm
  345. [  5%] Built target app
  346. [ 10%] Built target utils
  347. [ 24%] Built target std
  348. [ 66%] Built target libc
  349. [ 98%] Built target lhal
  350. [100%] Built target helloworld_bl616.elf
  351. make -C build combine
  352. [11:53:38.015] - bflb firmware post process : V1.2.0
  353. [11:53:38.015] - Chipname: bl616
  354. [11:53:38.016] - Board config dir: ./../../bsp/board/bl616dk/config
  355. [11:53:38.016] - Create partition using partition_cfg_4M.toml
  356. [11:53:38.020] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  357. [11:53:38.021] - Create dts using bl_factory_params_IoTKitA_auto.dts
  358. [11:53:38.029] - 4K header found,append dts file
  359. [11:53:38.031] - Copy boot2_bl616_release_v8.0.8.bin
  360. [11:53:38.032] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
  361. [11:53:38.034] - Create dts for D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  362. [11:53:38.035] - Create dts using bl_factory_params_IoTKitA_auto.dts
  363. [11:53:38.047] - 4K header found,append dts file
  364. [11:53:38.048] -
  365. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin
  366. [11:53:38.049] - ========= sp image create =========
  367. [11:53:38.049] - Flash config crc: b'b5fec518'
  368. [11:53:38.050] - Clock config crc: b'4a05f490'
  369. [11:53:38.050] - Image Offset:0x1000
  370. [11:53:38.051] - Image hash is b'455318b9c4db193e4be111a0df3dc3c2395ed3475cb2481af8a052626668c5f7'
  371. [11:53:38.051] - Encrypt efuse data
  372. [11:53:38.056] - Image Offset:0x1000
  373. [11:53:38.057] - Image hash ignore,not calculate
  374. [11:53:38.058] - Bootheader config crc: b'4ddfb44c'
  375. [11:53:38.059] -
  376. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\boot2_bl616_release_v8.0.8.bin
  377. [11:53:38.061] - ========= sp image create =========
  378. [11:53:38.061] - Flash config crc: b'b5fec518'
  379. [11:53:38.062] - Clock config crc: b'4a05f490'
  380. [11:53:38.062] - Image Offset:0x2000
  381. [11:53:38.063] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
  382. [11:53:38.063] - Encrypt efuse data
  383. [11:53:38.064] - Image Offset:0x2000
  384. [11:53:38.065] - Image hash ignore,not calculate
  385. [11:53:38.065] - Bootheader config crc: b'ccbfa125'
  386. [11:53:38.066] -
  387. Process D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
  388. [11:53:38.067] - ========= sp image create =========
  389. [11:53:38.069] - Flash config crc: b'4fb1fe70'
  390. [11:53:38.070] - Clock config crc: b'0b34ef89'
  391. [11:53:38.070] - Image Offset:0x1000
  392. [11:53:38.073] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
  393. [11:53:38.074] - Encrypt efuse data
  394. [11:53:38.076] - Image Offset:0x1000
  395. [11:53:38.077] - Bootheader config crc: b'f9cf01e0'
  396. [11:53:38.079] - create OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.bin.ota
  397. [11:53:38.086] - create XZ file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz
  398. [11:53:38.115] - create XZ OTA file:D:\aithinker_Ai-M6X_SDK\examples\helloworld\build\build_out\helloworld_bl616.xz.ota
  399. Built target combine
  400. ./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM7 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
  401. ['./../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM7', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
  402. [11:53:40.859] - Serial port is COM7
  403. [11:53:40.859] - ==================================================
  404. [11:53:40.862] - Program Start
  405. [11:53:40.863] - ========= eflash loader cmd arguments =========
  406. [11:53:40.863] - serial port is COM7
  407. [11:53:40.864] - chiptype: bl616
  408. [11:53:40.864] - cpu_reset=False
  409. [11:53:40.893] - ========= Interface is uart =========
  410. [11:53:40.894] - Bootrom load
  411. [11:53:40.894] - ========= get_boot_info =========
  412. [11:53:40.894] - ========= image get bootinfo =========
  413. [11:53:41.173] - tx rx and power off, press the machine!
  414. [11:53:41.174] - cutoff time is 0.05
  415. [11:53:41.235] - power on tx and rx
  416. [11:53:42.224] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
  417. [11:53:42.224] - clean buf
  418. [11:53:42.226] - send sync
  419. [11:53:42.472] - ack is b'4f4b464c0201'
  420. [11:53:42.518] - shake hand success
  421. [11:53:43.031] - data read is b'010016060000010027128901cd002bcf0eb49a000f758010'
  422. [11:53:43.032] - ========= ChipID: b40ecf2b00cd =========
  423. [11:53:43.032] - Get bootinfo time cost(ms): 2137.283203125
  424. [11:53:43.032] - change bdrate: 2000000
  425. [11:53:43.033] - Clock PLL set
  426. [11:53:43.035] - Set clock time cost(ms): 2.0234375
  427. [11:53:43.168] - Read mac addr
  428. [11:53:43.170] - flash set para
  429. [11:53:43.171] - get flash pin cfg from bootinfo: 0x24
  430. [11:53:43.171] - set flash cfg: 14124
  431. [11:53:43.171] - Set flash config
  432. [11:53:43.175] - Set para time cost(ms): 3.026611328125
  433. [11:53:43.175] - ========= flash read jedec ID =========
  434. [11:53:43.178] - Read flash jedec ID
  435. [11:53:43.178] - readdata:
  436. [11:53:43.178] - b'5e401700'
  437. [11:53:43.179] - Finished
  438. [11:53:43.186] - Program operation
  439. [11:53:43.186] - Dealing Index 0
  440. [11:53:43.187] - ========= programming D:\aithinker_Ai-M6X_SDK\examples\helloworld\.\build\build_out\helloworld_bl616.bin to 0x000000
  441. [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
  442. [11:53:43.192] - Set flash config
  443. [11:53:43.197] - Set para time cost(ms): 3.953125
  444. [11:53:43.197] - ========= flash load =========
  445. [11:53:43.198] - ========= flash erase =========
  446. [11:53:43.199] - Erase flash  from 0x0 to 0x97bf
  447. [11:53:43.504] - Erase time cost(ms): 305.228271484375
  448. [11:53:43.521] - Load 2048/38848 {"progress":5}
  449. [11:53:43.537] - Load 4096/38848 {"progress":10}
  450. [11:53:43.553] - Load 6144/38848 {"progress":15}
  451. [11:53:43.568] - Load 8192/38848 {"progress":21}
  452. [11:53:43.585] - Load 10240/38848 {"progress":26}
  453. [11:53:43.601] - Load 12288/38848 {"progress":31}
  454. [11:53:43.617] - Load 14336/38848 {"progress":36}
  455. [11:53:43.633] - Load 16384/38848 {"progress":42}
  456. [11:53:43.649] - Load 18432/38848 {"progress":47}
  457. [11:53:43.665] - Load 20480/38848 {"progress":52}
  458. [11:53:43.681] - Load 22528/38848 {"progress":57}
  459. [11:53:43.698] - Load 24576/38848 {"progress":63}
  460. [11:53:43.713] - Load 26624/38848 {"progress":68}
  461. [11:53:43.730] - Load 28672/38848 {"progress":73}
  462. [11:53:43.746] - Load 30720/38848 {"progress":79}
  463. [11:53:43.763] - Load 32768/38848 {"progress":84}
  464. [11:53:43.779] - Load 34816/38848 {"progress":89}
  465. [11:53:43.795] - Load 36864/38848 {"progress":94}
  466. [11:53:43.811] - Load 38848/38848 {"progress":100}
  467. [11:53:43.811] - Load 38848/38848 {"progress":100}
  468. [11:53:43.811] - Write check
  469. [11:53:43.817] - Flash load time cost(ms): 311.7744140625
  470. [11:53:43.817] - Finished
  471. [11:53:43.818] - Sha caled by host: a2b398b591cd49f1daadc5164f1915af270289a080d32b3ae2025e29ebd31076
  472. [11:53:43.819] - xip mode Verify
  473. [11:53:43.855] - Read Sha256/38848
  474. [11:53:43.856] - Flash xip readsha time cost(ms): 34.873779296875
  475. [11:53:43.856] - Finished
  476. [11:53:43.858] - Sha caled by dev: a2b398b591cd49f1daadc5164f1915af270289a080d32b3ae2025e29ebd31076
  477. [11:53:43.858] - Verify success
  478. [11:53:43.859] - Program Finished
  479. [11:53:43.859] - All time cost(ms): 2997.5947265625
  480. [11:53:43.971] - close interface
  481. [11:53:43.972] - [All Success]
复制代码
最终成功编译并烧录。
make flash CHIP=bl616 COMX=COM7

这里有几点需要注意:
1、CHIP : 对应的是cpu
2、COMX:需要和设备管理器上看到一致
3、烧录的时候需要按下boot按键。Type-c口朝下右侧的按钮。

打开串行监视器
屏幕截图 2023-11-21 140541.png

启动监听后,按一下Ai-M61-32S-Kit 的EN按钮,Type-c口朝下左侧按钮
屏幕截图 2023-11-21 140935.png
不出意外的话,乱码了。
原因是波特率的问题。
屏幕截图 2023-11-21 141225.png

这里没办法设置成2000000的波特率。
所以需要改一下程序。
屏幕截图 2023-11-21 141401.png

找到 bsp -> board -> bl616dk -> board.c 文件
修改 193行的 2000000 波特率,改为 115200【理论上只要是支持的波特率改成哪个都行】
然后重新编译并烧写。再次打开串行监视器,然后按下EN按钮。可以发现。程序已经不乱码了。
屏幕截图 2023-11-21 140821.png


回复

使用道具 举报

lazy | 2023-11-21 14:43:08 | 显示全部楼层
非常详细,学习了
回复 支持 反对

使用道具 举报

干簧管 | 2023-11-21 17:50:13 | 显示全部楼层
回复

使用道具 举报

总是忘记初始化 | 2023-12-27 19:41:24 | 显示全部楼层
很详细,非常感谢佬
回复 支持 反对

使用道具 举报

心云 | 2024-1-7 22:55:28 | 显示全部楼层
👍
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则