diff --git a/finny_nostd_tests/Cargo.toml b/finny_nostd_tests/Cargo.toml index 9b45016..d047925 100644 --- a/finny_nostd_tests/Cargo.toml +++ b/finny_nostd_tests/Cargo.toml @@ -9,7 +9,6 @@ publish = false libc = { version = "0.2", default-features = false } finny = { path = "../finny/", default-features = false } heapless = "0.5.6" -jemallocator = "0.3.0" [profile.dev] panic = "abort" # disable stack unwinding on panic diff --git a/finny_nostd_tests/src/main.rs b/finny_nostd_tests/src/main.rs index 5c3d654..bd34be9 100644 --- a/finny_nostd_tests/src/main.rs +++ b/finny_nostd_tests/src/main.rs @@ -1,22 +1,11 @@ -#![no_std] -#![no_main] - -#[alloc_error_handler] -fn default_handler(layout: core::alloc::Layout) -> ! { - panic!("memory allocation of {} bytes failed", layout.size()) -} - -extern crate jemallocator; - -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; +// disabling until no_std + alloc becomes stable +// #![no_std] use finny::{finny_fsm, FsmFactory, FsmEventQueueArray, inspect::null::InspectNull, FsmTimersNull}; use finny::decl::{FsmBuilder, BuiltFsm}; use heapless::consts::*; -#[no_mangle] -pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize { +pub fn main() { // Since we are passing a C string the final null character is mandatory const HELLO: &'static str = "Hello, world!\n\0"; unsafe { @@ -31,16 +20,8 @@ pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize { let mut fsm = StateMachine::new_with(ctx, queue, inspect, timers).unwrap(); fsm.start().unwrap(); } - - 0 -} - -#[panic_handler] -fn my_panic(_info: &core::panic::PanicInfo) -> ! { - loop {} } - /////////////////////////////////////////////////// #[derive(Debug, Default)]