Giter VIP home page Giter VIP logo

kendryte_k210_template's Introduction

Kendryte K210 Template

A template for projects based on the Kendryte K210 microcontroller.

This template has been tested with the dev. board SiPEED MAiX BiT (Kendryte K210). The BSP and the RISCV 64bit toolchain is provided by Canaan.

At the moment, the template toolchain only support Windows OS.

Project structure

  • project/cmake : Contains the toolchain (compiler, linker and options definition), the linker script and some project specific cmake variables.

  • project/BSP : Software component containing the basic software package (Kendryte Standalone SDK).

  • project/main.c : The file where the magic happens. After the startup code from the BSP, the system's entry point is defined here.

CMake and Ninja

CMake is a tool for generation and automation of code. The name is an abbreviation of cross platform make. It is a multiplatform, open-source tool that can generate Makefiles (or different build system projects like Ninja) from a simple and more readable configuration file. CMake in a nutshell is a syntax to describe a project and the compiler environment so it can be abstracted from the final build system file (Makefiles, Ninja.build, Eclipse .cproject, etc)

Ninja, in other hand, is a build system tool meant to replace Makefiles. It is focused by design to run as fast as possible. It already knows the number of cores of your machine, so it dynamically decides when and how to parallelize the build process.

Build Process

The build process is pretty straightforward, just create a build folder, invoke CMake over the project folder and then run ninja (I recommend to use Ninja instead of Make).

$ #Assuming you are at the root folder of this repo:
$ mkdir build
$ cd build
$ cmake ../project -GNinja
$ ninja

After the compilation, the artifacts are located at the new build/bin folder. This will generate ELF, S19 and HEX files. You can now load the binary to the microcontroller using OpenOCD and see the leds blinking.

Important!

If you have any comment or question, you can reach me out [email protected]

kendryte_k210_template's People

Contributors

josepablo134 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.