Reference: https://hackaday.io/project/162174-kendryte-k210-development-tutorial-for-windows-10
This is a simple guide for deploying the FreeRTOS SDK for the Kendryte K210 system (K210 Dock) for the Windows 10 environment.
The specifications of the K210 processor from: https://github.com/kendryte/kendryte-doc-datasheet/blob/master/en/001.md
General Specifications:- The K210 includes two 64-bit RISC-V CPU cores, each with a built-in independent FPU.
- KPU high performance Convolutional Neural Network (CNN) hardware accelerator. The primary functions of the K210 are machine vision and hearing, which includes the KPU for computing convolutional neural networks and an APU for processing microphone array inputs.
- The K210 features a Fast Fourier Transform (FFT) Accelerator for high performance complex FFT calculations. As a result, for most machine learning algorithms, the K210 has high-performance processing power.
- Advanced TSMC 28nm process, temperature range -40°C to 125°C
- Firmware encryption support
- Unique programmable IO array maximises design flexibility
- Low voltage, reduced power consumption compared to other systems with the same processing power
- 3.3V/1.8V dual voltage IO support eliminates need for level shifters
- Sipeed's K210 Dock, buy from Taobao (https://item.taobao.com/item.htm?id=578484113485)
- Cmake installation (https://cmake.org/download/)
- Windows CPP Build tools (https://visualstudio.microsoft.com/visual-cpp-build-tools/)
- Kendryte's K210 Toolchain (https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/kendryte-toolchain.zip)
- The FreeRTOS SDK: https://github.com/kendryte/kendryte-freertos-sdk/archive/v0.5.0.zip (The latest 0.6.0 SDK doesn't compile)
- K-Flash to flash the binary into the board: https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/K-Flash-V0.3.0.zip
- Get Cmake. Install it. Make sure the Cmake path is set too! If not, set this in the "Environment Variables":
2. Then install the Windows CPP Build tools. Make sure you install the Windows 8.1 SDK too!
3. Extract the Kendryte's K210 Toolchain to your desired drive and folder. Take note of the location of the folder (where X is your desired drive letter):
Location of the toolchain:X:/kendryte-toolchain/Location of the toolchain's binary: X:/kendryte-toolchain/bin
4. Extract the FreeRTOS SDK to your desired drive and folder also. Make sure you create a folder inside the folder as well!
X:/kendryte-freertos-sdk-0.5.0/Make build folder inside there:X:/kendryte-freertos-sdk-0.5.0/build
5. Go to CMD and:
a. Set the path:
set PATH=%PATH%;X:/kendryte-toolchain/bin
b. Change directory to Build folder, and type this (after the >):
D:\kendryte-freertos-sdk-0.5.0\build> cmake .. -DPROJ=hello_world -DTOOLCHAIN=X:/kendryte-toolchain/bin -G "Unix Makefiles" && make
c. Press Enter! It is now compiling and give it a few minutes.
6. When you have seen this, it means you have completed the compilation:
7. That is not complete yet! You need to load the binary to the K210 Dock board. Install the K-Flashinto your desired drive or folder.
8. In the K-Flash, just select the binary file. It is from the "build" folder you have made just now:
Of course, choose the "USB-SERIAL CH340" for your device as the dock contains the CH340 converter.
In the Firmware, just copy and paste this into the box:
X:\kendryte-freertos-sdk-0.5.0\build\hello_world.bin
Hold the BOOT button on the board, then press "Flash", and when it's downloading, release the button.
9. In your Realterm or other terminal program:
Select the port that is connected to the dock, and set the Baud rate to 115200.
If you cannot see the "Hello World!", press the reset button. You will see it here right after you press it.
That's only for this project! Next step, integrate this into another IDE! :)
You can try the example codes that are attached:
- Hello World PWM
- I2S Example
Acknowledgements:
Thanks to Kali Prasad, Wu Caesar, Yang FangFei, Itsurin Syu, Han Shihao and all the other crew in Sipeed for the rapid assistance!
Comments