Skip to content

Instantly share code, notes, and snippets.

@marchingband
Last active September 9, 2023 14:56
Show Gist options
  • Save marchingband/90623c3f16a3293beeac2c2ec82144f8 to your computer and use it in GitHub Desktop.
Save marchingband/90623c3f16a3293beeac2c2ec82144f8 to your computer and use it in GitHub Desktop.
download Bouffalo Lab Dev Cube here: https://dev.bouffalolab.com/download
toolchain installation guide here: https://bl-mcu-sdk.readthedocs.io/zh_CN/latest/get_started/linux_wsl.html
Complete steps to install toolchain that worked for me, on a Windows machine running Debian WSL:
In WSL Debian terminal:
cd ~
sudo apt install git make ninja-build -y
git clone https://gitee.com/bouffalolab/bl_mcu_sdk
mv bl_mcu_sdk bouffalo_sdk
git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_linux.git
sudo cp -rf toolchain_gcc_t-head_linux/ /usr/bin
echo "export PATH=\"$PATH:/usr/bin/toolchain_gcc_t-head_linux/bin\"" >> ~/.bashrc
source ~/.bashrc
cd bouffalo_sdk
chmod 777 tools/cmake/bin/cmake
chmod 777 tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc
chmod 777 tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand_Ubuntu // this filename may be inacurate you may need to confirm by looking at the actual file
cd examples/helloworld
make CHIP=bl808 BOARD=bl808dk CHIP_ID=m0
This builds a .bin file in /build_out
Now run Bouffalo Labs Dev Cube from Windows.
Click MCU tab
Browse to select your .bin file (from the WSL file system) for MO Group0 (see https://bl-mcu-sdk.readthedocs.io/zh_CN/latest/get_started/devcube.html)
connect M1S-Dock with a proper USB cable, using the USB connector labelled "UART", click RST while holding BOOT (this places mcu in bootloader mode)
Select the highest-numbered port (BL808 presents 2, one for each core, m0 is the higher core)
Click "Create and Download"
Your chip should get flashed.
open up a serial emulator of your choice, select 2000000 (two million) baud rate, and connect to the higher-numbered port presented by bl808 (there will be 2 ports)
hit "RST" and see the various log levels!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment