@@ -25,7 +25,22 @@ riscv-target-parser = { path = "../riscv-target-parser", version = "0.1.0" }
25
25
[dependencies ]
26
26
riscv = { path = " ../riscv" , version = " 0.12.0" }
27
27
riscv-pac = { path = " ../riscv-pac" , version = " 0.2.0" }
28
- riscv-rt-macros = { path = " macros" , version = " 0.2.2" }
28
+
29
+ # For RV32I targets
30
+ [target .'cfg(all(target_arch = "riscv32", riscvi))' .dependencies ]
31
+ riscv-rt-macros = { path = " macros" , version = " 0.3.0" , features = [" riscv32i" ] }
32
+ # For RV32E targets (not that, in case of collision, RV32I has precedence over RV32E)
33
+ [target .'cfg(all(target_arch = "riscv32", not(riscvi), riscve))' .dependencies ]
34
+ riscv-rt-macros = { path = " macros" , version = " 0.3.0" , features = [" riscv32e" ] }
35
+ # For RV64I targets
36
+ [target .'cfg(all(target_arch = "riscv64", riscvi))' .dependencies ]
37
+ riscv-rt-macros = { path = " macros" , version = " 0.3.0" , features = [" riscv64i" ] }
38
+ # For RV64E targets (not that, in case of collision, RV64I has precedence over RV64E)
39
+ [target .'cfg(all(target_arch = "riscv64", not(riscvi), riscve))' .dependencies ]
40
+ riscv-rt-macros = { path = " macros" , version = " 0.3.0" , features = [" riscv64e" ] }
41
+ # For documentations, RV64I is the default
42
+ [target .'cfg(not(any(target_arch = "riscv32", target_arch = "riscv64")))' .dependencies ]
43
+ riscv-rt-macros = { path = " macros" , version = " 0.3.0" , features = [" riscv64i" ] }
29
44
30
45
[dev-dependencies ]
31
46
panic-halt = " 1.0.0"
0 commit comments