Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharavanth committed Sep 4, 2023
0 parents commit 9af9af3
Show file tree
Hide file tree
Showing 12 changed files with 2,157 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-run --chip STM32F103C8T6"
rustflags = [
"-C", "linker=flip-link",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x",
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
# "-C", "link-arg=--nmagic",
]

[build]
# (`thumbv6m-*` is compatible with all ARM Cortex-M chips but using the right
# target improves performance)
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
target = "thumbv7m-none-eabi" # Cortex-M3
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

[alias]
rb = "run"
rrb = "run --release"
sz = "size --release -- -A"
disasm = "objdump --release -- --disassemble --no-show-raw-insn --print-imm-hex"
bin = "objcopy --release -- -O binary app.bin"
elf-headers = "readobj -- --file-headers"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tests
target
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"rust-analyzer.check.command": "clippy",
// override the default setting (`cargo check --all-targets`) which produces the following error
// "can't find crate for `test`" when the default compilation target is a no_std target
// with these changes RA will call `cargo check --bins` on save
"rust-analyzer.check.allTargets": false,
"rust-analyzer.check.extraArgs": ["--bins"],
"rust-analyzer.cargo.extraEnv": {
"RA_WORKSPACE": "${workspaceFolder}"
},

"rust-analyzer.inlayHints.chainingHints.enable": true,
"rust-analyzer.inlayHints.typeHints.enable": true,
"rust-analyzer.workspace.symbol.search.kind": "only_types",
"rust-analyzer.hover.actions.enable": true,
"workbench.panel.defaultLocation": "right",
"terminal.integrated.defaultProfile.windows": "Git Bash",
"rust-analyzer.linkedProjects": [".\\Cargo.toml"]
}
Loading

0 comments on commit 9af9af3

Please sign in to comment.