Skip to content

Commit f51c06b

Browse files
authored
Merge pull request #206 from japaric/use-extern-macros
replace the macro_reexport feature with use_extern_macros
2 parents 38550c2 + e8be150 commit f51c06b

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

ci/script.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ main() {
3939
echo 'cortex-m-rt = "0.3.0"' >> $td/Cargo.toml
4040
echo 'vcell = "0.1.0"' >> $td/Cargo.toml
4141
echo 'msp430 = "0.1.0"' >> $td/Cargo.toml
42-
echo 'riscv = "0.1.4"' >> $td/Cargo.toml
43-
echo 'riscv-rt = "0.1.3"' >> $td/Cargo.toml
42+
# echo 'riscv = "0.1.4"' >> $td/Cargo.toml
43+
# echo 'riscv-rt = "0.1.3"' >> $td/Cargo.toml
4444
echo '[profile.dev]' >> $td/Cargo.toml
4545
echo 'incremental = false' >> $td/Cargo.toml
4646

@@ -393,9 +393,9 @@ main() {
393393
cd $td &&
394394
curl -LO \
395395
https://github.com/pftbest/msp430g2553/raw/v0.1.0/msp430g2553.svd
396-
cd $td &&
397-
curl -LO \
398-
https://raw.githubusercontent.com/riscv-rust/e310x/master/e310x.svd
396+
# cd $td &&
397+
# curl -LO \
398+
# https://raw.githubusercontent.com/riscv-rust/e310x/master/e310x.svd
399399
)
400400

401401
target/$TARGET/release/svd2rust --target msp430 -i $td/msp430g2553.svd | \
@@ -408,8 +408,8 @@ main() {
408408

409409
cargo check --manifest-path $td/Cargo.toml
410410

411-
target/$TARGET/release/svd2rust --target riscv -i $td/e310x.svd | \
412-
( rustfmt 2>/dev/null > $td/src/lib.rs || true )
411+
# target/$TARGET/release/svd2rust --target riscv -i $td/e310x.svd | \
412+
# ( rustfmt 2>/dev/null > $td/src/lib.rs || true )
413413

414414
cargo check --manifest-path $td/Cargo.toml
415415
;;

ci/svd2rust-regress/src/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4090,8 +4090,8 @@ pub const TESTS: &'static [&'static TestCase] = &[
40904090
mfgr: SiFive,
40914091
chip: "E310x",
40924092
svd_url: Some("https://raw.githubusercontent.com/riscv-rust/e310x/master/e310x.svd"),
4093-
should_pass: true,
4094-
run_when: Always,
4093+
should_pass: false,
4094+
run_when: Never,
40954095
},
40964096
&TestCase {
40974097
arch: Msp430,

src/generate/device.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn render(d: &Device, target: &Target) -> Result<Vec<Tokens>> {
3030
if *target != Target::None {
3131
out.push(quote! {
3232
#![cfg_attr(feature = "rt", feature(global_asm))]
33-
#![cfg_attr(feature = "rt", feature(macro_reexport))]
33+
#![cfg_attr(feature = "rt", feature(use_extern_macros))]
3434
#![cfg_attr(feature = "rt", feature(used))]
3535
});
3636
}
@@ -50,17 +50,19 @@ pub fn render(d: &Device, target: &Target) -> Result<Vec<Tokens>> {
5050
Target::CortexM => {
5151
out.push(quote! {
5252
extern crate cortex_m;
53-
#[macro_reexport(default_handler, exception)]
5453
#[cfg(feature = "rt")]
5554
extern crate cortex_m_rt;
55+
#[cfg(feature = "rt")]
56+
pub use cortex_m_rt::{default_handler, exception};
5657
});
5758
}
5859
Target::Msp430 => {
5960
out.push(quote! {
6061
extern crate msp430;
61-
#[macro_reexport(default_handler)]
6262
#[cfg(feature = "rt")]
6363
extern crate msp430_rt;
64+
#[cfg(feature = "rt")]
65+
pub use msp430_rt::default_handler;
6466
});
6567
}
6668
Target::RISCV => {

0 commit comments

Comments
 (0)