forked from ROMEO/obsw
added freeRTOS on linux build
This commit is contained in:
@ -24,7 +24,7 @@ fn panic(panic: &PanicInfo<'_>) -> ! {
|
||||
sifln!("");
|
||||
sif!("in task \"");
|
||||
unsafe {
|
||||
//TODO is from_ptr safe enough?
|
||||
//osal::get_task_name is implemented safely in C, so we trust it
|
||||
let task_name = core::ffi::CStr::from_ptr(osal::get_task_name());
|
||||
let task_name_utf8 = core::str::from_utf8(task_name.to_bytes());
|
||||
match task_name_utf8 {
|
||||
@ -62,6 +62,11 @@ extern "C" fn rust_assert_called(ptr: *const core::ffi::c_char, line: core::ffi:
|
||||
panic!("assertion failed at {file_name}:{}", line);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn rust_alloc_failed(){
|
||||
panic!("allocation failed!");
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn rust_main() {
|
||||
sifln!("Rust startup 🚀");
|
||||
|
Reference in New Issue
Block a user