File tree Expand file tree Collapse file tree 4 files changed +151
-51
lines changed Expand file tree Collapse file tree 4 files changed +151
-51
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ version = "0.1.2"
11
11
12
12
[dependencies ]
13
13
clap = " 2.14.0"
14
+ either = " 1.0.2"
14
15
inflections = " 1.0.0"
15
16
quote = " 0.3.3"
16
- svd-parser = " 0.1.2 "
17
+ # svd-parser = "0.1.3 "
17
18
syn = " 0.9"
19
+
20
+ [dependencies .svd-parser ]
21
+ git = " https://github.com/japaric/svd"
Original file line number Diff line number Diff line change 2
2
3
3
test_gen () {
4
4
echo ' extern crate volatile_register;' > $td /src/lib.rs
5
- cargo run $flags --release -- -i $td /STM32F30x. svd $1 >> $td /src/lib.rs
5
+ cargo run $flags --release -- -i $td /$ svd $1 >> $td /src/lib.rs
6
6
cargo build $flags --manifest-path $td /Cargo.toml
7
7
}
8
8
@@ -15,11 +15,16 @@ test_mode() {
15
15
https://raw.githubusercontent.com/posborne/cmsis-svd/python-0.4/data/STMicro/STM32F30x.svd \
16
16
> $td /STM32F30x.svd
17
17
18
+ curl -L \
19
+ https://raw.githubusercontent.com/posborne/cmsis-svd/python-0.4/data/Nordic/nrf51.svd \
20
+ > $td /nrf51.svd
21
+
18
22
# test the library
19
23
cargo build $flags
20
24
cargo build $flags --release
21
25
22
26
# test the generated code
27
+ svd=STM32F30x.svd
23
28
test_gen
24
29
test_gen dbgmcu
25
30
test_gen gpioa
@@ -30,6 +35,10 @@ test_mode() {
30
35
test_gen tim2
31
36
test_gen tim3
32
37
test_gen tim6
38
+
39
+ svd=nrf51.svd
40
+ test_gen
41
+ test_gen gpio
33
42
}
34
43
35
44
deploy_mode () {
You can’t perform that action at this time.
0 commit comments