OpenCores
URL https://opencores.org/ocsvn/potato/potato/trunk

Subversion Repositories potato

[/] [potato/] [trunk/] [Makefile] - Diff between revs 3 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 6
Line 84... Line 84...
        -$(RM) potato.prj
        -$(RM) potato.prj
        for file in $(SOURCE_FILES) $(TESTBENCHES); do \
        for file in $(SOURCE_FILES) $(TESTBENCHES); do \
                echo "vhdl work $$file" >> potato.prj; \
                echo "vhdl work $$file" >> potato.prj; \
        done
        done
 
 
checkout-riscv-tests:
 
        if [ ! -d riscv-tests ]; then \
 
                git clone https://github.com/ucb-bar/riscv-tests.git; \
 
                pushd riscv-tests; \
 
                git submodule update --init --recursive; \
 
                popd; \
 
        else \
 
                pushd riscv-tests; \
 
                git pull; \
 
                popd; \
 
        fi
 
 
 
copy-riscv-tests: checkout-riscv-tests
copy-riscv-tests: checkout-riscv-tests
        for test in $(RISCV_TESTS); do \
        for test in $(RISCV_TESTS); do \
                cp riscv-tests/isa/rv32ui/$$test.S tests; \
                cp riscv-tests/$$test.S tests; \
        done
        done
 
 
compile-tests: copy-riscv-tests
compile-tests: copy-riscv-tests
        test -d tests-build || mkdir tests-build
        test -d tests-build || mkdir tests-build
        for test in $(RISCV_TESTS) $(LOCAL_TESTS); do \
        for test in $(RISCV_TESTS) $(LOCAL_TESTS); do \
                echo "Compiling test $$test..."; \
                echo "Compiling test $$test..."; \
                $(TOOLCHAIN_PREFIX)-gcc -I riscv-tests/env/p -c -I riscv-tests/isa/macros/scalar -m32 -o tests-build/$$test.o tests/$$test.S; \
                $(TOOLCHAIN_PREFIX)-gcc -c -m32 -Iriscv-tests -o tests-build/$$test.o tests/$$test.S; \
                $(TOOLCHAIN_PREFIX)-ld -m elf32lriscv -T tests.ld tests-build/$$test.o -o tests-build/$$test.elf; \
                $(TOOLCHAIN_PREFIX)-ld -m elf32lriscv -T tests.ld tests-build/$$test.o -o tests-build/$$test.elf; \
                scripts/extract_hex.sh tests-build/$$test.elf tests-build/$$test-imem.hex tests-build/$$test-dmem.hex; \
                scripts/extract_hex.sh tests-build/$$test.elf tests-build/$$test-imem.hex tests-build/$$test-dmem.hex; \
        done
        done
 
 
run-tests: potato.prj compile-tests
run-tests: potato.prj compile-tests
Line 140... Line 128...
        for test in $(RISCV_TESTS); do $(RM) tests/$$test.S; done
        for test in $(RISCV_TESTS); do $(RM) tests/$$test.S; done
        -$(RM) -r tests-build
        -$(RM) -r tests-build
        -$(RM) potato.prj
        -$(RM) potato.prj
 
 
distclean: clean
distclean: clean
        -$(RM) -r riscv-tests
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.