Refine opene906 gdb sample.

This commit is contained in:
colin 2022-02-25 12:24:03 +00:00
parent 65545d5e03
commit e3968e6fa7
3 changed files with 7 additions and 6 deletions

View File

@ -72,7 +72,8 @@ openocd:
# openocd -f riscv.cfg -d3 # openocd -f riscv.cfg -d3
gdb: gdb:
$(GDB_PREFIX) -x gdbinit ./build/$(TEST).bin # $(GDB_PREFIX) -x gdbinit ./build/$(TEST).bin
$(GDB_PREFIX) -x gdbinit ./work/debug.elf
help: help:
@echo Possible targets: verilator help clean all verilator-build program.hex @echo Possible targets: verilator help clean all verilator-build program.hex

View File

@ -32,7 +32,7 @@ module jtagdpi #(
input bit tdo input bit tdo
); );
reg [2:0] plit; reg [1:0] plit;
import "DPI-C" function void jtagdpi_close(input chandle ctx); import "DPI-C" function void jtagdpi_close(input chandle ctx);
@ -49,7 +49,7 @@ module jtagdpi #(
always_ff @(posedge clk_i) plit <= plit + 1'b1; always_ff @(posedge clk_i) plit <= plit + 1'b1;
always_ff @(posedge plit[2], negedge rst_ni) begin always_ff @(posedge plit[1], negedge rst_ni) begin
jtagdpi_tick(ctx, jtag_tck, jtag_tms, jtag_tdi, jtag_trst_n, jtag_srst_n, jtagdpi_tick(ctx, jtag_tck, jtag_tms, jtag_tdi, jtag_trst_n, jtag_srst_n,
jtag_tdo); jtag_tdo);
end end

View File

@ -42,9 +42,9 @@ FLAG_ABI = -mabi=ilp32f
CFLAGS = ${FLAG_MARCH} ${FLAG_ABI} CFLAGS = ${FLAG_MARCH} ${FLAG_ABI}
ifeq (${CASENAME}, coremark) ifeq (${CASENAME}, coremark)
CFLAGS +=-c -v -O3 -funroll-all-loops -fgcse-sm -finline-limit=500 -fno-schedule-insns --param max-rtl-if-conversion-unpredictable-cost=100 -msignedness-cmpiv -fno-code-hoisting -mno-thread-jumps1 -mno-iv-adjust-addr-cost -mno-expand-split-imm -fno-tree-loop-distribution CFLAGS +=-c -v -O3 -g -funroll-all-loops -fgcse-sm -finline-limit=500 -fno-schedule-insns --param max-rtl-if-conversion-unpredictable-cost=100 -msignedness-cmpiv -fno-code-hoisting -mno-thread-jumps1 -mno-iv-adjust-addr-cost -mno-expand-split-imm -fno-tree-loop-distribution
else else
CFLAGS += -c -v -O2 CFLAGS += -c -v -O2 -g
endif endif
LINKFLAGS = -Tlinker.lcf -nostartfiles ${FLAG_MARCH} ${FLAG_ABI} LINKFLAGS = -Tlinker.lcf -nostartfiles ${FLAG_MARCH} ${FLAG_ABI}
@ -105,5 +105,5 @@ all : clean ${FILE}.pat ${FILE}.hex ${FILE}.elf ${FILE}.obj ${FILE}.dis
# clean some medium code and .pat # clean some medium code and .pat
.PHONY :clean .PHONY :clean
clean: clean:
rm -rf *.o *.pat *.obj *.hex *.dis rm -rf *.o *.pat *.obj *.hex *.dis *.elf