Skip to content

Commit 6f6a563

Browse files
authored
Add blinky example for STM32F1 bluepill board (#1007)
Code taken from stm32f3_blinky example with LED port adapted to bluepill board. Port initialization and README from v1 rtic-examples with slight edits.
1 parent 1a12376 commit 6f6a563

File tree

7 files changed

+709
-0
lines changed

7 files changed

+709
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[target.thumbv7m-none-eabi]
2+
# uncomment this to make `cargo run` execute programs on QEMU
3+
# runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
4+
5+
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
6+
# uncomment ONE of these three option to make `cargo run` start a GDB session
7+
# which option to pick depends on your system
8+
# runner = "arm-none-eabi-gdb -q -x openocd.gdb"
9+
# runner = "gdb-multiarch -q -x openocd.gdb"
10+
# runner = "gdb -q -x openocd.gdb"
11+
12+
rustflags = [
13+
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
14+
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
15+
"-C", "link-arg=--nmagic",
16+
17+
# LLD (shipped with the Rust toolchain) is used as the default linker
18+
"-C", "link-arg=-Tlink.x",
19+
20+
# if you run into problems with LLD switch to the GNU linker by commenting out
21+
# this line
22+
# "-C", "linker=arm-none-eabi-ld",
23+
24+
# if you need to link to pre-compiled C libraries provided by a C toolchain
25+
# use GCC as the linker by commenting out both lines above and then
26+
# uncommenting the three lines below
27+
# "-C", "linker=arm-none-eabi-gcc",
28+
# "-C", "link-arg=-Wl,-Tlink.x",
29+
# "-C", "link-arg=-nostartfiles",
30+
]
31+
32+
[build]
33+
# Pick ONE of these compilation targets
34+
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
35+
target = "thumbv7m-none-eabi" # Cortex-M3
36+
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
37+
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
38+
# target = "thumbv8m.base-none-eabi" # Cortex-M23
39+
# target = "thumbv8m.main-none-eabi" # Cortex-M33 (no FPU)
40+
# target = "thumbv8m.main-none-eabihf" # Cortex-M33 (with FPU)

0 commit comments

Comments
 (0)