Kendryte-dev-extension/README_EN.md

157 lines
5.3 KiB
Markdown
Raw Permalink Normal View History

2019-12-04 05:13:03 -05:00
# Kendryte Dev Tool for Visual Studio Code
2019-12-08 22:09:55 -05:00
[![License](https://img.shields.io/badge/license-Apache%202-blue)](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/LICENSE)
2020-05-19 04:31:49 -04:00
![Version](https://img.shields.io/badge/Version-0.3.1-green)
2019-12-08 22:09:55 -05:00
2019-12-05 05:57:05 -05:00
[中文版](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/README.md)
2019-12-04 05:13:03 -05:00
- [Prepare](#Prepare)
2019-12-05 03:33:44 -05:00
- [Quick Start](#QuickStart)
- [Directory Structure](#DirectoryStructure)
2019-12-04 05:13:03 -05:00
- [Features](#Features)
- [Questions](#Questions)
- [Windows](#Windows)
- [MacOS](#MacOS)
- [Linux](#Linux)
2019-12-06 01:46:18 -05:00
- [Roadmap](#Roadmap)
2019-12-04 05:13:03 -05:00
## Prepare
Install [VSCode](https://code.visualstudio.com/) on your computer. Search `Kendryte` on VSCode Extension Market and install. This development tool only support `Kendryte KD233` board for now.
### MacOS environment
1.Install Homebrew
``` bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
2.Install dependencies
``` bash
brew install libusb mpfr
```
### Linux environment
#### Install dependencies
``` bash
sudo apt install libftdi-dev libhidapi-dev libusb-dev
```
or
``` bash
sudo yum install libftdi hidapi libusb
```
#### Debugger permission
1.Download [60-openocd.rules](https://mirrors-kendryte.s3.cn-northwest-1.amazonaws.com.cn/60-openocd.rules) and put it on `/etc/udev/rules.d`
2.Reload `udev`
``` bash
sudo udevadm control --reload
```
3.Add user to `plugdev` group
``` bash
sudo usermod -aG plugdev $USER
```
2019-12-05 03:33:44 -05:00
## QuickStart
2019-12-04 05:13:03 -05:00
1.Kendryte controller will open after installed, click `Examples` tag to switch to the examples store.
2019-12-05 03:31:45 -05:00
![image](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/resources/readme/en/quick-start/quick-1.png)
2019-12-04 05:13:03 -05:00
2.Select an example and download.
2019-12-05 03:31:45 -05:00
![image](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/resources/readme/en/quick-start/quick-2.png)
2019-12-04 05:13:03 -05:00
3.Click the `build and upload` button for build and upload to board.
2019-12-05 03:31:45 -05:00
![image](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/resources/readme/en/quick-start/quick-3.png)
2019-12-04 05:13:03 -05:00
4.Check the board
2019-12-05 03:33:44 -05:00
## DirectoryStructure
2019-12-04 05:13:03 -05:00
``` Bash
.
2019-12-09 02:24:27 -05:00
├── .vscode # The contents of this directory are automatically generated, include debug option, build commands and extension's config.
├── CMakeLists.txt # This file is automatically generated when build.
2019-12-04 05:13:03 -05:00
├── README.md
2019-12-09 02:24:27 -05:00
├── build # The contents of this directory are compiled product.
2019-12-04 05:13:03 -05:00
│   ├── CMakeCache.txt
│   ├── CMakeFiles
│   ├── Makefile
│   ├── ai_image
│   ├── camera-standalone-driver
│   ├── cmake_install.cmake
│   ├── compile_commands.json
2019-12-09 02:24:27 -05:00
│   ├── ${Project-name} # Target file
│   ├── ${Project-name}.bin # Target file
2019-12-04 05:13:03 -05:00
│   ├── lcd-nt35310-standalone-driver
│   ├── standalone-sdk
│   └── w25qxx-standalone-driver
2019-12-09 02:24:27 -05:00
├── config # The content of this directory include pin definitions and model address assignment. It can be overwrited.
│   ├── device-manager.json # Model address assignment
│   ├── flash-manager.h # Model address assignment
│   ├── flash-manager.json # Model address assignment
│   ├── fpioa-config.c # Pin definitions
│   ├── fpioa-config.h # Pin definitions
2019-12-04 05:13:03 -05:00
│   └── ide-hook-main.c
2019-12-09 02:24:27 -05:00
├── detect.kmodel # Kendryte model file. You can use nncase to convert tensorflow lite model to kmodel.
├── kendryte-package.json # The config file of project. Include project name, source files and so on. It can be overwrited.
├── kendryte_libraries # This directory is dependencies installation directory. All of dependencies will download on this directory. You shouldn't modify the contents of this directory most of the time.
2019-12-04 05:13:03 -05:00
│   ├── ai_image
│   ├── camera-standalone-driver
│   ├── lcd-nt35310-standalone-driver
│   ├── standalone-sdk
│   └── w25qxx-standalone-driver
2019-12-09 02:24:27 -05:00
└──  src # Source files.
2019-12-04 05:13:03 -05:00
  └── main.c
```
## Features
2019-12-05 03:31:45 -05:00
![image](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/resources/readme/en/full-screen.png)
2019-12-04 05:13:03 -05:00
2019-12-05 03:31:45 -05:00
![image](https://raw.githubusercontent.com/kendryte/Kendryte-dev-extension/master/resources/readme/en/status-bar.png)
2019-12-04 05:13:03 -05:00
## Questions
### Windows
1. Q: Openocd report error: libusb_error_not_supported?
A: Please download [Zadig](https://zadig.akeo.ie/) and switch `JLink` driver to `Libusb`
### MacOS
### Linux
1. Q: Openocd report error: libusb_error_access?
2019-12-05 03:31:45 -05:00
A: Please read [Debugger permission](#Debugger\ permission) to get the debugger permission and plug in device again. If you still have this problem, please contact us on [issue](https://github.com/kendryte/Kendryte-dev-extension/issues).
2019-12-04 05:13:03 -05:00
2. Q: Why extension request sudo permission on upload?
A: If current don't have permission to read serialport device, it will request sudo permission. You can also config serialport devices permission by yourself.
2019-12-05 03:31:45 -05:00
## Roadmap
2019-12-08 22:09:55 -05:00
- [x] Release `0.1.0` version. (2019.12.09)
2019-12-05 03:31:45 -05:00
- [ ] Serialport arguments configurable.
- [ ] Move `serialport` and `bindings` lib from `node_modules` to `src`.
- [ ] Webview panel listen to React local development server on development mode.
- [ ] Add pin visual configuration.
2019-12-05 04:20:49 -05:00
- [ ] Add CI/CD
2019-12-05 03:31:45 -05:00
- [ ] Release `0.2.0` version. (2020.02)
- [ ] Support `K510`. (2020 Q2)