Skip to content

add travis-ci and bors config #15

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

Merged
merged 13 commits into from
Jul 6, 2019
Merged
3 changes: 3 additions & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
block_labels = [ "S-blocked" ]
delete_merged_branches = true
status = [ "continuous-integration/travis-ci/push" ]
18 changes: 18 additions & 0 deletions .github/force-pac-master.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

git clone https://github.com/stm32-rs/stm32-rs
cd stm32-rs
cargo install --force svd2rust
# cargo install form # not needed here
rustup component add rustfmt
# pip install --user pyyaml # already installed
cd svd
./extract.sh
cd ..
make patch CRATES=stm32h7
make -j$(nproc) svd2rust CRATES=stm32h7
cd ..

sed -i 's|/your/path/here/||' Cargo.toml
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: rust

rust:
- nightly
# - beta
# - stable

cache: cargo

branches:
only:
- staging
- trying
- master

before_script:
- rustup target add thumbv7em-none-eabihf
- ./.github/force-pac-master.sh

env:
- MCU=stm32h742
- MCU=stm32h743
- MCU=stm32h753
- MCU=stm32h750

matrix:
allow_failures:
# - rust: nightly
fast_finish: true

script:
- RUSTFLAGS="-D warnings" cargo build --release --examples --features rt,$MCU

notifications:
email: false
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version = "0.1.0"
authors = ["Andrew Straw <[email protected]>",
"Richard Meadows <[email protected]>",
"Henrik Böving <[email protected]>",
"Jan Adä <[email protected]>"]
"Jan Adä <[email protected]>",
"Robert Jördens <[email protected]>"]
edition = "2018"
categories = ["embedded", "hardware-support", "no-std"]
description = "Peripheral access API for STM32H7 series microcontrollers"
Expand Down
1 change: 0 additions & 1 deletion examples/adc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![no_main]
#![no_std]
#![feature(type_alias_enum_variants)]

extern crate panic_itm;

Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![no_std]
#![allow(non_camel_case_types)]
#![feature(type_alias_enum_variants)]

#[derive(Debug)]
pub enum Never {}
Expand Down Expand Up @@ -64,4 +63,4 @@ pub mod timer;
#[cfg(feature = "device-selected")]
pub mod watchdog;
#[cfg(feature = "device-selected")]
pub mod adc;
pub mod adc;
1 change: 0 additions & 1 deletion src/rcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ impl Rcc {
180..=224 => (4, 2),
_ => (7, 3),
},
_ => (7, 3),
};

let flash = unsafe { &(*FLASH::ptr()) };
Expand Down
7 changes: 6 additions & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ macro_rules! hal {
}
}

#[cfg(any(feature = "stm32h7x3"))]
#[cfg(any(
feature = "stm32h742",
feature = "stm32h743",
feature = "stm32h753",
feature = "stm32h750",
))]
hal! {
TIM1: (tim1, APB2, tim1en, tim1rst, enr, rstr),
TIM2: (tim2, APB1, tim2en, tim2rst, lenr, lrstr),
Expand Down