Add and apply pre-commit config (basic fixers, rustfmt)
This commit is contained in:
parent
713545535e
commit
73e40ace0e
|
@ -3,4 +3,4 @@ target/
|
||||||
**/build
|
**/build
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
itm.fifo
|
itm.fifo
|
||||||
result
|
result
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.6.0
|
||||||
|
hooks:
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-toml
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: no-commit-to-branch
|
||||||
|
args: [--branch, master]
|
||||||
|
- repo: https://github.com/doublify/pre-commit-rust
|
||||||
|
rev: v1.0
|
||||||
|
hooks:
|
||||||
|
- id: fmt
|
||||||
|
entry: cargo +stable fmt
|
||||||
|
name: format rust sources
|
1
LICENSE
1
LICENSE
|
@ -11,4 +11,3 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
14
README.md
14
README.md
|
@ -7,7 +7,7 @@ MQTT-controlled 4-channel DDS signal generator using Urukul, Humpback and STM32
|
||||||
|
|
||||||
## Nix commands
|
## Nix commands
|
||||||
|
|
||||||
Humpback-DDS firmware is packaged using the [Nix](https://nixos.org) Flakes system. Install Nix 2.4+ and enable flakes by adding ``experimental-features = nix-command flakes`` to ``nix.conf`` (e.g. ``~/.config/nix/nix.conf``).
|
Humpback-DDS firmware is packaged using the [Nix](https://nixos.org) Flakes system. Install Nix 2.4+ and enable flakes by adding ``experimental-features = nix-command flakes`` to ``nix.conf`` (e.g. ``~/.config/nix/nix.conf``).
|
||||||
|
|
||||||
Once you have Flakes enabled, you can use ``nix build`` to build the firmware.
|
Once you have Flakes enabled, you can use ``nix build`` to build the firmware.
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ Parameters:
|
||||||
```shell
|
```shell
|
||||||
openocd-flash-customised 192.168.1.200/24 AC:6F:7A:DE:D6:C8 192.168.1.125 "Urukul"
|
openocd-flash-customised 192.168.1.200/24 AC:6F:7A:DE:D6:C8 192.168.1.125 "Urukul"
|
||||||
```
|
```
|
||||||
The device will be named `Urukul`.
|
The device will be named `Urukul`.
|
||||||
It has `192.168.1.200` as IPv4 Address, inside a `/24` network, with `AC:6F:7A:DE:D6:C8` as MAC address.
|
It has `192.168.1.200` as IPv4 Address, inside a `/24` network, with `AC:6F:7A:DE:D6:C8` as MAC address.
|
||||||
It will connect to a MQTT broker at `192.168.1.125:1883`.
|
It will connect to a MQTT broker at `192.168.1.125:1883`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ For example, to publish a local MQTT broker, with the topic of `Foo/Bar` and `Ba
|
||||||
```shell
|
```shell
|
||||||
mosquitto_pub -h localhost -t Foo/Bar -m "Baz"
|
mosquitto_pub -h localhost -t Foo/Bar -m "Baz"
|
||||||
```
|
```
|
||||||
Note that MQTT topics are case-sensitive.
|
Note that MQTT topics are case-sensitive.
|
||||||
Alternatively, the following nix command provided by the shell simplify the syntax.
|
Alternatively, the following nix command provided by the shell simplify the syntax.
|
||||||
```shell
|
```shell
|
||||||
publish-mqtt <topic> <message>
|
publish-mqtt <topic> <message>
|
||||||
|
@ -95,8 +95,8 @@ publish-mqtt Foo/Bar "baz"
|
||||||
```
|
```
|
||||||
|
|
||||||
## List of Commands
|
## List of Commands
|
||||||
All currently supported commands are listed below.
|
All currently supported commands are listed below.
|
||||||
**Note: The following table only lists the subtopic. To make a full topic, add `Urukul/Control/` in front of all subtopics.**
|
**Note: The following table only lists the subtopic. To make a full topic, add `Urukul/Control/` in front of all subtopics.**
|
||||||
### Example: Full topic of Reset command
|
### Example: Full topic of Reset command
|
||||||
```shell
|
```shell
|
||||||
Urukul/Control/Reset
|
Urukul/Control/Reset
|
||||||
|
@ -178,7 +178,7 @@ This sets the attenuation of the channel 0 attenuator to be 20 dB.
|
||||||
```shell
|
```shell
|
||||||
publish-mqtt Urukul/Control/Clock/Source "OSC"
|
publish-mqtt Urukul/Control/Clock/Source "OSC"
|
||||||
```
|
```
|
||||||
This sets the clock source of Urukul to be the internal oscillator.
|
This sets the clock source of Urukul to be the internal oscillator.
|
||||||
(Note: The internal oscillator should have a frequency of 100MHz, though this command does not setup the clock frequency.)
|
(Note: The internal oscillator should have a frequency of 100MHz, though this command does not setup the clock frequency.)
|
||||||
|
|
||||||
3. Clock Frequency Division
|
3. Clock Frequency Division
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -56,13 +56,13 @@
|
||||||
openOCDFlashCustomised = pkgs.writeShellScriptBin "openocd-flash-customised" ''
|
openOCDFlashCustomised = pkgs.writeShellScriptBin "openocd-flash-customised" ''
|
||||||
python3 flash.py $@
|
python3 flash.py $@
|
||||||
openocd -f openocd/openocd.cfg \
|
openocd -f openocd/openocd.cfg \
|
||||||
-c "init
|
-c "init
|
||||||
reset init
|
reset init
|
||||||
halt
|
halt
|
||||||
stm32h7x mass_erase 1
|
stm32h7x mass_erase 1
|
||||||
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
||||||
flash write_image flash_config.bin 0x081e0000 bin
|
flash write_image flash_config.bin 0x081e0000 bin
|
||||||
reset run
|
reset run
|
||||||
shutdown"
|
shutdown"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
version = "0.0.0";
|
version = "0.0.0";
|
||||||
|
|
||||||
src = self;
|
src = self;
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
outputHashes = {
|
outputHashes = {
|
||||||
"SaiTLS-0.1.0" = "sha256-T3hyASQGZAXGLKfOB3mh33VrvRlYSMc1CJdX4XvDFrQ=";
|
"SaiTLS-0.1.0" = "sha256-T3hyASQGZAXGLKfOB3mh33VrvRlYSMc1CJdX4XvDFrQ=";
|
||||||
|
|
2
flash.py
2
flash.py
|
@ -46,4 +46,4 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -16,7 +16,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "gimli",
|
+ "gimli",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "ansi_term"
|
-name = "ansi_term"
|
||||||
-version = "0.10.2"
|
-version = "0.10.2"
|
||||||
|
@ -24,7 +24,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "1.1.0"
|
+version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
|
+checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "atty"
|
-name = "atty"
|
||||||
-version = "0.2.3"
|
-version = "0.2.3"
|
||||||
|
@ -39,7 +39,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "memchr",
|
+ "memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "backtrace"
|
-name = "backtrace"
|
||||||
-version = "0.3.4"
|
-version = "0.3.4"
|
||||||
|
@ -57,7 +57,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "winapi",
|
+ "winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "backtrace-sys"
|
-name = "backtrace-sys"
|
||||||
-version = "0.1.16"
|
-version = "0.1.16"
|
||||||
|
@ -72,7 +72,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "libc",
|
+ "libc",
|
||||||
+ "winapi",
|
+ "winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "bitflags"
|
-name = "bitflags"
|
||||||
-version = "0.7.0"
|
-version = "0.7.0"
|
||||||
|
@ -80,7 +80,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "1.0.0"
|
+version = "1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
+checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "bitflags"
|
-name = "bitflags"
|
||||||
-version = "1.0.1"
|
-version = "1.0.1"
|
||||||
|
@ -96,7 +96,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "object",
|
+ "object",
|
||||||
+ "rustc-demangle",
|
+ "rustc-demangle",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "cc"
|
-name = "cc"
|
||||||
-version = "1.0.3"
|
-version = "1.0.3"
|
||||||
|
@ -104,14 +104,14 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "1.2.1"
|
+version = "1.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
-version = "0.1.2"
|
-version = "0.1.2"
|
||||||
+version = "0.1.10"
|
+version = "0.1.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
-version = "0.4.0"
|
-version = "0.4.0"
|
||||||
|
@ -125,7 +125,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "num-traits",
|
+ "num-traits",
|
||||||
+ "time",
|
+ "time",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
-version = "2.29.0"
|
-version = "2.29.0"
|
||||||
|
@ -157,7 +157,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "unicode-width",
|
+ "unicode-width",
|
||||||
+ "vec_map",
|
+ "vec_map",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "env_logger"
|
name = "env_logger"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
|
@ -169,7 +169,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "log 0.3.9",
|
+ "log 0.3.9",
|
||||||
+ "regex",
|
+ "regex",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "failure"
|
name = "failure"
|
||||||
-version = "0.1.1"
|
-version = "0.1.1"
|
||||||
|
@ -182,7 +182,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "backtrace",
|
+ "backtrace",
|
||||||
+ "failure_derive",
|
+ "failure_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "failure_derive"
|
name = "failure_derive"
|
||||||
-version = "0.1.1"
|
-version = "0.1.1"
|
||||||
|
@ -198,7 +198,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "syn",
|
+ "syn",
|
||||||
+ "synstructure",
|
+ "synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "fuchsia-zircon"
|
-name = "fuchsia-zircon"
|
||||||
-version = "0.2.1"
|
-version = "0.2.1"
|
||||||
|
@ -209,7 +209,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
-]
|
-]
|
||||||
+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "fuchsia-zircon-sys"
|
-name = "fuchsia-zircon-sys"
|
||||||
-version = "0.2.0"
|
-version = "0.2.0"
|
||||||
|
@ -220,7 +220,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
-]
|
-]
|
||||||
+checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
|
+checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "itm"
|
-name = "itm"
|
||||||
-version = "0.3.0"
|
-version = "0.3.0"
|
||||||
|
@ -238,7 +238,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "libc",
|
+ "libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "kernel32-sys"
|
-name = "kernel32-sys"
|
||||||
-version = "0.2.2"
|
-version = "0.2.2"
|
||||||
|
@ -256,21 +256,21 @@ index d18dbe7..c19483d 100644
|
||||||
+ "log 0.3.9",
|
+ "log 0.3.9",
|
||||||
+ "tempdir",
|
+ "tempdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
-version = "1.0.0"
|
-version = "1.0.0"
|
||||||
+version = "1.4.0"
|
+version = "1.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
-version = "0.2.34"
|
-version = "0.2.34"
|
||||||
+version = "0.2.71"
|
+version = "0.2.71"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
|
+checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
-version = "0.3.8"
|
-version = "0.3.8"
|
||||||
|
@ -280,7 +280,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "log 0.4.8",
|
+ "log 0.4.8",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "memchr"
|
-name = "memchr"
|
||||||
-version = "2.0.1"
|
-version = "2.0.1"
|
||||||
|
@ -292,7 +292,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "cfg-if",
|
+ "cfg-if",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "num"
|
-name = "num"
|
||||||
-version = "0.1.41"
|
-version = "0.1.41"
|
||||||
|
@ -312,7 +312,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "adler32",
|
+ "adler32",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
-version = "0.1.35"
|
-version = "0.1.35"
|
||||||
|
@ -324,7 +324,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "autocfg",
|
+ "autocfg",
|
||||||
+ "num-traits",
|
+ "num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "num-iter"
|
-name = "num-iter"
|
||||||
-version = "0.1.34"
|
-version = "0.1.34"
|
||||||
|
@ -337,7 +337,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "autocfg",
|
+ "autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "num-traits"
|
-name = "num-traits"
|
||||||
-version = "0.1.41"
|
-version = "0.1.41"
|
||||||
|
@ -354,7 +354,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "unicode-xid",
|
+ "unicode-xid",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
-version = "0.3.15"
|
-version = "0.3.15"
|
||||||
|
@ -364,7 +364,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "proc-macro2",
|
+ "proc-macro2",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "rand"
|
||||||
-version = "0.3.18"
|
-version = "0.3.18"
|
||||||
|
@ -380,7 +380,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "rdrand",
|
+ "rdrand",
|
||||||
+ "winapi",
|
+ "winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "redox_syscall"
|
-name = "redox_syscall"
|
||||||
-version = "0.1.32"
|
-version = "0.1.32"
|
||||||
|
@ -391,7 +391,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "rand_core 0.4.2",
|
+ "rand_core 0.4.2",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "redox_termios"
|
-name = "redox_termios"
|
||||||
-version = "0.1.1"
|
-version = "0.1.1"
|
||||||
|
@ -409,7 +409,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "rand_core 0.3.1",
|
+ "rand_core 0.3.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
-version = "0.2.3"
|
-version = "0.2.3"
|
||||||
|
@ -428,7 +428,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "thread_local",
|
+ "thread_local",
|
||||||
+ "utf8-ranges",
|
+ "utf8-ranges",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
-version = "0.4.1"
|
-version = "0.4.1"
|
||||||
|
@ -438,7 +438,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "ucd-util",
|
+ "ucd-util",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "rustc-demangle"
|
-name = "rustc-demangle"
|
||||||
-version = "0.1.5"
|
-version = "0.1.5"
|
||||||
|
@ -449,7 +449,7 @@ index d18dbe7..c19483d 100644
|
||||||
+dependencies = [
|
+dependencies = [
|
||||||
+ "winapi",
|
+ "winapi",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "strsim"
|
-name = "strsim"
|
||||||
-version = "0.6.0"
|
-version = "0.6.0"
|
||||||
|
@ -457,7 +457,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "0.1.16"
|
+version = "0.1.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
+checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "syn"
|
-name = "syn"
|
||||||
-version = "0.11.11"
|
-version = "0.11.11"
|
||||||
|
@ -470,7 +470,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
-]
|
-]
|
||||||
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "synom"
|
-name = "synom"
|
||||||
-version = "0.11.3"
|
-version = "0.11.3"
|
||||||
|
@ -484,7 +484,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "quote",
|
+ "quote",
|
||||||
+ "unicode-xid",
|
+ "unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "synstructure"
|
name = "synstructure"
|
||||||
-version = "0.6.1"
|
-version = "0.6.1"
|
||||||
|
@ -499,7 +499,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "syn",
|
+ "syn",
|
||||||
+ "unicode-xid",
|
+ "unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempdir"
|
name = "tempdir"
|
||||||
-version = "0.3.5"
|
-version = "0.3.5"
|
||||||
|
@ -521,7 +521,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "rand",
|
+ "rand",
|
||||||
+ "remove_dir_all",
|
+ "remove_dir_all",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "textwrap"
|
name = "textwrap"
|
||||||
-version = "0.9.0"
|
-version = "0.9.0"
|
||||||
|
@ -532,7 +532,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "unicode-width",
|
+ "unicode-width",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thread_local"
|
name = "thread_local"
|
||||||
-version = "0.3.5"
|
-version = "0.3.5"
|
||||||
|
@ -544,7 +544,7 @@ index d18dbe7..c19483d 100644
|
||||||
- "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
+ "lazy_static",
|
+ "lazy_static",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
-version = "0.1.38"
|
-version = "0.1.38"
|
||||||
|
@ -559,7 +559,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "libc",
|
+ "libc",
|
||||||
+ "winapi",
|
+ "winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "unicode-width"
|
-name = "unicode-width"
|
||||||
-version = "0.1.4"
|
-version = "0.1.4"
|
||||||
|
@ -567,7 +567,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "0.1.8"
|
+version = "0.1.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236"
|
+checksum = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "unicode-xid"
|
-name = "unicode-xid"
|
||||||
-version = "0.0.4"
|
-version = "0.0.4"
|
||||||
|
@ -575,7 +575,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "0.1.7"
|
+version = "0.1.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
+checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "unreachable"
|
-name = "unreachable"
|
||||||
-version = "1.0.0"
|
-version = "1.0.0"
|
||||||
|
@ -586,21 +586,21 @@ index d18dbe7..c19483d 100644
|
||||||
- "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
- "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
-]
|
-]
|
||||||
+checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
+checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "utf8-ranges"
|
name = "utf8-ranges"
|
||||||
-version = "1.0.0"
|
-version = "1.0.0"
|
||||||
+version = "1.0.4"
|
+version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba"
|
+checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vec_map"
|
name = "vec_map"
|
||||||
-version = "0.8.0"
|
-version = "0.8.0"
|
||||||
+version = "0.8.2"
|
+version = "0.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "void"
|
-name = "void"
|
||||||
-version = "1.0.2"
|
-version = "1.0.2"
|
||||||
|
@ -612,7 +612,7 @@ index d18dbe7..c19483d 100644
|
||||||
+ "winapi-i686-pc-windows-gnu",
|
+ "winapi-i686-pc-windows-gnu",
|
||||||
+ "winapi-x86_64-pc-windows-gnu",
|
+ "winapi-x86_64-pc-windows-gnu",
|
||||||
+]
|
+]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "winapi"
|
-name = "winapi"
|
||||||
-version = "0.2.8"
|
-version = "0.2.8"
|
||||||
|
@ -620,7 +620,7 @@ index d18dbe7..c19483d 100644
|
||||||
+version = "0.4.0"
|
+version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "winapi-build"
|
-name = "winapi-build"
|
||||||
-version = "0.1.1"
|
-version = "0.1.1"
|
||||||
|
@ -687,7 +687,7 @@ index 455623a..a002c83 100644
|
||||||
@@ -128,13 +128,13 @@ fn run() -> Result<(), failure::Error> {
|
@@ -128,13 +128,13 @@ fn run() -> Result<(), failure::Error> {
|
||||||
// Unreachable.
|
// Unreachable.
|
||||||
}
|
}
|
||||||
|
|
||||||
-fn open_read(matches: &ArgMatches) -> Result<Box<io::Read + 'static>, io::Error> {
|
-fn open_read(matches: &ArgMatches) -> Result<Box<io::Read + 'static>, io::Error> {
|
||||||
+fn open_read(matches: &ArgMatches) -> Result<Box<dyn io::Read + 'static>, io::Error> {
|
+fn open_read(matches: &ArgMatches) -> Result<Box<dyn io::Read + 'static>, io::Error> {
|
||||||
let path = matches.value_of("file");
|
let path = matches.value_of("file");
|
||||||
|
|
|
@ -3,4 +3,4 @@ reset init
|
||||||
halt
|
halt
|
||||||
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
||||||
reset run
|
reset run
|
||||||
shutdown
|
shutdown
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
source [find interface/stlink.cfg]
|
source [find interface/stlink.cfg]
|
||||||
transport select hla_swd
|
transport select hla_swd
|
||||||
source [find openocd/stm32h7x_dual_bank-itm_fix.cfg]
|
source [find openocd/stm32h7x_dual_bank-itm_fix.cfg]
|
||||||
reset_config srst_only
|
reset_config srst_only
|
||||||
|
|
|
@ -277,4 +277,4 @@ if {[set $_CHIPNAME.USE_CTI]} {
|
||||||
$_CHIPNAME.$cti write INACK 0x01
|
$_CHIPNAME.$cti write INACK 0x01
|
||||||
$_CHIPNAME.$cti write INACK 0x00
|
$_CHIPNAME.$cti write INACK 0x00
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
# STM32H7xxxI 2Mo have a dual bank flash.
|
# STM32H7xxxI 2Mo have a dual bank flash.
|
||||||
set DUAL_BANK 1
|
set DUAL_BANK 1
|
||||||
|
|
||||||
source [find openocd/stm32h7x-itm_fix.cfg]
|
source [find openocd/stm32h7x-itm_fix.cfg]
|
||||||
|
|
Loading…
Reference in New Issue