Contributed by Shenye, organized by Ai-Thinker
[Ai-WB2] Flashing and LED Blinking
Ai-Thinker Ai-WB2 Wireless Module Development Framework
Based on the Bouffalolab bl_iot_sdk, it supports the RISC-V based BL602 Wi-Fi/BLE combo chip and the BL70X Zigbee/BLE chip.
Linux Users
Step 1. Install Prerequisites
To use the Ai-WB2 development framework with the Ai-WB2, you need to install some packages depending on your operating system. This setup guide will help you install all the necessary software on Linux and macOS systems.
Debian or Ubuntu
Click to expand: sudo apt install build-essenti
sudo apt install build-essential python3 python3-pip git screenArch
Click to expand: sudo pacman -S base-devel pyth
sudo pacman -S base-devel python python-pip git screenNext, clone the SDK repository:
Click to expand: git clone --recursive [https:/
git clone --recursive [https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2.git](https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2.git)If you are coding in China, it is recommended to clone the following repository:
Click to expand: git clone --recursive [https:/
git clone --recursive [https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2](https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2)Step 2. Modify Permissions
Modify the permissions of the build toolchain to enable executable functionality.
Darwin
Click to expand: cd toolchain/riscv/Darwin/
cd toolchain/riscv/Darwin/
chmod755.shLinux
Click to expand: cd toolchain/riscv/Linux/
cd toolchain/riscv/Linux/
chmod755.shMSYS
Click to expand: cd toolchain/riscv/MSYS/
cd toolchain/riscv/MSYS/
chmod755.shStep 3. Build
For example, run the cd applications/get-started/helloworld project to build:
Click to expand: cd applications/get-started/he
cd applications/get-started/helloworld
make -j8Step 4. Download
Please connect your Ai-WB2 serial development board and press the EN button as prompted.
Click to expand: make flash p=/dev/ttyUSB0 b=92
make flash p=/dev/ttyUSB0 b=921600Step 5. Others
Additionally, you can use the following command to view the help.
Click to expand: make help
make helpYour configured chip name is the Ai-Thinker Ai-WB2 Wi-Fi&BLE module. Welcome to the Ai-WB2 SDK build system. make targets:
make all- Build the application and componentsmake clean- Delete all application component outputsmake flash- Build and flash firmwaremake flash-only- Flash firmware onlymake eflash- Use flash after erasingmake erase_flash- Erase all internal contents of the flashmake list-components- List all components in the projectmake [component name]- Build the component as a library Note: after erasing the flash, you need to use this command to download it, but always press the BURN button, then press the EN button, and finally release all buttons.
Click to expand: make eflash
make eflashClick to expand full code
本次命令 make flash p=com4 b=921600

