mirror of
https://github.com/marqs85/ossc
synced 2025-06-18 01:09:16 +03:00
add openocd gdb scripts
This commit is contained in:
parent
cc7c4766a5
commit
086c38f24b
23
scripts/openocd_gdb.cfg
Normal file
23
scripts/openocd_gdb.cfg
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
tcl port disabled
|
||||||
|
telnet port disabled
|
||||||
|
|
||||||
|
#source [find interface/jlink.cfg]
|
||||||
|
source [find interface/altera-usb-blaster.cfg]
|
||||||
|
|
||||||
|
set _CHIPNAME EP4CE15E22C8
|
||||||
|
transport select jtag
|
||||||
|
adapter speed 500
|
||||||
|
|
||||||
|
jtag newtap $_CHIPNAME tap -irlen 10 -ircapture 0x01 -irmask 0x3 -expected-id 0x020f20dd
|
||||||
|
|
||||||
|
target create $_CHIPNAME.cpu riscv -chain-position $_CHIPNAME.tap
|
||||||
|
|
||||||
|
riscv set_ir dtmcs 0x00c
|
||||||
|
riscv set_ir dmi 0x00e
|
||||||
|
|
||||||
|
gdb report_data_abort enable
|
||||||
|
gdb report_register_access_error enable
|
||||||
|
|
||||||
|
gdb target_description enable
|
||||||
|
|
||||||
|
init
|
31
scripts/openocd_load.cfg
Normal file
31
scripts/openocd_load.cfg
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
gdb port disabled
|
||||||
|
tcl port disabled
|
||||||
|
telnet port disabled
|
||||||
|
|
||||||
|
#source [find interface/jlink.cfg]
|
||||||
|
source [find interface/altera-usb-blaster.cfg]
|
||||||
|
|
||||||
|
set _CHIPNAME EP4CE15E22C8
|
||||||
|
transport select jtag
|
||||||
|
adapter speed 5000
|
||||||
|
|
||||||
|
jtag newtap $_CHIPNAME tap -irlen 10 -ircapture 0x01 -irmask 0x3 -expected-id 0x020f20dd
|
||||||
|
|
||||||
|
proc set_bscan_checkpos_on_setup {chipname} {
|
||||||
|
intel set_bscan $chipname.pld 1080
|
||||||
|
intel set_check_pos $chipname.pld 409
|
||||||
|
}
|
||||||
|
|
||||||
|
pld create $_CHIPNAME.pld intel -chain-position $_CHIPNAME.tap -family cycloneiv
|
||||||
|
jtag configure $_CHIPNAME.tap -event setup "set_bscan_checkpos_on_setup $_CHIPNAME"
|
||||||
|
target create $_CHIPNAME.target testee -chain-position $_CHIPNAME.tap
|
||||||
|
|
||||||
|
scan_chain
|
||||||
|
|
||||||
|
init
|
||||||
|
|
||||||
|
reset halt
|
||||||
|
|
||||||
|
svf -tap $_CHIPNAME.tap output_files/ossc.svf
|
||||||
|
|
||||||
|
shutdown
|
22
scripts/run.sh
Normal file
22
scripts/run.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
export PATH=$PATH:~/intelFPGA_standard/24.1std/quartus/bin:~/intelFPGA_standard/24.1std/quartus/sopc_builder/bin/:/opt/riscv/bin
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
touch software/sys_controller_bsp/bsp_timestamp
|
||||||
|
|
||||||
|
gcc tools/bin2hex.c -o tools/bin2hex
|
||||||
|
|
||||||
|
cd software/sys_controller
|
||||||
|
make clean
|
||||||
|
make HAS_SH1107=y generate_hex
|
||||||
|
cd -
|
||||||
|
|
||||||
|
quartus_cdb ossc -c ossc --update_mif
|
||||||
|
quartus_asm --read_settings_files=on --write_settings_files=off ossc -c ossc
|
||||||
|
|
||||||
|
quartus_cpf --convert --frequency=2MHz --voltage=3.3V --operation=p output_files/ossc.sof output_files/ossc.svf
|
||||||
|
openocd -f scripts/openocd_load.cfg
|
||||||
|
|
||||||
|
openocd -f scripts/openocd_gdb.cfg
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user