add dummy personality funcs

This commit is contained in:
Simon Renblad 2025-01-10 15:46:40 +08:00
parent d622ae26b2
commit a49098b831
2 changed files with 12 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#![feature(alloc_error_handler)]
#![feature(const_btree_new)]
#![feature(panic_info_message)]
#![feature(lang_items)]
#[macro_use]
extern crate alloc;
@ -43,6 +44,11 @@ extern "C" {
static __exceptions_start: u32;
}
// linker may complain about missing rust_eh_personality but it is unused
#[lang = "eh_personality"]
#[allow(unused)]
pub fn dummy_personality() { }
#[cfg(all(feature = "target_kasli_soc", has_virtual_leds))]
async fn io_expanders_service(
i2c_bus: RefCell<&mut libboard_zynq::i2c::I2c>,

View File

@ -1,6 +1,6 @@
#![no_std]
#![no_main]
#![feature(alloc_error_handler, never_type, panic_info_message)]
#![feature(alloc_error_handler, never_type, panic_info_message, lang_items)]
#[macro_use]
extern crate log;
@ -61,6 +61,11 @@ extern "C" {
static __exceptions_start: u32;
}
// linker may complain about missing rust_eh_personality but it is unused
#[lang = "eh_personality"]
#[allow(unused)]
pub fn dummy_personality() { }
fn drtiosat_reset(reset: bool) {
unsafe {
csr::drtiosat::reset_write(if reset { 1 } else { 0 });