diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d9424a59381f..aec9ba590a5c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,5 +7,5 @@ - [ ] No new warnings or clippy suggestions have been introduced (see CI or check locally) ## If Adding a new Board - - [ ] Board CI added to `crates.json` - - [ ] Board is properly following "Tier 2" conventions, unless otherwise decided to be "Tier 1" \ No newline at end of file + - [ ] Board `Cargo.toml` includes a `[package.metadata.atsamd.bsp]` with appropriate build and suppport instructions + - [ ] Board is properly following "Tier 2" conventions, unless otherwise decided to be "Tier 1" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000000..c5330f8076fb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +### Adding a new BSP/PAC + +The build and release workflows will automatically recognize any new crate added to the repo, +but you will need to add some metadata to the crates's `Cargo.toml`. + + +```toml +# example of metadata for a BSP +[package.metadata.atsamd] +# also_build (optional): indicate if any additional crates (HAL | PAC | BSP's) should be built +# to properly test this crate +# also_build = ["crate", "crate2"] + +[package.metadata.atsamd.bsp] + +# tier (required) +# see: https://github.com/atsamd-rs/atsamd#how-to-use-a-bsp-ie-getting-started-writing-your-own-code +# for determining what tier your BSP is +tier = 2 + +# build_command (required) +# used to invoke the appropriate build command for the bsp +build_command = "cargo build --examples --features=unproven" + +[package.metadata.atsamd.pac] +# target (required): the build target, used to configure the runner properly +target = "thumbv6m-none-eabi" +# features to build the pac with +features = ["samd21g", "unproven", "usb"] +``` diff --git a/boards/arduino_mkr1000/Cargo.toml b/boards/arduino_mkr1000/Cargo.toml index 317a489a3e9c..42de4e1be32f 100644 --- a/boards/arduino_mkr1000/Cargo.toml +++ b/boards/arduino_mkr1000/Cargo.toml @@ -45,3 +45,8 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21G18A" + +[package.metadata.atsamd.bsp] + +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" diff --git a/boards/arduino_mkrvidor4000/Cargo.toml b/boards/arduino_mkrvidor4000/Cargo.toml index 96fca7385d75..632e59ace6c3 100644 --- a/boards/arduino_mkrvidor4000/Cargo.toml +++ b/boards/arduino_mkrvidor4000/Cargo.toml @@ -37,3 +37,7 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21G18A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" diff --git a/boards/arduino_mkrzero/Cargo.toml b/boards/arduino_mkrzero/Cargo.toml index 7058923df920..fe77bd741185 100644 --- a/boards/arduino_mkrzero/Cargo.toml +++ b/boards/arduino_mkrzero/Cargo.toml @@ -46,6 +46,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/arduino_nano33iot/Cargo.toml b/boards/arduino_nano33iot/Cargo.toml index 818291ea3dbe..c056d1ea9f0f 100644 --- a/boards/arduino_nano33iot/Cargo.toml +++ b/boards/arduino_nano33iot/Cargo.toml @@ -54,6 +54,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/atsame54_xpro/Cargo.toml b/boards/atsame54_xpro/Cargo.toml index 70e98211b20f..86343eeebc27 100644 --- a/boards/atsame54_xpro/Cargo.toml +++ b/boards/atsame54_xpro/Cargo.toml @@ -45,6 +45,10 @@ rt = ["cortex-m-rt", "atsamd-hal/same54p-rt"] unproven = ["atsamd-hal/unproven"] usb = ["atsamd-hal/usb", "usb-device", "usbd-serial"] +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [profile.dev] incremental = false codegen-units = 1 diff --git a/boards/circuit_playground_express/Cargo.toml b/boards/circuit_playground_express/Cargo.toml index 0cfd365d9e68..c87a050d7dd0 100644 --- a/boards/circuit_playground_express/Cargo.toml +++ b/boards/circuit_playground_express/Cargo.toml @@ -33,3 +33,7 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21G18A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/edgebadge/Cargo.toml b/boards/edgebadge/Cargo.toml index cd1a565bd68f..6037f936cb88 100644 --- a/boards/edgebadge/Cargo.toml +++ b/boards/edgebadge/Cargo.toml @@ -69,6 +69,10 @@ opt-level = 's' [package.metadata] chip = "ATSAMD51J19A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "usb_serial" required-features = ["usb"] diff --git a/boards/feather_m0/Cargo.toml b/boards/feather_m0/Cargo.toml index a9c962a523c3..3e25753c22e8 100644 --- a/boards/feather_m0/Cargo.toml +++ b/boards/feather_m0/Cargo.toml @@ -93,6 +93,11 @@ opt-level = "s" [package.metadata] chip = "ATSAMD21G18A" +# for build and release automation +[package.metadata.atsamd.bsp] +tier =1 +build_command = "cargo build --examples --features=unproven,dma,usb,rtic,sdmmc,adalogger" + [[example]] name = "blinky_basic" diff --git a/boards/feather_m4/Cargo.toml b/boards/feather_m4/Cargo.toml index 639f75417051..d96bf3646334 100644 --- a/boards/feather_m4/Cargo.toml +++ b/boards/feather_m4/Cargo.toml @@ -63,6 +63,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD51J19A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "pwm" required-features = ["unproven"] diff --git a/boards/gemma_m0/Cargo.toml b/boards/gemma_m0/Cargo.toml index 93dd7f0ecd35..17be5511e8ec 100644 --- a/boards/gemma_m0/Cargo.toml +++ b/boards/gemma_m0/Cargo.toml @@ -35,3 +35,7 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21E18A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/grand_central_m4/Cargo.toml b/boards/grand_central_m4/Cargo.toml index 9c6e394a87e2..76fc317c6915 100644 --- a/boards/grand_central_m4/Cargo.toml +++ b/boards/grand_central_m4/Cargo.toml @@ -61,6 +61,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD51P20A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/itsybitsy_m0/Cargo.toml b/boards/itsybitsy_m0/Cargo.toml index d4499c9b8791..dde3d208bc45 100644 --- a/boards/itsybitsy_m0/Cargo.toml +++ b/boards/itsybitsy_m0/Cargo.toml @@ -54,6 +54,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/itsybitsy_m4/Cargo.toml b/boards/itsybitsy_m4/Cargo.toml index 812c4cc56d61..1c69725a19b5 100644 --- a/boards/itsybitsy_m4/Cargo.toml +++ b/boards/itsybitsy_m4/Cargo.toml @@ -66,6 +66,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD51G19A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb,use_rtt" + [[example]] name = "blinky_basic" diff --git a/boards/metro_m0/Cargo.toml b/boards/metro_m0/Cargo.toml index f9090a932c1f..932dceee41f9 100644 --- a/boards/metro_m0/Cargo.toml +++ b/boards/metro_m0/Cargo.toml @@ -68,6 +68,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=unproven,usb,rtic" + [[example]] name = "usb_echo" required-features = ["usb", "unproven"] diff --git a/boards/metro_m4/Cargo.toml b/boards/metro_m4/Cargo.toml index fc65909a6759..b353a6675c85 100644 --- a/boards/metro_m4/Cargo.toml +++ b/boards/metro_m4/Cargo.toml @@ -65,6 +65,10 @@ opt-level = 3 [package.metadata] chip = "ATSAMD51J19A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/p1am_100/Cargo.toml b/boards/p1am_100/Cargo.toml index df52305256e4..ab369771bfdb 100644 --- a/boards/p1am_100/Cargo.toml +++ b/boards/p1am_100/Cargo.toml @@ -70,6 +70,10 @@ debug = true lto = true opt-level = "s" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/pfza_proto1/Cargo.toml b/boards/pfza_proto1/Cargo.toml index aa48275ada45..39a62f605c37 100644 --- a/boards/pfza_proto1/Cargo.toml +++ b/boards/pfza_proto1/Cargo.toml @@ -46,3 +46,7 @@ opt-level = "s" # for cargo flash [package.metadata] chip = "ATSAME54P20A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/pygamer/Cargo.toml b/boards/pygamer/Cargo.toml index e896f4f259ed..5d9ce0553200 100644 --- a/boards/pygamer/Cargo.toml +++ b/boards/pygamer/Cargo.toml @@ -77,6 +77,10 @@ opt-level = 's' [package.metadata] chip = "ATSAMD51J19A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=unproven,usb,math" + [[example]] name = "usb_serial" required-features = ["usb"] diff --git a/boards/pyportal/Cargo.toml b/boards/pyportal/Cargo.toml index 0585385c3179..42b9a31b9d22 100644 --- a/boards/pyportal/Cargo.toml +++ b/boards/pyportal/Cargo.toml @@ -56,3 +56,7 @@ opt-level = "s" # for cargo flash [package.metadata] chip = "ATSAMD51J20A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/qt_py_m0/Cargo.toml b/boards/qt_py_m0/Cargo.toml index 57cab447c3bd..da023a2b3462 100644 --- a/boards/qt_py_m0/Cargo.toml +++ b/boards/qt_py_m0/Cargo.toml @@ -32,3 +32,7 @@ rt = ["cortex-m-rt", "atsamd-hal/samd21e-rt"] unproven = ["atsamd-hal/unproven"] use_semihosting = [] usb = ["atsamd-hal/usb", "usb-device", "usbd-serial"] + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" diff --git a/boards/samd11_bare/Cargo.toml b/boards/samd11_bare/Cargo.toml index f2aacdacbfda..c9db295e1056 100644 --- a/boards/samd11_bare/Cargo.toml +++ b/boards/samd11_bare/Cargo.toml @@ -50,6 +50,10 @@ debug = true [package.metadata] chip = "ATSAMD11C14A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=unproven,rt,use_semihosting" + [[example]] name = "adc" required-features = ["unproven", "rt", "use_semihosting"] diff --git a/boards/samd21_mini/Cargo.toml b/boards/samd21_mini/Cargo.toml index f2eea87ebb26..61cb26f440e6 100644 --- a/boards/samd21_mini/Cargo.toml +++ b/boards/samd21_mini/Cargo.toml @@ -38,3 +38,7 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21G18A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/serpente/Cargo.toml b/boards/serpente/Cargo.toml index bde385ad507f..3b74d8843d87 100644 --- a/boards/serpente/Cargo.toml +++ b/boards/serpente/Cargo.toml @@ -36,6 +36,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21E18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" + [[example]] name = "blinky_basic" diff --git a/boards/sodaq_one/Cargo.toml b/boards/sodaq_one/Cargo.toml index dc5bcb5de41e..eaf854040736 100644 --- a/boards/sodaq_one/Cargo.toml +++ b/boards/sodaq_one/Cargo.toml @@ -40,6 +40,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" + [profile.dev] incremental = false codegen-units = 1 diff --git a/boards/sodaq_sara_aff/Cargo.toml b/boards/sodaq_sara_aff/Cargo.toml index 82ed496b211f..a6faf76f2a0c 100644 --- a/boards/sodaq_sara_aff/Cargo.toml +++ b/boards/sodaq_sara_aff/Cargo.toml @@ -35,3 +35,7 @@ use_semihosting = [] # for cargo flash [package.metadata] chip = "ATSAMD21J18A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven" diff --git a/boards/trellis_m4/Cargo.toml b/boards/trellis_m4/Cargo.toml index 2a8259c7a809..6e81bade0564 100644 --- a/boards/trellis_m4/Cargo.toml +++ b/boards/trellis_m4/Cargo.toml @@ -69,6 +69,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD51G19A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=keypad-unproven" + [[example]] name = "neopixel_accel" required-features = ["adxl343"] diff --git a/boards/trinket_m0/Cargo.toml b/boards/trinket_m0/Cargo.toml index 2e85fffd82f6..433fda572b93 100644 --- a/boards/trinket_m0/Cargo.toml +++ b/boards/trinket_m0/Cargo.toml @@ -48,6 +48,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21E18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "blinky_basic" diff --git a/boards/wio_lite_mg126/Cargo.toml b/boards/wio_lite_mg126/Cargo.toml index 2dbf7401483b..404972cb804f 100644 --- a/boards/wio_lite_mg126/Cargo.toml +++ b/boards/wio_lite_mg126/Cargo.toml @@ -57,6 +57,10 @@ use_semihosting = [] [package.metadata] chip = "ATSAMD21G18A" +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=unproven,usb" + [[example]] name = "pwm" required-features = ["unproven"] diff --git a/boards/wio_terminal/Cargo.toml b/boards/wio_terminal/Cargo.toml index 9f173fd44fe3..da0744fc731b 100644 --- a/boards/wio_terminal/Cargo.toml +++ b/boards/wio_terminal/Cargo.toml @@ -73,6 +73,10 @@ opt-level = "s" [package.metadata] chip = "ATSAMD51P19A" +[package.metadata.atsamd.bsp] +tier = 1 +build_command = "cargo build --examples --features=usb" + [[example]] name = "blinky" diff --git a/boards/xiao_m0/Cargo.toml b/boards/xiao_m0/Cargo.toml index 3020dc6bf537..aa19f8a1b11e 100644 --- a/boards/xiao_m0/Cargo.toml +++ b/boards/xiao_m0/Cargo.toml @@ -53,3 +53,7 @@ opt-level = "s" # for cargo flash [package.metadata] chip = "ATSAMD51P19A" + +[package.metadata.atsamd.bsp] +tier = 2 +build_command = "cargo build --examples --features=usb" diff --git a/pac/atsamd11c/Cargo.toml b/pac/atsamd11c/Cargo.toml index d66b35641bcf..4903a71ae27e 100644 --- a/pac/atsamd11c/Cargo.toml +++ b/pac/atsamd11c/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv6m-none-eabi" +features = ["samd11c", "unproven"] diff --git a/pac/atsamd11d/Cargo.toml b/pac/atsamd11d/Cargo.toml index 6dc005ea40b5..4e3cc89622db 100644 --- a/pac/atsamd11d/Cargo.toml +++ b/pac/atsamd11d/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv6m-none-eabi" +features = ["samd11d", "unproven"] diff --git a/pac/atsamd21e/Cargo.toml b/pac/atsamd21e/Cargo.toml index bd6226cbf70c..19e06ecaac60 100644 --- a/pac/atsamd21e/Cargo.toml +++ b/pac/atsamd21e/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv6m-none-eabi" +features = ["samd21e", "unproven", "usb"] diff --git a/pac/atsamd21g/Cargo.toml b/pac/atsamd21g/Cargo.toml index 23026a573633..5e253f6250a1 100644 --- a/pac/atsamd21g/Cargo.toml +++ b/pac/atsamd21g/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv6m-none-eabi" +features = ["samd21g", "unproven", "usb"] diff --git a/pac/atsamd21j/Cargo.toml b/pac/atsamd21j/Cargo.toml index 1acfe83a2180..7b19414d368a 100644 --- a/pac/atsamd21j/Cargo.toml +++ b/pac/atsamd21j/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv6m-none-eabi" +features = ["samd21j", "unproven", "usb"] diff --git a/pac/atsamd51g/Cargo.toml b/pac/atsamd51g/Cargo.toml index f423d312e43c..20d34c40e41a 100644 --- a/pac/atsamd51g/Cargo.toml +++ b/pac/atsamd51g/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv7em-none-eabihf" +features = ["samd51g", "unproven", "usb"] diff --git a/pac/atsamd51j/Cargo.toml b/pac/atsamd51j/Cargo.toml index cc2b4faec449..7389302ffb77 100644 --- a/pac/atsamd51j/Cargo.toml +++ b/pac/atsamd51j/Cargo.toml @@ -19,3 +19,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv7em-none-eabihf" +features = ["samd51j", "unproven", "usb"] diff --git a/pac/atsamd51n/Cargo.toml b/pac/atsamd51n/Cargo.toml index 2f75bda4d60c..ad977b3f3a96 100644 --- a/pac/atsamd51n/Cargo.toml +++ b/pac/atsamd51n/Cargo.toml @@ -23,3 +23,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv7em-none-eabihf" +features = ["samd51n", "unproven", "usb"] diff --git a/pac/atsamd51p/Cargo.toml b/pac/atsamd51p/Cargo.toml index 21afc7263885..3575a6e7689d 100644 --- a/pac/atsamd51p/Cargo.toml +++ b/pac/atsamd51p/Cargo.toml @@ -20,3 +20,7 @@ optional = true [features] rt = ["cortex-m-rt/device"] + +[package.metadata.atsamd.pac] +target = "thumbv7em-none-eabihf" +features = ["samd51p", "unproven", "usb"]