diff --git a/targets/fe310.json b/targets/fe310.json index 636b4f2d..bc95e8d4 100644 --- a/targets/fe310.json +++ b/targets/fe310.json @@ -1,19 +1,5 @@ { "inherits": ["riscv32"], "features": ["+a", "+c", "+m"], - "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" - ] + "build-tags": ["fe310", "sifive"] } diff --git a/targets/k210.json b/targets/k210.json index d5772b66..5ddd9dba 100644 --- a/targets/k210.json +++ b/targets/k210.json @@ -1,19 +1,5 @@ { - "inherits": ["riscv"], + "inherits": ["riscv64"], "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" - ] + "build-tags": ["k210", "kendryte"] } diff --git a/targets/maix-bit-mic.json b/targets/maix-bit-mic.json deleted file mode 100644 index 31d6df56..00000000 --- a/targets/maix-bit-mic.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "inherits": ["k210"], - "build-tags": ["maix-bit-mic"], - "linkerscript": "targets/maix-bit-mic.ld", - "flash-command": "kflash -p /dev/ttyUSB0 {hex}" -} diff --git a/targets/maix-bit-mic.ld b/targets/maix-bit-mic.ld deleted file mode 100644 index 733152a2..00000000 --- a/targets/maix-bit-mic.ld +++ /dev/null @@ -1,10 +0,0 @@ - -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" diff --git a/targets/maixbit.json b/targets/maixbit.json new file mode 100644 index 00000000..f0f5e8b2 --- /dev/null +++ b/targets/maixbit.json @@ -0,0 +1,6 @@ +{ + "inherits": ["k210"], + "build-tags": ["maixbit"], + "linkerscript": "targets/maixbit.ld", + "flash-command": "kflash -p /dev/ttyUSB0 {hex}" +} diff --git a/targets/maixbit.ld b/targets/maixbit.ld new file mode 100644 index 00000000..9206809b --- /dev/null +++ b/targets/maixbit.ld @@ -0,0 +1,11 @@ + +MEMORY +{ + RAM (xrw) : ORIGIN = 0xffffffff80000000, LENGTH = 6M +} + +REGION_ALIAS("FLASH_TEXT", RAM); + +_stack_size = 2K; + +INCLUDE "targets/riscv.ld" diff --git a/targets/riscv.json b/targets/riscv.json deleted file mode 100644 index 313aa858..00000000 --- a/targets/riscv.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "goos": "linux", - "goarch": "arm", - "build-tags": ["tinygo.riscv", "baremetal", "linux", "arm"], - "gc": "conservative", - "compiler": "clang", - "linker": "ld.lld", - "rtlib": "compiler-rt", - "libc": "picolibc", - "cflags": [ - "-Os", - "-Werror", - "-fno-exceptions", "-fno-unwind-tables", - "-ffunction-sections", "-fdata-sections" - ], - "ldflags": [ - "--gc-sections" - ], - "extra-files": [ - "src/device/riscv/start.S", - "src/runtime/scheduler_tinygoriscv.S" - ], - "gdb": "riscv64-unknown-elf-gdb" -}