-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpre-script.rhai
59 lines (53 loc) · 1.39 KB
/
pre-script.rhai
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
let targets = #{
rp2040: #{
arch: "arm",
rust_target: "thumbv6m-none-eabi",
flash_start: "0x10000100",
flash_size: "2048K - 0x100",
ram_start: "0x20000000",
ram_size: "264K",
probe_chip: "RP2040"
},
nrf52833: #{
arch: "arm",
rust_target: "thumbv7em-none-eabihf",
probe_chip: "nRF52833_xxAA",
flash_start: "0x00000000",
flash_size: "512K",
ram_start: "0x20000000",
ram_size: "128K"
},
nrf52840: #{
arch: "arm",
rust_target: "thumbv7em-none-eabihf",
probe_chip: "nRF52840_xxAA",
flash_start: "0x00000000",
flash_size: "1024K",
ram_start: "0x20000000",
ram_size: "256K"
},
nrf9160: #{
arch: "arm",
rust_target: "thumbv8m.main-none-eabihf",
probe_chip: "nRF9160_xxAA",
flash_start: "0x00000000",
flash_size: "1024K",
ram_start: "0x20010000",
ram_size: "192K",
},
stm32h743zi: #{
arch: "arm",
rust_target: "thumbv7em-none-eabihf",
probe_chip: "STM32743ZI"
},
esp32c3: #{
arch: "riscv",
rust_target: "riscv32imc-unknown-none-elf",
probe_chip: "esp32c3"
},
};
let target = variable::get("chip");
let target_properties = targets.get(target);
for key in target_properties.keys() {
variable::set(key, target_properties.get(key));
}