发帖
6 0 1

windows下 Ai-M61-32S 点灯及其烧录教程

干簧管
论坛元老

19

主题

1243

回帖

7986

积分

论坛元老

积分
7986
Ai-M61-Kit点灯教程 1274 6 2023-11-19 15:09:00
拿到 Ai-M61-32S 板子插上USB发现没有什么反应(上面的几个led都没有亮),首先尝试下点灯,确保环境以及烧录工具等都打通,然后才能进行下一步的学习

1、串口驱动的安装
将板子接上USB插上电脑发现设备有串口设备,但是驱动异常,于是上淘宝找个串口驱动
上传的附件: CH340G_USB驱动.zip (175.77 KB, 下载次数: 23)


安装好后即可看到串口正常
捕获.PNG

2、代码修改

#include "bflb_gpio.h"
#include "board.h"

struct bflb_device_s *gpio;

int main(void)
{
    board_init();

    gpio = bflb_device_get_by_name("gpio");
    printf("gpio output\r\n");
    //bflb_gpio_init(gpio, GPIO_PIN_0, GPIO_OUTPUT | GPIO_PULLUP | GPIO_SMT_EN | GPIO_DRV_0);
    //bflb_gpio_init(gpio, GPIO_PIN_1, GPIO_INPUT | GPIO_PULLUP | GPIO_SMT_EN | GPIO_DRV_0);
    bflb_gpio_init(gpio, GPIO_PIN_12, GPIO_OUTPUT | GPIO_PULLUP | GPIO_SMT_EN | GPIO_DRV_0);
    while (1) {
        //bflb_gpio_set(gpio, GPIO_PIN_0);
        bflb_gpio_set(gpio, GPIO_PIN_12);
        //printf("GPIO_PIN_1=%x\r\n", bflb_gpio_read(gpio, GPIO_PIN_1));
        bflb_mtimer_delay_ms(2000);

        //bflb_gpio_reset(gpio, GPIO_PIN_0);
        bflb_gpio_reset(gpio, GPIO_PIN_12);
        //printf("GPIO_PIN_1=%x\r\n", bflb_gpio_read(gpio, GPIO_PIN_1));
        bflb_mtimer_delay_ms(2000);
    }
}


于是翻看原理图,并参照SDK中的gpio代码修改为GPIO12输出,代码如上修改并按照 Readme 中的说明编译

- BL616/BL618

```
make CHIP=bl616 BOARD=bl616dk
```





make CHIP=bl616 BOARD=bl616dk
./../../../../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
-- [register library : libc], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/libc
-- [register library : mm], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/mm
-- [register library : utils], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/utils
-- [register library : lhal], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libcsi_xt900p32f_dsp], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libpka], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register library : std], path:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/examples/peripherals/gpio/gpio_input_output/build
make -C build -j8
[  2%] Built target app
[  8%] Built target mm
[ 79%] Built target libc
[ 93%] Built target lhal
[ 93%] Built target std
[ 98%] Built target utils
[100%] Built target gpio_input_output_bl616.elf
make -C build combine
[14:52:28.088] - bflb firmware post process : V1.2.0
[14:52:28.088] - Chipname: bl616
[14:52:28.089] - Board config dir: ./../../../../bsp/board/bl616dk/config
[14:52:28.089] - Create partition using partition_cfg_4M.toml
[14:52:28.094] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:52:28.094] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:52:28.101] - 4K header found,append dts file
[14:52:28.103] - Copy boot2_bl616_release_v8.0.8.bin
[14:52:28.107] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
[14:52:28.111] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:52:28.113] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:52:28.120] - 4K header found,append dts file
[14:52:28.123] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:52:28.124] - ========= sp image create =========
[14:52:28.124] - Flash config crc: b'b5fec518'
[14:52:28.125] - Clock config crc: b'4a05f490'
[14:52:28.125] - Image Offset:0x1000
[14:52:28.125] - Image hash is b'f9a94877456c3d2f425e77e1fb770c614a73bf7b7d2081d5727c07c3a8e4b801'
[14:52:28.136] - Encrypt efuse data
[14:52:28.152] - Image Offset:0x1000
[14:52:28.160] - Image hash ignore,not calculate
[14:52:28.160] - Bootheader config crc: b'38bccf9c'
[14:52:28.163] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\boot2_bl616_release_v8.0.8.bin
[14:52:28.164] - ========= sp image create =========
[14:52:28.165] - Flash config crc: b'b5fec518'
[14:52:28.165] - Clock config crc: b'4a05f490'
[14:52:28.165] - Image Offset:0x2000
[14:52:28.166] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
[14:52:28.168] - Encrypt efuse data
[14:52:28.172] - Image Offset:0x2000
[14:52:28.172] - Image hash ignore,not calculate
[14:52:28.173] - Bootheader config crc: b'ccbfa125'
[14:52:28.175] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:52:28.178] - ========= sp image create =========
[14:52:28.178] - Flash config crc: b'4fb1fe70'
[14:52:28.179] - Clock config crc: b'0b34ef89'
[14:52:28.179] - Image Offset:0x1000
[14:52:28.185] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
[14:52:28.197] - Encrypt efuse data
[14:52:28.204] - Image Offset:0x1000
[14:52:28.206] - Bootheader config crc: b'f9cf01e0'
[14:52:28.210] - create OTA file:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin.ota
[14:52:28.253] - create XZ file:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz
[14:52:28.288] - create XZ OTA file:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz.ota
Built target combine

