2.3 Official IDE development environment

2.3 Official IDE development environment (optional)

1. Download Kendryte IDE

1.1 Kendryte IDEdownload link:

https://github.com/kendryte/kendryte-ide/releases

 

(We have provide this file, you can click [Tools] to get this file.)

1.2 Click Windows version Kendryte IDE.

1.3 After download is complete, extract KendryteIDE,zip file. You will get a updater.beta.20190604.4.win32 folder with KendryteIDE folder.

 

Copy KendryteIDE folder into your installation path.

Eg: we install C:k210

 

1.4 Close all protection software on the computer.

Since KendryteIDE needs to download files automatically, the system protection software will detect an abnormality. We need to turn off the system protection software or exit the protection first, otherwise the installation may fail.

1.5 Install KendryteIDE

Run the KendryteIDE.bat file as an administrator.

You need to exit the system protection software before this operation.

 

1.6 After the installation is complete, open KendryteIDE. You can see following interface.

 

2. New create project

2.1 New create project directory

Click on the open directory in the lower left corner to start a project.

Choose a folder path to save the project, we use C:k210demo as an example.

  

Then, you can see following interface.

 

2.2 Click on the lower left corner of the interface to new create kendryte-package.json project.

 

2.3 kendryteIDE will help us create the project, the src folder is used to store our source files and header files.

Only the main.c file is by default. The main() function is the entry point of the program, this program function is that print a "Hello World".

 

2.4 The kendryte-package.json file is the configuration file of KendryteIDE. You can modify the project name, add file paths, and add compilation parameters.

2.5 Click "Kendryte" --> "Install all dependencies" on the menu bar. As shown below.

 

2.6 When the dependency installation is complete, we can see the prompt as shown below in the lower right corner.

 

we can see that an additional kendryte_libraries folder.

This folder stores the K210 SDK, which contains various drivers.

 

2.7 Introduction of the kendryte_libraries folder structure.

The kendryte_libraries folder stores different K210 library files, the default is kendryte_standalone-sdk.

 

If you need to download other library files, you can click “Kendryte” -> “Package Manager” -> “Explore online packages” to download by yourself.

 

3.Compile and write program

3.1 Connect the K210 board to the computer, and open the power switch of K210 board.

Click the indicator button in the bottom column to select the serial port.

  

If your KendryteIDE do not recognize this serial port, please read following tutorial.

please check whether your computer [Device Manager] recognizes the CH340 serial port.

 


Case -1: If your computer can’t recognizes CH340 port, please check [2.Development environment]---[2.1 Install CH340 serial port driver] to install CH340 drive.

Case -2: If your computer can recognizes CH340 port, please re-start KendryteIDE, you will see serial port.

3.2 Build and Upload

Choose “Kendryte”--> “Serail Port” --> “Build and Upload”.

 

3.3 At the first time, compilation will take a long time, please be patient.

After the compilation is completed, it will be directly uploaded to the K210 chip flash.

When you see the prompt as shown in the figure below, it means that the program has been successfully uploaded.

 

3.4 Open serial port, as shown below.

 

①Click “SERIAL PORT”.

②Click “Reload Devices”.

③Double-click “COM port”(my port is COM16, choose your own port).

④Click “Open serial terminal”.

 

3.5 Press reset button on K210board, you can see following message.

 

!Tip: Before you compile and upload at the next time, you need to close port, Otherwise it will fail to flash.

 

เสร็จสิ้นและไปบทถัดไป