Skip to content

Commit f46cda4

Browse files
authored
Merge pull request #52 from parasyte/fix/undefined-reference-to-panic
Fix linker error: undefined symbol `core::panicking::panic`
2 parents 155da63 + 9f5539c commit f46cda4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ impl Build {
651651
args.push("thumbv7em-none-eabihf");
652652

653653
args.push("-Zbuild-std=core,alloc");
654+
args.push("-Zbuild-std-features=panic_immediate_abort");
654655
}
655656

656657
let envs = if self.device {
@@ -661,6 +662,7 @@ impl Build {
661662
"-Ctarget-cpu=cortex-m7",
662663
"-Clink-args=--emit-relocs",
663664
"-Crelocation-model=pic",
665+
"-Cpanic=abort",
664666
]
665667
.join(" "),
666668
);

0 commit comments

Comments
 (0)