以上就编译成功了,如发现报错,可参照论坛里面的注释掉三个CP操作就ok

3、win7 USB烧录
按照论坛的方法,直接 make flash COMX=COM11 ,此处COM11按照自己电脑的端口配置

make flash COMX=COM11
./../../../../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=COM11 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
-- [register library : libc], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/libc
-- [register library : mm], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/mm
-- [register library : utils], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/utils
-- [register library : lhal], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libcsi_xt900p32f_dsp], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libpka], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register library : std], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/examples/peripherals/gpio/gpio_input_output/build
make -C build -j8
[  2%] Built target app
[ 16%] Built target std
[ 21%] Built target mm
[ 41%] Built target utils
[ 66%] Built target libc
[ 98%] Built target lhal
[100%] Built target gpio_input_output_bl616.elf
make -C build combine
[14:54:48.925] - bflb firmware post process : V1.2.0
[14:54:48.926] - Chipname: bl616
[14:54:48.926] - Board config dir: ./../../../../bsp/board/bl616dk/config
[14:54:48.926] - Create partition using partition_cfg_4M.toml
[14:54:48.937] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:54:48.938] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:54:48.949] - 4K header found,append dts file
[14:54:48.960] - Copy boot2_bl616_release_v8.0.8.bin
[14:54:48.965] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
[14:54:48.971] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:54:48.972] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:54:48.984] - 4K header found,append dts file
[14:54:48.987] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:54:48.989] - ========= sp image create =========
[14:54:48.989] - Flash config crc: b'b5fec518'
[14:54:48.990] - Clock config crc: b'4a05f490'
[14:54:48.990] - Image Offset:0x1000
[14:54:48.991] - Image hash is b'f9a94877456c3d2f425e77e1fb770c614a73bf7b7d2081d5727c07c3a8e4b801'
[14:54:48.994] - Encrypt efuse data
[14:54:49.003] - Image Offset:0x1000
[14:54:49.003] - Image hash ignore,not calculate
[14:54:49.003] - Bootheader config crc: b'38bccf9c'
[14:54:49.005] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\boot2_bl616_release_v8.0.8.bin
[14:54:49.006] - ========= sp image create =========
[14:54:49.006] - Flash config crc: b'b5fec518'
[14:54:49.007] - Clock config crc: b'4a05f490'
[14:54:49.007] - Image Offset:0x2000
[14:54:49.007] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
[14:54:49.009] - Encrypt efuse data
[14:54:49.012] - Image Offset:0x2000
[14:54:49.013] - Image hash ignore,not calculate
[14:54:49.013] - Bootheader config crc: b'ccbfa125'
[14:54:49.015] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:54:49.016] - ========= sp image create =========
[14:54:49.016] - Flash config crc: b'4fb1fe70'
[14:54:49.017] - Clock config crc: b'0b34ef89'
[14:54:49.017] - Image Offset:0x1000
[14:54:49.024] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
[14:54:49.027] - Encrypt efuse data
[14:54:49.031] - Image Offset:0x1000
[14:54:49.031] - Bootheader config crc: b'f9cf01e0'
[14:54:49.034] - create OTA file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin.ota
[14:54:49.046] - create XZ file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz
[14:54:49.078] - create XZ OTA file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz.ota
Built target combine
./../../../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM11 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
['./../../../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM11', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
[14:54:54.107] - Serial port is COM11
[14:54:54.107] - ==================================================
[14:54:54.114] - Program Start
[14:54:54.114] - ========= eflash loader cmd arguments =========
[14:54:54.116] - serial port is COM11
[14:54:54.116] - chiptype: bl616
[14:54:54.116] - cpu_reset=False
[14:54:54.151] - ========= Interface is uart =========
[14:54:54.151] - Bootrom load
[14:54:54.152] - ========= get_boot_info =========
[14:54:54.152] - ========= image get bootinfo =========
[14:54:54.419] - tx rx and power off, press the machine!
[14:54:54.419] - cutoff time is 0.05
[14:54:54.469] - power on tx and rx
[14:54:55.369] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[14:54:55.369] - clean buf
[14:54:55.371] - send sync
[14:54:55.496] - ack is b''
[14:54:55.497] - retry
[14:54:55.747] - tx rx and power off, press the machine!
[14:54:55.752] - cutoff time is 0.05
[14:54:55.802] - power on tx and rx
[14:54:56.706] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[14:54:56.706] - clean buf
[14:54:56.708] - send sync
[14:54:56.833] - ack is b''
[14:54:56.833] - retry
[14:54:57.084] - tx rx and power off, press the machine!
[14:54:57.085] - cutoff time is 0.05
[14:54:57.135] - power on tx and rx
[14:54:58.038] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[14:54:58.038] - clean buf
[14:54:58.039] - send sync
[14:54:58.164] - ack is b''
[14:54:58.164] - retry
[14:54:58.165] - shake hand fail
[14:54:58.165] - ########################################################################
[14:54:58.165] - 请按照以下描述排查问题:
[14:54:58.166] - Boot pin是否上拉到板子自身的3.3V,而不是外部的3.3V
[14:54:58.166] - UART RX是否连接到USB转串口的TX引脚
[14:54:58.167] - UART TX是否连接到USB转串口的RX引脚
[14:54:58.167] - 在使用烧录软件进行烧录前,是否在Boot pin拉高的情况下,使用Reset/Chip_En复
位了芯片
[14:54:58.167] - 烧录软件所选择的COM口,是否是连接芯片的串口
[14:54:58.167] - 烧录软件上选择的波特率是否是USB转串口支持的波特率
[14:54:58.168] - 3.3V供电是否正常
[14:54:58.168] - 板子供电电流是否正常(烧录模式下,芯片耗电电流5-7mA)
[14:54:58.168] - ########################################################################
[14:54:58.168] - shake hand fail
[14:54:58.168] - ========= ChipID:  =========
[14:54:58.169] - Get bootinfo time cost(ms): 4017.22998046875
[14:54:58.169] - {"ErrorCode": "0050","ErrorMsg":"BFLB IMG LOAD SHAKEHAND FAIL"}
[14:54:58.169] - Burn Retry
[14:54:58.169] - Burn return with retry fail


出现了报错,这个是没有进boot模式,于是按住IO2的同时,按一下EN键

make flash COMX=COM11
./../../../../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=COM11 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
-- [register library : libc], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/libc
-- [register library : mm], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/mm
-- [register library : utils], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components/utils
-- [register library : lhal], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libcsi_xt900p32f_dsp], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register extern library : libpka], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/lhal
-- [register library : std], path:D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Ai/workspaces/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/examples/peripherals/gpio/gpio_input_output/build
make -C build -j8
[  2%] Built target app
[ 16%] Built target std
[ 19%] Built target mm
[ 57%] Built target lhal
[ 68%] Built target utils
[ 98%] Built target libc
[100%] Built target gpio_input_output_bl616.elf
make -C build combine
[14:58:19.648] - bflb firmware post process : V1.2.0
[14:58:19.649] - Chipname: bl616
[14:58:19.649] - Board config dir: ./../../../../bsp/board/bl616dk/config
[14:58:19.649] - Create partition using partition_cfg_4M.toml
[14:58:19.654] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:58:19.654] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:58:19.662] - 4K header found,append dts file
[14:58:19.665] - Copy boot2_bl616_release_v8.0.8.bin
[14:58:19.668] - Copy mfg_bl616_gu_af8b0946f_v2.26.bin
[14:58:19.671] - Create dts for D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:58:19.671] - Create dts using bl_factory_params_IoTKitA_auto.dts
[14:58:19.682] - 4K header found,append dts file
[14:58:19.684] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin
[14:58:19.685] - ========= sp image create =========
[14:58:19.685] - Flash config crc: b'b5fec518'
[14:58:19.685] - Clock config crc: b'4a05f490'
[14:58:19.686] - Image Offset:0x1000
[14:58:19.686] - Image hash is b'f9a94877456c3d2f425e77e1fb770c614a73bf7b7d2081d5727c07c3a8e4b801'
[14:58:19.688] - Encrypt efuse data
[14:58:19.699] - Image Offset:0x1000
[14:58:19.699] - Image hash ignore,not calculate
[14:58:19.699] - Bootheader config crc: b'38bccf9c'
[14:58:19.701] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\boot2_bl616_release_v8.0.8.bin
[14:58:19.703] - ========= sp image create =========
[14:58:19.703] - Flash config crc: b'b5fec518'
[14:58:19.703] - Clock config crc: b'4a05f490'
[14:58:19.703] - Image Offset:0x2000
[14:58:19.704] - Image hash is b'4f4eecaddc6e597708f626253879f5560534d2e3baff848f4d96fabbce4b020f'
[14:58:19.706] - Encrypt efuse data
[14:58:19.715] - Image Offset:0x2000
[14:58:19.715] - Image hash ignore,not calculate
[14:58:19.715] - Bootheader config crc: b'ccbfa125'
[14:58:19.717] -
Process D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\mfg_bl616_gu_af8b0946f_v2.26.bin
[14:58:19.718] - ========= sp image create =========
[14:58:19.721] - Flash config crc: b'4fb1fe70'
[14:58:19.722] - Clock config crc: b'0b34ef89'
[14:58:19.722] - Image Offset:0x1000
[14:58:19.728] - Image hash is b'69de5b7af45fea2e456fb6864612126bbdad58e69294d1466a2f892e010d1f3d'
[14:58:19.730] - Encrypt efuse data
[14:58:19.734] - Image Offset:0x1000
[14:58:19.734] - Bootheader config crc: b'f9cf01e0'
[14:58:19.737] - create OTA file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.bin.ota
[14:58:19.751] - create XZ file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz
[14:58:19.782] - create XZ OTA file:D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\build\build_out\gpio_input_output_bl616.xz.ota
Built target combine
./../../../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe --interface=uart --baudrate=2000000 --port=COM11 --chipname=bl616 --cpu_id= --config=flash_prog_cfg.ini
['./../../../../tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand.exe', '--interface=uart', '--baudrate=2000000', '--port=COM11', '--chipname=bl616', '--cpu_id=', '--config=flash_prog_cfg.ini']
[14:58:25.166] - Serial port is COM11
[14:58:25.167] - ==================================================
[14:58:25.179] - Program Start
[14:58:25.181] - ========= eflash loader cmd arguments =========
[14:58:25.186] - serial port is COM11
[14:58:25.187] - chiptype: bl616
[14:58:25.187] - cpu_reset=False
[14:58:25.239] - ========= Interface is uart =========
[14:58:25.240] - Bootrom load
[14:58:25.240] - ========= get_boot_info =========
[14:58:25.240] - ========= image get bootinfo =========
[14:58:25.523] - tx rx and power off, press the machine!
[14:58:25.524] - cutoff time is 0.05
[14:58:25.576] - power on tx and rx
[14:58:26.499] - reset cnt: 0, reset hold: 0.05, shake hand delay: 0.1
[14:58:26.500] - clean buf
[14:58:26.505] - send sync
[14:58:26.732] - ack is b'4f4b464c0201'
[14:58:26.763] - shake hand success
[14:58:27.284] - data read is b'010016060000010027128901d7012bcf0eb498000f758010'
[14:58:27.285] - ========= ChipID: b40ecf2b01d7 =========
[14:58:27.285] - Get bootinfo time cost(ms): 2045.116943359375
[14:58:27.285] - change bdrate: 2000000
[14:58:27.286] - Clock PLL set
[14:58:27.288] - Set clock time cost(ms): 2.000244140625
[14:58:27.399] - Read mac addr
[14:58:27.408] - flash set para
[14:58:27.409] - get flash pin cfg from bootinfo: 0x24
[14:58:27.409] - set flash cfg: 14124
[14:58:27.409] - Set flash config
[14:58:27.412] - Set para time cost(ms): 3.0
[14:58:27.417] - ========= flash read jedec ID =========
[14:58:27.420] - Read flash jedec ID
[14:58:27.420] - readdata:
[14:58:27.421] - b'5e401700'
[14:58:27.421] - Finished
[14:58:27.432] - Program operation
[14:58:27.434] - Dealing Index 0
[14:58:27.434] - ========= programming D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\examples\peripherals\gpio\gpio_input_output\.\build\build_out\gpio_input_output_bl616.bin to 0x000000
[14:58:27.442] - flash para file: D:\Ai\workspaces\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\bflb_tools\bouffalo_flash_cube\chips/bl616/efuse_bootheader/flash_para.bin
[14:58:27.444] - Set flash config
[14:58:27.460] - Set para time cost(ms): 4.000244140625
[14:58:27.460] - ========= flash load =========
[14:58:27.482] - ========= flash erase =========
[14:58:27.482] - Erase flash  from 0x0 to 0x7d1f
[14:58:27.673] - Erase time cost(ms): 190.01123046875
[14:58:27.691] - Load 2048/32032 {"progress":6}
[14:58:27.707] - Load 4096/32032 {"progress":12}
[14:58:27.724] - Load 6144/32032 {"progress":19}
[14:58:27.744] - Load 8192/32032 {"progress":25}
[14:58:27.761] - Load 10240/32032 {"progress":31}
[14:58:27.780] - Load 12288/32032 {"progress":38}
[14:58:27.796] - Load 14336/32032 {"progress":44}
[14:58:27.812] - Load 16384/32032 {"progress":51}
[14:58:27.829] - Load 18432/32032 {"progress":57}
[14:58:27.846] - Load 20480/32032 {"progress":63}
[14:58:27.862] - Load 22528/32032 {"progress":70}
[14:58:27.879] - Load 24576/32032 {"progress":76}
[14:58:27.895] - Load 26624/32032 {"progress":83}
[14:58:27.920] - Load 28672/32032 {"progress":89}
[14:58:27.938] - Load 30720/32032 {"progress":95}
[14:58:27.954] - Load 32032/32032 {"progress":100}
[14:58:27.957] - Load 32032/32032 {"progress":100}
[14:58:27.957] - Write check
[14:58:27.959] - Flash load time cost(ms): 283.01611328125
[14:58:27.960] - Finished
[14:58:27.962] - Sha caled by host: 0eb9cf4849fcc4b89ccc378c470ff0eb8a3e3146d7c0f93b1cb0c09b4041af88
[14:58:27.962] - xip mode Verify
[14:58:27.992] - Read Sha256/32032
[14:58:27.993] - Flash xip readsha time cost(ms): 29.00146484375
[14:58:27.993] - Finished
[14:58:27.995] - Sha caled by dev: 0eb9cf4849fcc4b89ccc378c470ff0eb8a3e3146d7c0f93b1cb0c09b4041af88
[14:58:27.995] - Verify success
[14:58:27.996] - Program Finished
[14:58:27.996] - All time cost(ms): 2817.161376953125
[14:58:28.096] - close interface
[14:58:28.096] - [All Success]


