Get-Started
This document uses the Beken BK7236 development board as an example to show you through a simple example project:
How to build the BK-MESH SDK compilation environment;
How to configure the BK-MESH SDK project;
How to compile and download firmware;
Preparation
Hardware:
BK72XX development board (BK7236 as an example)
BKFIL–Beken Flash Image Load
PC(Windows & Ubuntu)
Note
The BK-MESH SDK only supports compilation on the Linux platform and firmware burning on the Windows platform. Therefore, you need two computers, Linux and Windows; Of course, you can also just use the Windows platform and install a Linux virtual machine on the Windows platform.
Software:
ARM/RISCV tool chain,for compiling different chip versions for which the BK-MESH SDK is adapted(ARM:BK7258/BK7236);
Build tools, including CMake;
BK-MESH SDK Code;
BK FIL;
Download the BK-MESH SDK code
You can download the BK-MESH SDK from gitlab:
mkdir -p ~/armino
cd ~/armino
git clone git@gitlab.bekencorp.com:armino/bk mesh/bk_mesh.git -b mesh_release/v2.0.1 --recurse-submodules
Note
The latest SDK code downloaded from gitlab on the official website will be reviewed on the relevant account search project.
Build a compilation environment
BK-MESH SDK currently supports compilation in Linux. The following describes how to build the AT SDK compilation environment
Note
This chapter will explain the construction of the entire BK-MESH SDK compilation environment, that is, the user has no previous Beken IDK compilation experience. If you have prior experience with Beken IDK’s compilation environment, skip this section.
Note
If you want to learn about Beken IDK’s compilation environment, please refer to the following website:
http://docs.bekencorp.com/armino/bk7236/zh_CN/v1.5/get-started/index.html
Tool chain installation
The path to download the SDK tool chain is as follows:
Tool chain Download:
Please match the type of toolchain you downloaded based on the module chip model you have:
BK7258/BK7236::ARM
After the tool package is downloaded, run the following command to decompress it to the /opt directory:
ARM :: $ sudo tar -zxvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tgz -C /
Dependency library installation
Enter the following command at the terminal to install python3,CMake,Ninja,Cr-ypto and theirs dependency libraries:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential cmake python3 python3-pip doxygen ninja-build libc6:i386 libstdc++6:i386 libncurses5-dev lib32z1 -y
sudo pip3 install pycrypto click
Documentation compilation depends on library installation
Enter the following command on the terminal to install the Python dependencies required for document compilation:
sudo pip3 install sphinx_rtd_theme future breathe blockdiag sphinxcontrib-seqdiag sphinxcontrib-actdiag sphinxcontrib-nwdiag sphinxcontrib.blockdiagsphinxcontrib.blockdiag
Set default Python version:
sudo ln -s /usr/bin/python3 /usr/bin/python
Compilation Project
Enter the following command in the terminal to compile the BK-MESH SDK default PROJECT. Project is the unnecessary parameter:
cd ~/armino_bk_mesh
make bk72xx -jN
Note
For any project, please confirm the configuration of the Log port and the AT port before compiling.
Log Port (CONFIG_UART_PRINT_PORT): defualt is 0(UART0)
AT Port (CONFIG_DEFAULT_AT_PORT): defualt is 1(UART1)
If there is a need for configuration, please make changes according to the following steps:
cd projects/bk_mesh/xxx/config/bk72xx (xxx: the compiled project selected, the default is normal ; bk72xx: The Beken module chip used)
vim config
In the opened config file, set CONFIG_UART_PRINT_PORT=xxx, CONFIG_DEFAULT_AT_PORT=yyy (xxx: the log port to be configured; yyy: the AT port to be configured)
Close config
Return to the root directory
make clean && make bk72xx -j8
After compilation and burning, please use two serial port tools to separately monitor the output of the Log port and AT port!
Project configuration
The engineering configuration of BK-MESH SDK is based on the engineering configuration of Beken IDK. For details, see:
The default project is projects/bk_mesh. For new projects, please refer to projects/bk_mesh project.
Burn code
On the Windows platform, BK-MESH SDK currently supports UART burning.
Burn through the serial port
Note
BK-MESH SDK Support UART burning, recommended to use USB to UART serial port module to download.
Serial burning tool is shown in the following figure:

USB-UART serial Port Module
The burning tool uses BK FIL for burning and obtains the following address:
Get the latest version of BK FIL in this directory, such as:
BEKEN_BKFIL_V2.0.8.13_20230821.zip
The following figure shows the BK FIL.exe page and related configurations:

BK-FIL
Select COM port and set the baud rate to 2000000, as shown in the following figure:

BK-FIL COM Seltction
Note
Select the COM port connected to the Log output port as the corresponding COM port for downloading and burning