Skip to content

Commit 5506be4

Browse files
committed
add arch define
1 parent 8e386f1 commit 5506be4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

platform.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name = K210 Arduino
22
version = 0.1.0
33

4+
# arch
5+
arch = k210
6+
arch_for_c_cpp = K210
7+
48
# Compile variables
59
compiler.path={runtime.tools.riscv64-unknown-elf-gcc.path}/bin/
610
compiler.c.cmd=riscv64-unknown-elf-gcc
@@ -36,9 +40,9 @@ compiler.elf2hex.flags=-R .rel.dyn
3640

3741
compiler.define=-DARDUINO=
3842

39-
compiler.c.extra_flags=-DF_CPU={build.f_cpu} -D{build.board}
43+
compiler.c.extra_flags=-DF_CPU={build.f_cpu} -D{build.board} -D{arch_for_c_cpp} -DARCH={arch_for_c_cpp}
4044
compiler.c.elf.extra_flags=
41-
compiler.cpp.extra_flags=-DF_CPU={build.f_cpu} -D{build.board}
45+
compiler.cpp.extra_flags=-DF_CPU={build.f_cpu} -D{build.board} -D{arch_for_c_cpp} -DARCH={arch_for_c_cpp}
4246
compiler.S.extra_flags=-DF_CPU={build.f_cpu} -D{build.board}
4347
compiler.ar.extra_flags=
4448
compiler.elf2hex.extra_flags=

0 commit comments

Comments
 (0)