于是就发现烧录成功了,再按一下EN键,程序就跑起来啦,红色的led就亮起来了
c84659ab4190071d468e68f26e3b027.jpg

如果需要绿色的led亮起来就将上面的gpio12改为gpio14就行
58534678a5017ae13f3a2b7267e1cc8.jpg









──── 0人觉得很赞 ────

举报

2023-11-19 17:08:45
终于找到板子连电脑找不到COM的原因啦,其他教程里找不到这步
2023-11-20 10:14:35
Yhue 发表于 2023-11-19 17:08
终于找到板子连电脑找不到COM的原因啦,其他教程里找不到这步

嗯嗯,一起学起来
2023-11-20 11:46:56
关于驱动问题:直接去沁恒官网下载驱动程序即可
下载网址:https://www.wch.cn/products/CH340.html?
2023-11-20 20:47:28
码录编 发表于 2023-11-20 11:46
关于驱动问题:直接去沁恒官网下载驱动程序即可
下载网址:https://www.wch.cn/products/CH340.html? ...

嗯,文中的附件从淘宝找的也可以用哦
2023-11-21 21:19:13
干簧管 发表于 2023-11-20 20:47
嗯,文中的附件从淘宝找的也可以用哦

对的对的,你真棒!!!
2023-12-25 22:27:32
👍
您需要登录后才可以回帖 立即登录
高级模式
返回
统计信息
  • 会员数: 28374 个
  • 话题数: 40425 篇