Skip to content

Commit

Permalink
Merge pull request #6 from HaoboGu/feat/ble
Browse files Browse the repository at this point in the history
feat: add experimental BLE support for nrf52840
  • Loading branch information
HaoboGu authored Mar 7, 2024
2 parents 6e7f672 + 83a56c9 commit da18c4c
Show file tree
Hide file tree
Showing 31 changed files with 13,079 additions and 10 deletions.
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@
"cargo",
"check",
"--quiet",
"--message-format=json"
"--message-format=json",
"--all-features"
],
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
"check",
"--quiet",
"--message-format=json",
"--all-features"
],
"rust-analyzer.linkedProjects": [
"rmk/Cargo.toml",
"boards/stm32h7/Cargo.toml",
"boards/stm32f4/Cargo.toml",
"boards/nrf52840/Cargo.toml",
"boards/nrf52840_ble/Cargo.toml",
"boards/rp2040/Cargo.toml"
],
"rust-analyzer.showUnlinkedFileNotification": false,
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Keyboard firmware with layer/dynamic keymap/[vial](https://get.vial.today) suppo
## News

- [2024.03.07] Experimental BLE support for nrf52840 has beed added! Checkout [boards/nrf52840_ble](https://github.com/HaoboGu/rmk/blob/main/boards/nrf52840_ble/src/main.rs) for details.

- [2024.02.18] Version `0.1.4` is just released! This release contains a new [build script](https://github.com/HaoboGu/rmk/blob/main/boards/stm32h7/build.rs) for generating vial config, minor API update and a brand new [user documentation page](https://haobogu.github.io/rmk).

<details>
Expand Down Expand Up @@ -112,7 +114,7 @@ A lot of todos at the list, any contributions are welcomed :)
- [ ] better documentation
- [ ] RGB
- [ ] encoder
- [ ] wireless
- [x] (experimental) wireless
- [ ] default bootloader/DFU
- [ ] a good gui configurator

Expand Down
14 changes: 14 additions & 0 deletions boards/nrf52840/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions boards/nrf52840_ble/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[target.thumbv7m-none-eabi]
# uncomment this to make `cargo run` execute programs on QEMU
# runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"

[target.'cfg(all(target_arch = "arm", target_os = "none"))']
# Have to use simmsb's elf2uf2 fork to flash https://github.com/simmsb/elf2uf2-rs
# runner = "elf2uf2-rs -d"
runner = "probe-rs run --chip nRF52840_xxAA"

rustflags = [
# Previously, the linker arguments --nmagic and -Tlink.x were set here.
# They are now set by build.rs instead. The linker argument can still
# only be set here, if a custom linker is needed.

# By default, the LLD linker is used, which is shipped with the Rust
# toolchain. If you run into problems with LLD, you can switch to the
# GNU linker by uncommenting this line:
# "-C", "linker=arm-none-eabi-ld",

# If you need to link to pre-compiled C libraries provided by a C toolchain
# use GCC as the linker by uncommenting the three lines below:
# "-C", "linker=arm-none-eabi-gcc",
# "-C", "link-arg=-Wl,-Tlink.x",
# "-C", "link-arg=-nostartfiles",
]

[build]
# Pick ONE of these default compilation targets
# 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)
# target = "thumbv8m.base-none-eabi" # Cortex-M23
# target = "thumbv8m.main-none-eabi" # Cortex-M33 (no FPU)
# target = "thumbv8m.main-none-eabihf" # Cortex-M33 (with FPU)

[env]
DEFMT_LOG = "trace"
Loading

0 comments on commit da18c4c

Please sign in to comment.