Add new kendryte k210 target definition
Этот коммит содержится в:
родитель
1a6bed3305
коммит
875d36cba0
8 изменённых файлов: 59 добавлений и 4 удалений
2
.gitignore
предоставленный
2
.gitignore
предоставленный
|
@ -11,6 +11,8 @@ src/device/sifive/*.go
|
||||||
src/device/sifive/*.s
|
src/device/sifive/*.s
|
||||||
src/device/stm32/*.go
|
src/device/stm32/*.go
|
||||||
src/device/stm32/*.s
|
src/device/stm32/*.s
|
||||||
|
src/device/kendryte/*.go
|
||||||
|
src/device/kendryte/*.s
|
||||||
vendor
|
vendor
|
||||||
llvm-build
|
llvm-build
|
||||||
llvm-project
|
llvm-project
|
||||||
|
|
2
.gitmodules
предоставленный
2
.gitmodules
предоставленный
|
@ -9,7 +9,7 @@
|
||||||
url = https://github.com/avr-rust/avr-mcu.git
|
url = https://github.com/avr-rust/avr-mcu.git
|
||||||
[submodule "lib/cmsis-svd"]
|
[submodule "lib/cmsis-svd"]
|
||||||
path = 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"]
|
[submodule "lib/compiler-rt"]
|
||||||
path = lib/compiler-rt
|
path = lib/compiler-rt
|
||||||
url = https://github.com/llvm-mirror/compiler-rt.git
|
url = https://github.com/llvm-mirror/compiler-rt.git
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -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
|
@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:
|
gen-device-avr:
|
||||||
$(GO) build -o ./build/gen-device-avr ./tools/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/
|
./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
|
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
|
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/
|
./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
|
GO111MODULE=off $(GO) fmt ./src/device/stm32
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 15b462f152af86f3d15b952e1a5cf1bb9e2693e8
|
Subproject commit a155cfd832c9e6ddf193244d8d90489f4d089cc7
|
|
@ -1,5 +1,19 @@
|
||||||
{
|
{
|
||||||
"inherits": ["riscv32"],
|
"inherits": ["riscv32"],
|
||||||
"features": ["+a", "+c", "+m"],
|
"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
targets/k210.json
Обычный файл
19
targets/k210.json
Обычный файл
|
@ -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
targets/maix-bit-mic.json
Обычный файл
6
targets/maix-bit-mic.json
Обычный файл
|
@ -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
targets/maix-bit-mic.ld
Обычный файл
10
targets/maix-bit-mic.ld
Обычный файл
|
@ -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"
|
Загрузка…
Создание таблицы
Сослаться в новой задаче