Hi Yann,

Am Sonntag 06 Januar 2013, 22:24:28 schrieb Yann Sionneau:
> From: Yann Sionneau <[email protected]>
> 
> ---
>  cores/lm32/test/Makefile           |   10 +++++++---
>  cores/lm32/test/unittests/Makefile |    4 ++--
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/cores/lm32/test/Makefile b/cores/lm32/test/Makefile
> index 65375f6..6e66de3 100644
> --- a/cores/lm32/test/Makefile
> +++ b/cores/lm32/test/Makefile
> @@ -1,6 +1,10 @@
>  SOURCES=tb_lm32.v lm32_config.v
>  SOURCES+=../rtl/lm32_adder.v ../rtl/lm32_addsub.v ../rtl/lm32_cpu.v
> ../rtl/lm32_dcache.v ../rtl/lm32_debug.v ../rtl/lm32_decoder.v
> ../rtl/lm32_dp_ram.v ../rtl/lm32_icache.v ../rtl/lm32_instruction_unit.v
> ../rtl/lm32_interrupt.v ../rtl/lm32_jtag.v ../rtl/lm32_load_store_unit.v
> ../rtl/lm32_logic_op.v ../rtl/lm32_mc_arithmetic.v
> ../rtl/lm32_multiplier.v ../rtl/lm32_ram.v ../rtl/lm32_shifter.v
> ../rtl/lm32_itlb.v ../rtl/lm32_dtlb.v ../rtl/lm32_top.v
> 
> +CROSS  ?= lm32-elf-
> +CC      = $(CROSS)gcc
> +OBJCOPY = $(CROSS)objcopy
> +
>  all: tb_lm32
> 
>  sim_%: %.vh tb_lm32
> @@ -10,13 +14,13 @@ trace_%: %.vh tb_lm32
>       @vvp tb_lm32 +trace=trace_$*.txt +prog=$<
> 
>  hello_world.elf: crt.S hello_world.c
> -     lm32-elf-gcc -Tlinker.ld -fno-builtin -o $@ $^
> +     $(CC) -Tlinker.ld -fno-builtin -nostdinc -nostdlib -lgcc -o $@ $^
> 
>  pipe1.elf: pipe1.S
> -     lm32-elf-gcc -Tlinker.ld -fno-builtin -o $@ $^
> +     $(CC) -Tlinker.ld -fno-builtin -nostdinc -nostdlib -lgcc -o $@ $^
> 
>  %.vh: %.elf
> -     lm32-elf-objcopy -O verilog $< $@
> +     $(OBJCOPY) -O verilog $< $@

This is partly fixed in the milkymist/lm32 repository. (not the -nostd* 
stuff).

> 
>  clean:
>       rm -f tb_lm32 *.vcd *.elf *.vh trace*.txt
> diff --git a/cores/lm32/test/unittests/Makefile
> b/cores/lm32/test/unittests/Makefile index 7ef9a19..f26c3a1 100644
> --- a/cores/lm32/test/unittests/Makefile
> +++ b/cores/lm32/test/unittests/Makefile
> @@ -1,4 +1,4 @@
> -CROSS=lm32-elf-
> +CROSS  ?= lm32-elf-
> 
>  CC      = $(CROSS)gcc
>  AS      = $(CROSS)as
> @@ -7,7 +7,7 @@ SIZE    = $(CROSS)size
>  LD      = $(CC)
>  OBJCOPY = $(CROSS)objcopy
> 
> -LDFLAGS = -Tlinker.ld
> +LDFLAGS = -Tlinker.ld -nostdinc -nostdlib -lgcc

are you sure about -nostdinc? what about stdarg.h stdint.h etc?

CROSS should be renamed to PREFIX to keep it consistent with the test/Makefile 
(CROSS is used in qemu).

Could you make a new patch based on the github.com/milkymist/lm32 master 
branch?


Sorry for the confusion, i've now added a warning to my old MMU branch and 
removed the mmu-cleanup branch.

-- 
michael
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to