Skip to content

Commit 44c5646

Browse files
committed
Fix lib.rs libtest linkage
1 parent a9b8534 commit 44c5646

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

testsuite/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name = "testsuite"
44
publish = false
55
version = "0.0.0"
66

7+
[lib]
8+
harness = false
9+
710
[[test]]
811
name = "adc"
912
harness = false

testsuite/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ so that one one pin can confirm the correct behavior of the other pin and the un
1111
peripheral.
1212
*/
1313
#![no_std]
14+
#![cfg_attr(test, no_main)]
1415

1516
use defmt_rtt as _;
1617
use panic_probe as _;
@@ -43,3 +44,8 @@ pub struct CrossSerialPair1<T1, T2>(pub PA2<T1>, pub PB11<T2>);
4344
///
4445
/// This is used for UART, where UART3(TX) is connected to UART2(RX)
4546
pub struct CrossSerialPair2<T1, T2>(pub PB10<T1>, pub PA3<T2>);
47+
48+
#[export_name = "main"]
49+
unsafe extern "C" fn __dummy_entry() -> ! {
50+
defmt_test::export::exit()
51+
}

0 commit comments

Comments
 (0)