forked from M-Labs/artiq
satman: use rust liballoc
This commit is contained in:
parent
d181989de9
commit
f6e9d571c2
|
@ -7,8 +7,7 @@ RUSTOUT := cargo/or1k-unknown-none/debug
|
|||
|
||||
LDFLAGS += --gc-sections \
|
||||
-L../libcompiler-rt \
|
||||
-L../libbase \
|
||||
-L../liballoc
|
||||
-L../libbase
|
||||
|
||||
all: satman.bin satman.fbi
|
||||
|
||||
|
@ -24,7 +23,7 @@ satman.elf: $(RUSTOUT)/libsatman.a
|
|||
-T $(SATMAN_DIRECTORY)/satman.ld \
|
||||
-o $@ \
|
||||
$^ \
|
||||
-lbase-nofloat -lcompiler-rt -lalloc
|
||||
-lbase-nofloat -lcompiler-rt
|
||||
@chmod -x $@
|
||||
|
||||
%.o: $(SATMAN_DIRECTORY)/%.c
|
||||
|
|
|
@ -49,7 +49,6 @@ extern {
|
|||
fn uart_init();
|
||||
fn uart_isr();
|
||||
|
||||
fn alloc_give(ptr: *mut u8, length: usize);
|
||||
static mut _fheap: u8;
|
||||
static mut _eheap: u8;
|
||||
}
|
||||
|
@ -60,8 +59,8 @@ pub unsafe extern fn main() -> i32 {
|
|||
irq::set_ie(true);
|
||||
uart_init();
|
||||
|
||||
alloc_give(&mut _fheap as *mut u8,
|
||||
&_eheap as *const u8 as usize - &_fheap as *const u8 as usize);
|
||||
alloc_artiq::seed(&mut _fheap as *mut u8,
|
||||
&_eheap as *const u8 as usize - &_fheap as *const u8 as usize);
|
||||
|
||||
static mut LOG_BUFFER: [u8; 65536] = [0; 65536];
|
||||
logger_artiq::BufferLogger::new(&mut LOG_BUFFER[..]).register(startup);
|
||||
|
|
Loading…
Reference in New Issue