From ffc81d9b42327e98e066c1b19d47cf60f9eac2ec Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 19 Jul 2023 22:05:40 -0400 Subject: [PATCH] Updated compiler architecture --- firmware/blink/Makefile | 2 +- firmware/blink2/Makefile | 2 +- firmware/gpio_test/Makefile | 2 +- firmware/hello/Makefile | 2 +- firmware/io_config/Makefile | 2 +- firmware_vex/bitbang/Makefile | 2 +- firmware_vex/blink/Makefile | 4 ++-- firmware_vex/counter_proj_example/Makefile | 2 +- firmware_vex/generated/variables.mak | 2 +- firmware_vex/gpio_test/Makefile | 2 +- firmware_vex/io_config/Makefile | 2 +- firmware_vex/matt_test/Makefile | 2 +- firmware_vex/mprj_no_bitbang/Makefile | 2 +- firmware_vex/nucleo/Makefile | 4 ++-- gf180/blink/Makefile | 6 +++--- gf180/generated/variables.mak | 2 +- notebooks/openmpw-bringup-template.ipynb | 4 ++-- stanford/blink/Makefile | 4 ++-- stanford/generated/variables.mak | 2 +- 19 files changed, 25 insertions(+), 25 deletions(-) diff --git a/firmware/blink/Makefile b/firmware/blink/Makefile index d79f054..a8ed24c 100644 --- a/firmware/blink/Makefile +++ b/firmware/blink/Makefile @@ -16,7 +16,7 @@ PATTERN = blink hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../start.s - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -O0 -mabi=ilp32 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -O0 -mabi=ilp32 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D blink.elf > blink.lst %.hex: %.elf diff --git a/firmware/blink2/Makefile b/firmware/blink2/Makefile index 13fe195..55b8471 100644 --- a/firmware/blink2/Makefile +++ b/firmware/blink2/Makefile @@ -30,7 +30,7 @@ all: ${PATTERN:=.hex} hex: ${PATTERN:=.hex} %.elf: %.s $(FIRMWARE_PATH)/sections.lds - ${TOOLCHAIN_PATH}/${GCC_PREFIX}-gcc -O0 -march=rv32i -mabi=ilp32 -Wl,-Bstatic,-T,$(FIRMWARE_PATH)/sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ $< + ${TOOLCHAIN_PATH}/${GCC_PREFIX}-gcc -O0 -march=rv32i_zicsr -mabi=ilp32 -Wl,-Bstatic,-T,$(FIRMWARE_PATH)/sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ $< ${TOOLCHAIN_PATH}/riscv32-unknown-elf-objdump -D blink2.elf > blink2.lst %.hex: %.elf diff --git a/firmware/gpio_test/Makefile b/firmware/gpio_test/Makefile index 8bca714..45e3d80 100644 --- a/firmware/gpio_test/Makefile +++ b/firmware/gpio_test/Makefile @@ -10,7 +10,7 @@ PATTERN = gpio_test hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../start.s ../print_io.c ../print_io.h - $(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< + $(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< ${TOOLCHAIN_PATH}/riscv32-unknown-elf-objdump -D gpio_test.elf > gpio_test.lst %.hex: %.elf diff --git a/firmware/hello/Makefile b/firmware/hello/Makefile index e75a4d9..d40862a 100644 --- a/firmware/hello/Makefile +++ b/firmware/hello/Makefile @@ -11,7 +11,7 @@ hex: ${PATTERN:=.hex} #%.elf: %.c ../sections.lds ../start.s spi_io.c spi_io.h ../print_io.c ../print_io.h %.elf: %.c ../sections.lds ../start.s ../print_io.c ../print_io.h - $(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< + $(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< ${TOOLCHAIN_PATH}/riscv32-unknown-elf-objdump -D hello.elf > hello.lst %.hex: %.elf diff --git a/firmware/io_config/Makefile b/firmware/io_config/Makefile index df80cbc..b16a6b7 100644 --- a/firmware/io_config/Makefile +++ b/firmware/io_config/Makefile @@ -30,7 +30,7 @@ all: ${PATTERN:=.hex} hex: ${PATTERN:=.hex} %.elf: %.s $(FIRMWARE_PATH)/sections.lds - ${TOOLCHAIN_PATH}/${GCC_PREFIX}-gcc -O0 -march=rv32i -mabi=ilp32 -Wl,-Bstatic,-T,$(FIRMWARE_PATH)/sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ $< + ${TOOLCHAIN_PATH}/${GCC_PREFIX}-gcc -O0 -march=rv32i_zicsr -mabi=ilp32 -Wl,-Bstatic,-T,$(FIRMWARE_PATH)/sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ $< ${TOOLCHAIN_PATH}/riscv32-unknown-elf-objdump -D io_config.elf > io_config.lst %.hex: %.elf diff --git a/firmware_vex/bitbang/Makefile b/firmware_vex/bitbang/Makefile index 65ec001..ca87e7f 100644 --- a/firmware_vex/bitbang/Makefile +++ b/firmware_vex/bitbang/Makefile @@ -16,7 +16,7 @@ PATTERN = bitbang hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D bitbang.elf > bitbang.lst %.hex: %.elf diff --git a/firmware_vex/blink/Makefile b/firmware_vex/blink/Makefile index a077ffc..844197a 100644 --- a/firmware_vex/blink/Makefile +++ b/firmware_vex/blink/Makefile @@ -17,8 +17,8 @@ PATTERN = blink hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D blink.elf > blink.lst %.hex: %.elf diff --git a/firmware_vex/counter_proj_example/Makefile b/firmware_vex/counter_proj_example/Makefile index c7d0a3a..58fe7db 100644 --- a/firmware_vex/counter_proj_example/Makefile +++ b/firmware_vex/counter_proj_example/Makefile @@ -28,7 +28,7 @@ check: gpio_config_def.py gpio_config_io.py gpio_config_data.c python3 ../gpio_config/gpio_config_checker.py %.elf: %.c ../sections.lds ../crt0_vex.S gpio_config_data.c - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D $@ > $*.lst %.hex: %.elf diff --git a/firmware_vex/generated/variables.mak b/firmware_vex/generated/variables.mak index a32ca2c..c2c4a72 100644 --- a/firmware_vex/generated/variables.mak +++ b/firmware_vex/generated/variables.mak @@ -4,7 +4,7 @@ LIBS=libc libcompiler_rt libbase libfatfs liblitespi liblitedram libliteeth libl TRIPLE=riscv64-unknown-elf CPU=vexriscv CPUFAMILY=riscv -CPUFLAGS=-march=rv32i -mabi=ilp32 -D__vexriscv__ +CPUFLAGS=-march=rv32i_zicsr -mabi=ilp32 -D__vexriscv__ CPUENDIANNESS=little CLANG=0 CPU_DIRECTORY=/Users/jeffdi/Projects/caravel_mgmt_soc_litex/venv/lib/python3.9/site-packages/litex/soc/cores/cpu/vexriscv diff --git a/firmware_vex/gpio_test/Makefile b/firmware_vex/gpio_test/Makefile index e647326..46765da 100644 --- a/firmware_vex/gpio_test/Makefile +++ b/firmware_vex/gpio_test/Makefile @@ -30,7 +30,7 @@ check: gpio_config_def.py gpio_config_io.py gpio_config_data.c python3 ../gpio_config/gpio_config_checker.py %.elf: %.c ../sections.lds ../crt0_vex.S gpio_config_data.c - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D $@ > $*.lst %.hex: %.elf diff --git a/firmware_vex/io_config/Makefile b/firmware_vex/io_config/Makefile index be7dceb..0a84a94 100644 --- a/firmware_vex/io_config/Makefile +++ b/firmware_vex/io_config/Makefile @@ -16,7 +16,7 @@ PATTERN = io_config hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D io_config.elf > io_config.lst %.hex: %.elf diff --git a/firmware_vex/matt_test/Makefile b/firmware_vex/matt_test/Makefile index 9876eb2..8f8a8bd 100644 --- a/firmware_vex/matt_test/Makefile +++ b/firmware_vex/matt_test/Makefile @@ -27,7 +27,7 @@ check: gpio_config_def.py gpio_config_io.py gpio_config_data.c python3 ../gpio_config/gpio_config_checker.py %.elf: %.c ../sections.lds ../crt0_vex.S gpio_config_data.c - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc $(INCLUDES) -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D $@ > $*.lst %.hex: %.elf diff --git a/firmware_vex/mprj_no_bitbang/Makefile b/firmware_vex/mprj_no_bitbang/Makefile index 5bdd879..2a6d749 100644 --- a/firmware_vex/mprj_no_bitbang/Makefile +++ b/firmware_vex/mprj_no_bitbang/Makefile @@ -16,7 +16,7 @@ PATTERN = mprj_no_bitbang hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-unknown-elf-objdump -D mprj_no_bitbang.elf > mprj_no_bitbang.lst %.hex: %.elf diff --git a/firmware_vex/nucleo/Makefile b/firmware_vex/nucleo/Makefile index 570e973..18e24d6 100644 --- a/firmware_vex/nucleo/Makefile +++ b/firmware_vex/nucleo/Makefile @@ -163,9 +163,9 @@ hex: ${PATTERN:=.hex} # python3 ../gpio_config/gpio_config_builder.py %.elf: %.c ../sections.lds ../crt0_vex.S ./gpio_config_data.c ./send_packet.c - #$(TOOLCHAIN_PATH)riscv32-unknown-linux-gnu-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../gpio_program.c $< + #$(TOOLCHAIN_PATH)riscv32-unknown-linux-gnu-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../gpio_program.c $< - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-objdump -s config_io_o.elf > config_io_o.lst %.hex: %.elf diff --git a/gf180/blink/Makefile b/gf180/blink/Makefile index f92a116..1d1518b 100644 --- a/gf180/blink/Makefile +++ b/gf180/blink/Makefile @@ -18,9 +18,9 @@ PATTERN = blink hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< - #$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< + #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< + #$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-objdump -D blink.elf > blink.lst %.hex: %.elf diff --git a/gf180/generated/variables.mak b/gf180/generated/variables.mak index c902c4d..633d7bf 100755 --- a/gf180/generated/variables.mak +++ b/gf180/generated/variables.mak @@ -4,7 +4,7 @@ LIBS=libc libcompiler_rt libbase libfatfs liblitespi liblitedram libliteeth libl TRIPLE=riscv64-unknown-elf CPU=vexriscv CPUFAMILY=riscv -CPUFLAGS=-march=rv32i -mabi=ilp32 -D__vexriscv__ +CPUFLAGS=-march=rv32i_zicsr -mabi=ilp32 -D__vexriscv__ CPUENDIANNESS=little CLANG=0 CPU_DIRECTORY=/Users/jeffdi/Projects/caravel_mgmt_soc_litex/venv/lib/python3.9/site-packages/litex/soc/cores/cpu/vexriscv diff --git a/notebooks/openmpw-bringup-template.ipynb b/notebooks/openmpw-bringup-template.ipynb index f31ba63..2e0834e 100644 --- a/notebooks/openmpw-bringup-template.ipynb +++ b/notebooks/openmpw-bringup-template.ipynb @@ -420,7 +420,7 @@ "stream_h = 111000000000111100000000011110000000001111000000000111100000000011110000000001111000000000111100000000011110000000001111000000000111100000000011110000000001111000000000111100000000011110000000001111000000000111100000000011100000000011100000000001\n", "stream_l = 000000111100000000111110000000011111000000001111100000000111110000000011111000000001111100000000111110000000011111000000001111100000000111100000000111100000000011100000000011100000000011100000000011100000000011100000000011100000000001100000000001\n", "n_bits = 247\n", - "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-gcc -I/home/proppy/src/github.com/efabless/caravel_board/firmware_vex/gpio_test -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o gpio_test.elf ../crt0_vex.S ../isr.c gpio_test.c\n", + "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-gcc -I/home/proppy/src/github.com/efabless/caravel_board/firmware_vex/gpio_test -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o gpio_test.elf ../crt0_vex.S ../isr.c gpio_test.c\n", "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-objdump -D gpio_test.elf > gpio_test.lst\n", "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-objcopy -O verilog gpio_test.elf gpio_test.hex\n", "sed -i.orig -e 's/@1000/@0000/g' gpio_test.hex\n", @@ -643,7 +643,7 @@ "stream_h = 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100000000011100000000011100000000001\n", "stream_l = 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111100000000111100000000111100000000011100000000011100000000011100000000011100000000011100000000011100000000000000000000000\n", "n_bits = 247\n", - "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-gcc -I/home/proppy/src/github.com/efabless/caravel_board/firmware_vex/gpio_test -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o gpio_test.elf ../crt0_vex.S ../isr.c gpio_test.c\n", + "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-gcc -I/home/proppy/src/github.com/efabless/caravel_board/firmware_vex/gpio_test -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o gpio_test.elf ../crt0_vex.S ../isr.c gpio_test.c\n", "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-objdump -D gpio_test.elf > gpio_test.lst\n", "xpack-riscv-none-elf-gcc-11.3.0-1/bin/riscv-none-elf-objcopy -O verilog gpio_test.elf gpio_test.hex\n", "sed -i.orig -e 's/@1000/@0000/g' gpio_test.hex\n", diff --git a/stanford/blink/Makefile b/stanford/blink/Makefile index 1e15ca4..a36a2bb 100644 --- a/stanford/blink/Makefile +++ b/stanford/blink/Makefile @@ -18,8 +18,8 @@ PATTERN = blink hex: ${PATTERN:=.hex} %.elf: %.c ../sections.lds ../crt0_vex.S - #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< - $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< + #$(TOOLCHAIN_PATH)riscv32-unknown-elf-gcc -O0 -march=rv32i_zicsr -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../start.s ../print_io.c $< + $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i_zicsr -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< ${TOOLCHAIN_PATH}$(TOOLCHAIN_PREFIX)-objdump -D blink.elf > blink.lst %.hex: %.elf diff --git a/stanford/generated/variables.mak b/stanford/generated/variables.mak index a32ca2c..c2c4a72 100644 --- a/stanford/generated/variables.mak +++ b/stanford/generated/variables.mak @@ -4,7 +4,7 @@ LIBS=libc libcompiler_rt libbase libfatfs liblitespi liblitedram libliteeth libl TRIPLE=riscv64-unknown-elf CPU=vexriscv CPUFAMILY=riscv -CPUFLAGS=-march=rv32i -mabi=ilp32 -D__vexriscv__ +CPUFLAGS=-march=rv32i_zicsr -mabi=ilp32 -D__vexriscv__ CPUENDIANNESS=little CLANG=0 CPU_DIRECTORY=/Users/jeffdi/Projects/caravel_mgmt_soc_litex/venv/lib/python3.9/site-packages/litex/soc/cores/cpu/vexriscv