From 5d43d457d293b4a6981dfb48fb5f531ec3f8f59a Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 14 May 2018 10:05:02 +0000 Subject: [PATCH] satman: eliminate heap. --- artiq/firmware/Cargo.lock | 2 -- artiq/firmware/satman/Cargo.toml | 4 +--- artiq/firmware/satman/main.rs | 11 ----------- artiq/firmware/satman/satman.ld | 7 ------- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/artiq/firmware/Cargo.lock b/artiq/firmware/Cargo.lock index 95338bef4..ff4780279 100644 --- a/artiq/firmware/Cargo.lock +++ b/artiq/firmware/Cargo.lock @@ -247,7 +247,6 @@ dependencies = [ name = "satman" version = "0.0.0" dependencies = [ - "alloc_list 0.0.0", "board 0.0.0", "board_artiq 0.0.0", "build_artiq 0.0.0", @@ -255,7 +254,6 @@ dependencies = [ "drtioaux 0.0.0", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "logger_artiq 0.0.0", - "std_artiq 0.0.0", ] [[package]] diff --git a/artiq/firmware/satman/Cargo.toml b/artiq/firmware/satman/Cargo.toml index 82db164f9..65f6127b0 100644 --- a/artiq/firmware/satman/Cargo.toml +++ b/artiq/firmware/satman/Cargo.toml @@ -15,9 +15,7 @@ build_artiq = { path = "../libbuild_artiq" } [dependencies] log = { version = "0.4", default-features = false } -alloc_list = { path = "../liballoc_list" } +drtioaux = { path = "../libdrtioaux" } board = { path = "../libboard", features = ["uart_console"] } board_artiq = { path = "../libboard_artiq" } -std_artiq = { path = "../libstd_artiq", features = ["alloc"] } logger_artiq = { path = "../liblogger_artiq" } -drtioaux = { path = "../libdrtioaux" } diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs index 8bcdc0819..5434edc01 100644 --- a/artiq/firmware/satman/main.rs +++ b/artiq/firmware/satman/main.rs @@ -1,8 +1,6 @@ #![feature(lang_items, global_allocator)] #![no_std] -extern crate alloc_list; -extern crate std_artiq as std; #[macro_use] extern crate log; extern crate logger_artiq; @@ -262,18 +260,9 @@ fn startup() { } } -#[global_allocator] -static mut ALLOC: alloc_list::ListAlloc = alloc_list::EMPTY; - #[no_mangle] pub extern fn main() -> i32 { unsafe { - extern { - static mut _fheap: u8; - static mut _eheap: u8; - } - ALLOC.add_range(&mut _fheap, &mut _eheap); - static mut LOG_BUFFER: [u8; 1024] = [0; 1024]; logger_artiq::BufferLogger::new(&mut LOG_BUFFER[..]).register(startup); 0 diff --git a/artiq/firmware/satman/satman.ld b/artiq/firmware/satman/satman.ld index 3766b38d6..efae5d319 100644 --- a/artiq/firmware/satman/satman.ld +++ b/artiq/firmware/satman/satman.ld @@ -52,11 +52,4 @@ SECTIONS . += 0x1000; _fstack = . - 4; } > main_ram - - .heap : - { - _fheap = .; - . = ORIGIN(main_ram) + LENGTH(main_ram); - _eheap = .; - } > main_ram }