forked from M-Labs/artiq
1
0
Fork 0

satman: use rust liballoc

This commit is contained in:
Sebastien Bourdeauducq 2017-02-03 12:23:38 +08:00
parent d181989de9
commit f6e9d571c2
2 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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,7 +59,7 @@ pub unsafe extern fn main() -> i32 {
irq::set_ie(true);
uart_init();
alloc_give(&mut _fheap as *mut u8,
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];