diff --git a/.cargo/config.toml b/.cargo/config.toml index 8dcb60c..48737ac 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -8,3 +8,21 @@ rustflags = [ [target.aarch64-unknown-linux-gnu] linker = "aarch64-linux-gnu-gcc" + +[target.riscv64gc-unknown-linux-musl] +rustflags = [ + "-C", "target-feature=-crt-static", + "-Clink-args=--sysroot=/sdk/host/riscv64-buildroot-linux-musl/sysroot", + "-L", "./firmware/cviwrapper", + "-L", "./firmware/sts3215", + "-L", "./firmware/tpu-sdk-sg200x/lib", + "-L", "./firmware/duo-sdk/rootfs/usr/lib", + "-L", "./models/tpu-mlir/lib", + "-Clink-arg=-Wl,-rpath,../models/tpu-mlir/lib", + "-Clink-arg=-Wl,-rpath,./firmware/tpu-sdk-sg200x/lib", + "-Clink-arg=-Wl,-rpath,./firmware/duo-sdk/rootfs/lib", + "-Clink-arg=-Wl,-rpath,./tpu-libs", + "-Clink-arg=-Wl,-rpath,./sysroot/lib", + "-Clink-arg=-Wl,-rpath,./sysroot/usr/lib", +] +linker = "/sdk/host/bin/riscv64-buildroot-linux-musl-gcc.br_real"