diff --git a/Cargo.toml b/Cargo.toml index b102ce783a..bf8e009bfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,12 @@ required-features = ["timer-queue"] name = "periodic" required-features = ["timer-queue"] +[[example]] +name = "pool" +# this example doesn't need this feature but only works on ARMv7-M +# specifying the feature here avoids compiling this for ARMv6-M +required-features = ["timer-queue"] + [[example]] name = "schedule" required-features = ["timer-queue"] diff --git a/ci/script.sh b/ci/script.sh index 0e350d1ffd..492f33f6bd 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -112,6 +112,7 @@ main() { shared-with-init generics + pool ramfunc ) @@ -121,6 +122,31 @@ main() { continue fi + if [ $ex = pool ]; then + if [ $TARGET != thumbv6m-none-eabi ]; then + local td=$(mktemp -d) + + local features="$nightly,timer-queue" + cargo run --example $ex --target $TARGET --features $features >\ + $td/pool.run + grep 'foo(0x2' $td/pool.run + grep 'bar(0x2' $td/pool.run + arm-none-eabi-objcopy -O ihex target/$TARGET/debug/examples/$ex \ + ci/builds/${ex}_${features/,/_}_debug_1.hex + + cargo run --example $ex --target $TARGET --features $features --release >\ + $td/pool.run + grep 'foo(0x2' $td/pool.run + grep 'bar(0x2' $td/pool.run + arm-none-eabi-objcopy -O ihex target/$TARGET/release/examples/$ex \ + ci/builds/${ex}_${features/,/_}_release_1.hex + + rm -rf $td + fi + + continue + fi + if [ $ex != types ]; then arm_example "run" $ex "debug" "$nightly" "1" arm_example "run" $ex "release" "$nightly" "1" @@ -146,7 +172,7 @@ main() { continue fi - if [ $ex != types ]; then + if [ $ex != types ] && [ $ex != pool ]; then arm_example "build" $ex "debug" "$nightly" "2" cmp ci/builds/${ex}_${nightly/nightly/nightly_}debug_1.hex \ ci/builds/${ex}_${nightly/nightly/nightly_}debug_2.hex