added freeRTOS on linux build

This commit is contained in:
2024-07-12 16:56:31 +02:00
parent a7336c7f75
commit 976e079d02
16 changed files with 576 additions and 321 deletions

View File

@ -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 🚀");