1
+ # Alias' for quickly building for different chips or running examples
2
+ # By default we enable
3
+ # - `embassy-time-timg0` as the examples assume we are using this time driver
4
+ # - `embassy-executor-thread` on Xtensa chips to take advantage of the Xtensa specific executor we have in esp-hal
5
+ [alias ]
6
+ esp32 = " run --features esp32 --target xtensa-esp32-none-elf --features esp32-hal/embassy-time-timg0,esp32-hal/embassy-executor-thread"
7
+ esp32s2 = " run --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread"
8
+ esp32s3 = " run --features esp32s3 --target xtensa-esp32s3-none-elf --features esp32s3-hal/embassy-time-timg0,esp32s3-hal/embassy-executor-thread"
9
+ esp32c2 = " run --features esp32c2 --target riscv32imc-unknown-none-elf --features esp32c2-hal/embassy-time-timg0"
10
+ esp32c3 = " run --features esp32c3 --target riscv32imc-unknown-none-elf --features esp32c3-hal/embassy-time-timg0"
11
+ esp32c6 = " run --features esp32c6 --target riscv32imac-unknown-none-elf --features esp32c6-hal/embassy-time-timg0"
12
+
13
+ besp32 = " build --features esp32 --target xtensa-esp32-none-elf --features esp32-hal/embassy-time-timg0,esp32-hal/embassy-executor-thread"
14
+ besp32s2 = " build --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread"
15
+ besp32s3 = " build --features esp32s3 --target xtensa-esp32s3-none-elf --features esp32s3-hal/embassy-time-timg0,esp32s3-hal/embassy-executor-thread"
16
+ besp32c2 = " build --features esp32c2 --target riscv32imc-unknown-none-elf --features esp32c2-hal/embassy-time-timg0"
17
+ besp32c3 = " build --features esp32c3 --target riscv32imc-unknown-none-elf --features esp32c3-hal/embassy-time-timg0"
18
+ besp32c6 = " build --features esp32c6 --target riscv32imac-unknown-none-elf --features esp32c6-hal/embassy-time-timg0"
19
+
1
20
[target .riscv32imc-unknown-none-elf ]
2
21
runner = " espflash flash --monitor"
3
-
4
22
rustflags = [
5
23
" -C" , " link-arg=-Tlinkall.x" ,
6
24
" -C" , " link-arg=-Trom_functions.x" ,
7
25
8
26
" -C" , " force-frame-pointers" ,
9
27
28
+ # Enable the atomic codegen option for RISCV
29
+ " -C" , " target-feature=+a" ,
30
+
10
31
# tell the core library have atomics even though it's not specified in the target definition
11
32
" --cfg" , " target_has_atomic_load_store" ,
12
33
" --cfg" , ' target_has_atomic_load_store="8"' ,
@@ -23,72 +44,49 @@ rustflags = [
23
44
24
45
[target .riscv32imac-unknown-none-elf ]
25
46
runner = " espflash flash --monitor"
26
-
27
47
rustflags = [
28
48
" -C" , " link-arg=-Tlinkall.x" ,
29
49
" -C" , " link-arg=-Trom_functions.x" ,
30
-
31
50
" -C" , " force-frame-pointers" ,
32
-
33
- # tell the core library have atomics even though it's not specified in the target definition
34
- " --cfg" , " target_has_atomic_load_store" ,
35
- " --cfg" , ' target_has_atomic_load_store="8"' ,
36
- " --cfg" , ' target_has_atomic_load_store="16"' ,
37
- " --cfg" , ' target_has_atomic_load_store="32"' ,
38
- " --cfg" , ' target_has_atomic_load_store="ptr"' ,
39
- # enable cas
40
- " --cfg" , " target_has_atomic" ,
41
- " --cfg" , ' target_has_atomic="8"' ,
42
- " --cfg" , ' target_has_atomic="16"' ,
43
- " --cfg" , ' target_has_atomic="32"' ,
44
- " --cfg" , ' target_has_atomic="ptr"' ,
45
51
]
46
52
47
53
[target .xtensa-esp32-none-elf ]
48
54
runner = " espflash flash --monitor"
49
-
50
55
rustflags = [
51
- # "-C", "linker=rust-lld",
52
-
53
56
" -C" , " link-arg=-Tlinkall.x" ,
54
57
" -C" , " link-arg=-Trom_functions.x" ,
55
58
]
56
59
57
60
[target .xtensa-esp32s3-none-elf ]
58
61
runner = " espflash flash --monitor"
59
-
60
62
rustflags = [
61
- # "-C", "linker=rust-lld",
62
-
63
63
" -C" , " link-arg=-Tlinkall.x" ,
64
64
" -C" , " link-arg=-Trom_functions.x" ,
65
-
66
- # for now disable loop optimization
67
- " -C" , " target-feature=-loop" ,
68
65
]
69
66
70
67
[target .xtensa-esp32s2-none-elf ]
71
68
runner = " espflash flash --monitor"
72
-
73
69
rustflags = [
74
- # "-C", "linker=rust-lld",
75
-
76
70
" -C" , " link-arg=-Tlinkall.x" ,
77
71
" -C" , " link-arg=-Trom_functions.x" ,
78
72
79
73
# Enable the atomic codegen option for Xtensa
80
74
" -C" , " target-feature=+s32c1i" ,
81
75
76
+ # tell the core library have atomics even though it's not specified in the target definition
77
+ " --cfg" , " target_has_atomic_load_store" ,
78
+ " --cfg" , ' target_has_atomic_load_store="8"' ,
79
+ " --cfg" , ' target_has_atomic_load_store="16"' ,
80
+ " --cfg" , ' target_has_atomic_load_store="32"' ,
81
+ " --cfg" , ' target_has_atomic_load_store="ptr"' ,
82
82
# Tell the `core` library that we have atomics, even though it's not
83
83
# specified in the target definition
84
+ " --cfg" , ' target_has_atomic' ,
84
85
" --cfg" , ' target_has_atomic="8"' ,
85
86
" --cfg" , ' target_has_atomic="16"' ,
86
87
" --cfg" , ' target_has_atomic="32"' ,
87
88
" --cfg" , ' target_has_atomic="ptr"' ,
88
89
]
89
90
90
- [build ]
91
- target = " riscv32imc-unknown-none-elf"
92
-
93
91
[unstable ]
94
92
build-std = [ " core" ]
0 commit comments