Lianshengde HLK-W806 (Part 2): Development environment configuration, compilation and burning instructions under Win10

Publisher:平安宁静Latest update time:2022-06-21 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Win10 environment configuration

W806 has been introduced before, and the previous article talked about the development environment under Ubuntu.


If you want to use the CDK development environment, please ignore the following content and check this article: Using WM-SDK-W806 in the CDK IDE development environment


Next, we will talk about the equivalent MSYS2 development environment under Win10 (without using CDK).


Download relevant software

Download MSYS2 https://www.msys2.org/, download the MSYS2 installation file, currently msys2-x86_64-20210725.exe

Download the toolchain https://occ.t-head.cn/community/download

Navigation->Tools->Toolchain-800 Series->(Currently V3.10.29)

Download the corresponding version. For Win10, download csky-elfabiv2-tools-mingw-minilibc-20210423.tar.gz

If you cannot download or register, please download from Baidu Pan https://pan.baidu.com/s/1Mp-oHNM3k4Hb8vEybv8pZg code:vw42

Download the burning tool https://h.hlktech.com/Mobile/download/fdetail/143.html

Click the download link on the right side of 'W800 Serial Port Burning Tool_V1.4.8(.rar)' to download

Installation and Configuration

Install MSYS2 by running the MSYS2 installation file on the local machine

In the MSYS2 command line, refer to the following command to install the necessary software

# Update packages

pacman-Syu

# Install make

pacman -S msys/make

# Install automake

pacman -S msys/automake

# Install autoconf

pacman -S msys/autoconf

# Install gcc

pacman -S msys/gcc

# Install git

pacman -S msys/git

# Install the dependency libraries required for compilation

pacman -S msys/ncurses-devel

pacman -S msys/gettext-devel


Unzip the toolchain to a specified directory. Note that this tarball does not have a top-level directory. It is recommended to unzip it in a specified directory.


mkdir csky-elfabiv2-tools-mingw-minilibc-20210423

tar xvf csky-elfabiv2-tools-mingw-minilibc-20210423.tar.gz -C csky-elfabiv2-tools-mingw-minilibc-20210423/


Note the path of this directory, for example /d/w806/csky-elfabiv2-tools-mingw-minilibc-20210423/bin/, which will be used when configuring menuconfig later.


Compile

Export SDK


git clone https://github.com/IOsetting/wm-sdk-w806.git


Configure the toolchain path with menuconfig


cd wm-sdk-w806

make menuconfig


In the menuconfig interface, Toolchain Configuration -> the second toolchain path, fill in the path just now, the full path is required, with the last slash, for example


/d/w806/csky-elfabiv2-tools-mingw-minilibc-20210423/bin/


Don't change anything else, save and exit menuconfig. If the menu row below is not highlighted, you can use the shortcut keys Alt+E = exit, Alt+S = save


Then execute the compilation


make


The generated firmware is in the bin/W806 directory


Writing to the development board

Option 1: Using Upgrade_Tools

Connecting the Development Board

Run the official burning tool Upgrade_Tools_V1.4.8.exe,

Select the correct port, use the default baud rate of 115200, and click Open Serial Port

Select the firmware you just compiled, the file path is bin/W806/W806.fls

click to download

Short press the Reset button on the development board and wait for the burning tool to complete the burning.

Short press the Reset button on the development board again, and the burned program will start executing

Option 2: Use wm_tool provided by SDK

First, use the Windows Device Manager to determine the USB port corresponding to your development board in the system, such as COM5.


Run menuconfig, configure the port name


cd wm-sdk-w806

make menuconfig


In the menuconfig interface, Download Configuration -> download port, fill in the USB port corresponding to the development board in your system, such as COM5. Note that only the pure port name is needed here, and the full path is not required.

You can increase the baud rate to speed up downloading. Only 115200, 460800, 921600, 1000000, 2000000 are supported. Exit menuconfig after saving.


The rest of the programming and options are the same as in Linux environment, please refer to the corresponding Linux instructions.


question

If you modify the code and compile, and find that the firmware is not updated, you can execute the following command to clear the old compilation output and then compile again.


# Clean up old compilation results and intermediate results

make distclean

# Recompile

make


Reference address:Lianshengde HLK-W806 (Part 2): Development environment configuration, compilation and burning instructions under Win10

Previous article:Lianshengde HLK-W806 (Part 3): Automatic download and reset without buttons
Next article:Lianshengde HLK-W806 (Part 1): Development environment configuration, compilation and burning instructions under Ubuntu 20.04

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号