mirror of
https://github.com/laanwj/k210-sdk-stuff.git
synced 2024-11-22 09:26:21 +04:00
doc: Update README.md for running instructions
This commit is contained in:
parent
08cd58654f
commit
578a51a0c1
31
README.md
31
README.md
@ -1,6 +1,9 @@
|
|||||||
Maix Go / K210 stuff
|
Maix Go / K210 stuff
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
Building the C projects
|
||||||
|
-----------------------
|
||||||
|
|
||||||
First, get the Kendryte C toolchain and copy or symlink the contents of the
|
First, get the Kendryte C toolchain and copy or symlink the contents of the
|
||||||
`src/` folder to a checkout of `https://github.com/sipeed/LicheeDan_K210_examples.git`.
|
`src/` folder to a checkout of `https://github.com/sipeed/LicheeDan_K210_examples.git`.
|
||||||
|
|
||||||
@ -15,6 +18,32 @@ You will get 2 files, `build/<ProjectName>` and `build/<ProjectName>.bin`. The f
|
|||||||
is an ELF executable, the latter a raw binary that can be flashed or written to
|
is an ELF executable, the latter a raw binary that can be flashed or written to
|
||||||
0x80000000 in SRAM and directly executed.
|
0x80000000 in SRAM and directly executed.
|
||||||
|
|
||||||
|
Building the Rust projects
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Target configuration is set up in `.cargo/config`, so building is a matter of:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd rust/<name_of_project>
|
||||||
|
cargo build --release
|
||||||
|
```
|
||||||
|
|
||||||
|
This will produce an ELF executable in the workspace's target directory named
|
||||||
|
`rust/target/riscv64gc-unknown-none-elf/release/<name_of_project>`.
|
||||||
|
|
||||||
|
Running ELF
|
||||||
|
-----------
|
||||||
|
|
||||||
|
There is no need anymore to convert to raw binary, as ELF executables can be executed directly on
|
||||||
|
the device (no flashing) using
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kflash.py -t -s -p /dev/ttyUSB1 -B goE "${ELF_NAME}"
|
||||||
|
```
|
||||||
|
|
||||||
|
This works for both the C and Rust-produced executables. It is also possible to upload
|
||||||
|
and run code on the device through JTAG and OpenOCD, but I have never done so myself.
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
==============
|
==============
|
||||||
|
|
||||||
@ -31,6 +60,8 @@ External:
|
|||||||
Projects
|
Projects
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
This is a general random sandbox with silly projects for me to play around with the Maix Go, some are in C and some are in Rust.
|
||||||
|
|
||||||
glyph_mapping
|
glyph_mapping
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user