Add new kendryte k210 target definition

This commit is contained in:
Yannis Huber
2020-06-01 14:44:12 +02:00
committed by Ron Evans
parent 1a6bed3305
commit 875d36cba0
8 changed files with 59 additions and 4 deletions
+2
View File
@@ -11,6 +11,8 @@ src/device/sifive/*.go
src/device/sifive/*.s
src/device/stm32/*.go
src/device/stm32/*.s
src/device/kendryte/*.go
src/device/kendryte/*.s
vendor
llvm-build
llvm-project
+1 -1
View File
@@ -9,7 +9,7 @@
url = https://github.com/avr-rust/avr-mcu.git
[submodule "lib/cmsis-svd"]
path = lib/cmsis-svd
url = https://github.com/posborne/cmsis-svd
url = https://github.com/yannishuber/cmsis-svd
[submodule "lib/compiler-rt"]
path = lib/compiler-rt
url = https://github.com/llvm-mirror/compiler-rt.git
+5 -1
View File
@@ -118,7 +118,7 @@ fmt-check:
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive gen-device-stm32
gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive gen-device-stm32 gen-device-kendryte
gen-device-avr:
$(GO) build -o ./build/gen-device-avr ./tools/gen-device-avr/
@@ -141,6 +141,10 @@ gen-device-sifive: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/posborne/cmsis-svd/tree/master/data/SiFive-Community -interrupts=software lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/
GO111MODULE=off $(GO) fmt ./src/device/sifive
gen-device-kendryte: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/posborne/cmsis-svd/tree/master/data/Kendryte-Community -interrupts=software lib/cmsis-svd/data/Kendryte-Community/ src/device/kendryte/
GO111MODULE=off $(GO) fmt ./src/device/kendryte
gen-device-stm32: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro lib/cmsis-svd/data/STMicro/ src/device/stm32/
GO111MODULE=off $(GO) fmt ./src/device/stm32
+15 -1
View File
@@ -1,5 +1,19 @@
{
"inherits": ["riscv32"],
"features": ["+a", "+c", "+m"],
"build-tags": ["fe310", "sifive"]
"build-tags": ["fe310", "sifive"],
"llvm-target": "riscv32--none",
"cflags": [
"--target=riscv32--none",
"-march=rv32imac",
"-mabi=ilp32",
"-Os",
"-Werror",
"-fno-exceptions", "-fno-unwind-tables",
"-ffunction-sections", "-fdata-sections"
],
"ldflags": [
"-melf32lriscv",
"--gc-sections"
]
}
+19
View File
@@ -0,0 +1,19 @@
{
"inherits": ["riscv"],
"features": ["+a", "+c", "+m", "+f", "+d"],
"build-tags": ["k210", "kendryte"],
"llvm-target": "riscv64--none",
"cflags": [
"--target=riscv64--none",
"-march=rv64gc",
"-mabi=lp64d",
"-Os",
"-Werror",
"-fno-exceptions", "-fno-unwind-tables",
"-ffunction-sections", "-fdata-sections"
],
"ldflags": [
"-melf64lriscv",
"--gc-sections"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"inherits": ["k210"],
"build-tags": ["maix-bit-mic"],
"linkerscript": "targets/maix-bit-mic.ld",
"flash-command": "kflash -p /dev/ttyUSB0 {hex}"
}
+10
View File
@@ -0,0 +1,10 @@
MEMORY
{
FLASH_TEXT (rw) : ORIGIN = 0x80000000, LENGTH = (6 * 1024 * 1024)
RAM (xrw) : ORIGIN = 0x80000000, LENGTH = (6 * 1024 * 1024)
}
_stack_size = 2K;
INCLUDE "targets/riscv.ld"