-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in progress rust, flashes and LEDs work
- Loading branch information
Showing
12 changed files
with
220 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
[default.general] | ||
chip = "STM32F405RGTx" | ||
|
||
[default.rtt] | ||
enabled = false | ||
|
||
[default.probe] | ||
# USB vendor ID | ||
# usb_vid = "0403" | ||
protocol = "Jtag" | ||
|
||
[default.flashing] | ||
# Whether or not the target should be flashed. | ||
enabled = true | ||
|
||
[default.reset] | ||
# Whether or not the target should be reset. | ||
# When flashing is enabled as well, the target will be reset after flashing regardless of this setting. | ||
enabled = true | ||
# Whether or not the target should be halted after reset. | ||
|
||
|
||
[default.gdb] | ||
# Whether or not a GDB server should be opened after flashing. | ||
enabled = false | ||
|
||
# GDB + RTT | ||
[gdb.gdb] | ||
enabled = true | ||
[gdb.rtt] | ||
enabled = true | ||
[gdb.flashing] | ||
halt_afterwards = true | ||
|
||
# JUST RTT | ||
[with_rtt.rtt] | ||
enabled = true | ||
|
||
# JUST RTT, NO FLASH | ||
[rtt.rtt] | ||
enabled = true | ||
[rtt.flashing] | ||
enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ lib | ||
, stdenv | ||
, rustPlatform | ||
, fetchFromGitHub | ||
, cmake | ||
, gitMinimal | ||
, pkg-config | ||
, libusb1 | ||
, openssl | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "probe-rs-tools"; | ||
version = "0.24.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "probe-rs"; | ||
repo = "probe-rs"; | ||
rev = "b58d8e0a6fd6922044b9be676da6ea42f6018c7a"; | ||
hash = "sha256-LKVxGWD8/NVe0VgpoH4JZ1r01FwJc6P1vS39jnW3KVU="; | ||
}; | ||
|
||
cargoHash = "sha256-REnXGLpIxnHG62Pge37Fnf3ovWJwd2LWjr/RisS+Gog="; | ||
|
||
buildAndTestSubdir = pname; | ||
|
||
nativeBuildInputs = [ | ||
# required by libz-sys, no option for dynamic linking | ||
# https://github.com/rust-lang/libz-sys/issues/158 | ||
cmake | ||
# build.rs fails without git | ||
# https://github.com/probe-rs/probe-rs/pull/2492 | ||
gitMinimal | ||
pkg-config | ||
]; | ||
|
||
buildInputs = [ libusb1 openssl ]; | ||
|
||
checkFlags = [ | ||
# require a physical probe | ||
"--skip=cmd::dap_server::server::debugger::test::attach_request" | ||
"--skip=cmd::dap_server::server::debugger::test::attach_with_flashing" | ||
"--skip=cmd::dap_server::server::debugger::test::launch_and_threads" | ||
"--skip=cmd::dap_server::server::debugger::test::launch_with_config_error" | ||
"--skip=cmd::dap_server::server::debugger::test::test_initalize_request" | ||
"--skip=cmd::dap_server::server::debugger::test::test_launch_and_terminate" | ||
"--skip=cmd::dap_server::server::debugger::test::test_launch_no_probes" | ||
"--skip=cmd::dap_server::server::debugger::test::wrong_request_after_init" | ||
# compiles an image for an embedded target which we do not have a toolchain for | ||
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config" | ||
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config_toml" | ||
# requires other crates in the workspace | ||
"--skip=util::cargo::test::get_binary_artifact" | ||
"--skip=util::cargo::test::library_with_example_specified" | ||
"--skip=util::cargo::test::multiple_binaries_in_crate_select_binary" | ||
"--skip=util::cargo::test::workspace_binary_package" | ||
"--skip=util::cargo::test::workspace_root" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "CLI tool for on-chip debugging and flashing of ARM chips"; | ||
homepage = "https://probe.rs/"; | ||
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/CHANGELOG.md"; | ||
license = with licenses; [ asl20 /* or */ mit ]; | ||
maintainers = with maintainers; [ xgroleau newam ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.