Open simple86 opened 2 years ago
Dear @simple86. Many thanks for your report. Do you notice the problem even if you try the test in the folder tests/hello
with make clean all run platform=fpga
?
Dear @simple86. Many thanks for your report. Do you notice the problem even if you try the test in the folder
tests/hello
withmake clean all run platform=fpga
?
Yes. The problem occurs even when running the test hello
.
Ok thanks. Could you also include io=uart
like this make clean all run platform=fpga io=uart
to redirect the prints on uart and then try again with hello
test?
Ok thanks. Could you also include
io=uart
like thismake clean all run platform=fpga io=uart
to redirect the prints on uart and then try again withhello
test?
Thanks. I tried io=uart
just now, but it prints the same log.
Ok good. How did you connect your fpga? did you correctly install openocd on your host machine and use the right cable configurations for openocd?
Ok good. How did you connect your fpga? did you correctly install openocd on your host machine and use the right cable configurations for openocd?
The board is connected by JTAG. I installed riscv-openocd
as the guide of https://github.com/riscv/riscv-openocd. I just don't know how to set cable configurations for openocd. Apology for bothering you, but could you direct me for setting the right configurations? Thanks!
Dear @simple86
Have you followed the guide here: https://github.com/pulp-platform/pulp/tree/master/fpga#fpga to setup your environment? If not, please try doing it and then we will have a look together if you are still stuck
Dear @simple86
Have you followed the guide here: https://github.com/pulp-platform/pulp/tree/master/fpga#fpga to setup your environment? If not, please try doing it and then we will have a look together if you are still stuck
Thanks. I followed the guide and tried again. Now I'm still stuck at the same place.
Here is what I found.
The openocd command is located Line 140 in pulp-sdk/tools/gapy/runner/board/board_runner.py.
There is no openocd/cable
and openocd/script
in self.config
.
90 openocd = self.config.get_str("openocd/path")
91 cable = self.config.get_str('openocd/cable')
92 script = self.config.get_str('openocd/script')
93 binary = self.config.get_str('runner/boot-loader')
140 cmd = "%s -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f %s -f %s -f tcl/jtag_boot_entry.tcl -c 'gap8_jtag_load_binary_and_start \"%s\" elf 0x%x' " % (openocd, cable, script, binary, entry)
Hi @simple86 :smile: Your setup is not entirely clear to me, but I'll try to give some inputs. The openocd configuration file you need to use is here. However, you cannot launch an application directly from the sdk when you are using the fpga. You need:
riscv32-unknown-elf-gdb <path/to/the/binary>
and follow the passages listed hereKeep us updated! :smile:
Hi @simple86 😄 I have not entirely clear your setup, but I'll try to give some inputs. The openocd configuration file you need to use is here. However, you cannot launch an application directly from the sdk when you are using the fpga. You need:
- 1 terminal with openocd up and running
- 1 terminal connected to the screen to see the output of the uart (the default baudrate is 115200)
- 1 terminal from which you launch
riscv32-unknown-elf-gdb <path/to/the/binary>
and follow the passages listed here
Thanks a lot for your guide! It's the very cause that I tried to directly launch an application. However, I'm now having problem connecting the board with the PC host. While connecting it only with a Micro-USB cable from the J2 connector (USB JTAG) on the ZCU102 board to a USB port on the host, I failed to launch openocd and was noticed as following.
Open On-Chip Debugger 0.11.0+dev-02060-g857b5ce (2021-10-19-21:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
DEPRECATED! use 'ftdi device_desc' not 'ftdi_device_desc'
DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'
DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Warn : `riscv set_prefer_sba` is deprecated. Please use `riscv set_mem_access` instead.
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 002b, description 'Olimex OpenOCD JTAG ARM-USB-OCD-H', serial '*' at bus location '*'
Do I need a hardware debugger or adapter (like Olimex ARM-USB-OCD-H, Digilent JTAG-HS2 adapter) as a bridge for connection? Is pulpissimo-zcu102 the proper board specific README file?
Hi @simple86 glad I could help. Yes, we use an Olimex ARM-USB-OCD-H. Indeed, that README is updated.
The application runs well with
platform=gvsoc
, but not when I put it on fpga. I checkout the branch tosup_fpga
. The application was successfully built by$make clean all platform=fpga
. FPGA board zcu102 is connected using JTAG, and the bitstream of pulpemu is flashed into the board. It's the log after I run the command$make run platform=fpga
.The
openocd
command is located in pulp-sdk/tools/gapy/runner/board/board_runner.py.I'm pretty new to FPGA, and it's hard for me to figure out the problem.
Many thanks!