-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SAMD20J18A support #555
base: master
Are you sure you want to change the base?
Changes from all commits
5316edf
d37e970
9b45cfa
a6f7165
07f0252
da90c84
bd55881
ca44022
c86f731
b76a5a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[build] | ||
target = "thumbv6m-none-eabi" | ||
|
||
[target.thumbv6m-none-eabi] | ||
runner = 'arm-none-eabi-gdb -q -x openocd.gdb' | ||
#runner = 'probe-run --chip ATSAMD21G18A' | ||
|
||
rustflags = [ | ||
|
||
# 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", | ||
|
||
"-C", "link-arg=-Tlink.x", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[package] | ||
name = "samd20_xplained_pro" | ||
version = "0.1.0" | ||
authors = ["Kaizen Sparc <[email protected]>"] | ||
description = "Board Support crate for the Microchip SAMD20 Xplained Pro eval board" | ||
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"] | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/atsamd-rs/atsamd" | ||
readme = "README.md" | ||
edition = "2018" | ||
|
||
[dependencies.cortex-m-rt] | ||
version = "0.7" | ||
optional = true | ||
|
||
[dependencies.atsamd-hal] | ||
path = "../../hal" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll want this to be a tier two board, so no path dependency There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I remove the path dependency, it will use the published crate which does not contains the current updates, how should I replace it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, good point... I think we'll need to leave it as a path dependency for now since it's new. Tier one BSPs use path dependencies on the HAL, which means for any HAL change affecting BSPs, all Tier one BSPs must be upgraded in the same PR for CI to pass. Tier two BSPs only rely on released versions of the HAL/PACs, so they can be locked to an older version and updated if someone is interested in doing so. This lowers the burden on maintainers as well as folks looking to change the HAL. See the README for more details. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I understand now. Maybe we can remove the board implementation from this PR, and I open a new PR with it after this one is merged? (If yes, I would probably keep it until the end of the PR for practical reasons and remove it at the end :)) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW, to facilitate development, one option is to use a patch in Cargo.toml . The idea would be to PR the changes that you want to eventually be published, but don't include the patch section which just refers to your local copy of atsamd-rs instead of the one on crates.io . That said, it probably still makes sense to publish the PAC and HAL changes, before a separate PR to add the new boards. |
||
version = "0.14" | ||
default-features = false | ||
|
||
[dev-dependencies] | ||
cortex-m = "0.7" | ||
panic-halt = "0.2" | ||
panic-semihosting = "0.5" | ||
cortex-m-semihosting = "0.3" | ||
cortex-m-rtic = "0.5.1" | ||
|
||
[features] | ||
# ask the HAL to enable atsamd20j support | ||
default = ["rt", "atsamd-hal/samd20j", "atsamd-hal/samd20"] | ||
rt = ["cortex-m-rt", "atsamd-hal/samd20j-rt"] | ||
unproven = ["atsamd-hal/unproven"] | ||
use_semihosting = [] | ||
|
||
# for cargo flash | ||
[package.metadata] | ||
chip = "ATSAMD20J18" | ||
|
||
[[example]] | ||
name = "blinky_basic" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Microchip SAMD20 Xplained Pro | ||
|
||
This crate provides a type-safe API for working with the [Microchip SAMD20 Xplained Pro](https://www.microchip.com/en-us/development-tool/ATSAMD20-XPRO). | ||
|
||
## Examples? | ||
|
||
Check out the repository for examples: | ||
|
||
https://github.com/atsamd-rs/atsamd/tree/master/boards/samd20_xplained_pro/examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: even this is commented out, it's the wrong chip name