mirror of https://github.com/m-labs/artiq.git
satman: eliminate heap.
This commit is contained in:
parent
46c8afc56c
commit
5d43d457d2
|
@ -247,7 +247,6 @@ dependencies = [
|
||||||
name = "satman"
|
name = "satman"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloc_list 0.0.0",
|
|
||||||
"board 0.0.0",
|
"board 0.0.0",
|
||||||
"board_artiq 0.0.0",
|
"board_artiq 0.0.0",
|
||||||
"build_artiq 0.0.0",
|
"build_artiq 0.0.0",
|
||||||
|
@ -255,7 +254,6 @@ dependencies = [
|
||||||
"drtioaux 0.0.0",
|
"drtioaux 0.0.0",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"logger_artiq 0.0.0",
|
"logger_artiq 0.0.0",
|
||||||
"std_artiq 0.0.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -15,9 +15,7 @@ build_artiq = { path = "../libbuild_artiq" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = { version = "0.4", default-features = false }
|
log = { version = "0.4", default-features = false }
|
||||||
alloc_list = { path = "../liballoc_list" }
|
drtioaux = { path = "../libdrtioaux" }
|
||||||
board = { path = "../libboard", features = ["uart_console"] }
|
board = { path = "../libboard", features = ["uart_console"] }
|
||||||
board_artiq = { path = "../libboard_artiq" }
|
board_artiq = { path = "../libboard_artiq" }
|
||||||
std_artiq = { path = "../libstd_artiq", features = ["alloc"] }
|
|
||||||
logger_artiq = { path = "../liblogger_artiq" }
|
logger_artiq = { path = "../liblogger_artiq" }
|
||||||
drtioaux = { path = "../libdrtioaux" }
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#![feature(lang_items, global_allocator)]
|
#![feature(lang_items, global_allocator)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate alloc_list;
|
|
||||||
extern crate std_artiq as std;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate logger_artiq;
|
extern crate logger_artiq;
|
||||||
|
@ -262,18 +260,9 @@ fn startup() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[global_allocator]
|
|
||||||
static mut ALLOC: alloc_list::ListAlloc = alloc_list::EMPTY;
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn main() -> i32 {
|
pub extern fn main() -> i32 {
|
||||||
unsafe {
|
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];
|
static mut LOG_BUFFER: [u8; 1024] = [0; 1024];
|
||||||
logger_artiq::BufferLogger::new(&mut LOG_BUFFER[..]).register(startup);
|
logger_artiq::BufferLogger::new(&mut LOG_BUFFER[..]).register(startup);
|
||||||
0
|
0
|
||||||
|
|
|
@ -52,11 +52,4 @@ SECTIONS
|
||||||
. += 0x1000;
|
. += 0x1000;
|
||||||
_fstack = . - 4;
|
_fstack = . - 4;
|
||||||
} > main_ram
|
} > main_ram
|
||||||
|
|
||||||
.heap :
|
|
||||||
{
|
|
||||||
_fheap = .;
|
|
||||||
. = ORIGIN(main_ram) + LENGTH(main_ram);
|
|
||||||
_eheap = .;
|
|
||||||
} > main_ram
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue