PIE binaries & fix currupted framebuffer

This commit is contained in:
2025-09-26 20:24:23 -06:00
parent 07b4905a06
commit 180d9e82d2
11 changed files with 223 additions and 131 deletions

View File

@@ -3,7 +3,11 @@ name = "abi_sys"
version = "0.1.0"
edition = "2024"
[features]
defmt = ["dep:defmt"]
[dependencies]
embedded-graphics = "0.8.1"
strum = { version = "0.27.2", default-features = false, features = ["derive"] }
defmt = { version = "0.3", optional = true }
shared = { path = "../shared" }

View File

@@ -9,16 +9,17 @@ use embedded_graphics::{
pixelcolor::{Rgb565, RgbColor},
};
pub use shared::keyboard::{KeyCode, KeyEvent, KeyState, Modifiers};
use strum::EnumIter;
use strum::{EnumCount, EnumIter};
pub type EntryFn = fn();
#[unsafe(no_mangle)]
#[unsafe(link_section = ".user_reloc")]
#[unsafe(link_section = ".syscall_table")]
pub static mut CALL_ABI_TABLE: [usize; CallAbiTable::COUNT] = [0; CallAbiTable::COUNT];
#[repr(usize)]
#[derive(Clone, Copy, EnumIter)]
#[derive(Clone, Copy, EnumIter, EnumCount)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum CallAbiTable {
Print = 0,
Sleep = 1,
@@ -28,10 +29,6 @@ pub enum CallAbiTable {
GenRand = 5,
}
impl CallAbiTable {
pub const COUNT: usize = 6;
}
pub type PrintAbi = extern "Rust" fn(msg: &str);
#[allow(unused)]