how to compile and run an application for Pulpissinio on FPGA
#1
Hi,
I have generated a Pulpissimo platform bitstream for Xilinx ZCU102 board. Now I am at the stage to compile a "hello world" example to try on the FPGA. I am having two problems here:

1. On the pulpissimo web page, after the instructions on how to create the .c file that includes the baudrate and frequency of the UART and the main() function, it gives instructions on how to compile an application by issuing " make clean all" command, but there is no corresponding Makefile, therefore, I got an error " No targets specified and no makefile found". I did all these in pulp-builder home directory. My questions are: a). is there an existing Makefile that I can borrow to compile my hello.c for RISCV?  b).  If I need to create my own Makefile, do I need to include the boot code? if so where to get the boot code (the same code in sim/boot directory)? It will be nice if there is an example Makefile that I can start with.

2. When I tried to connect to the JTAG interface on the board(JTAG pins are allocated on PMOD) by issuing the openocd command, I got an error saying "embeddedConfusedtartup.tcl:21:Error: Unknown target type riscv". The command I issued: $openocd -f openocd-zcu102-digilent-jtag-hs2.cfg. The screenshot of the error massage and the openocd config file are attached.


Please help!

Thanks,
Mapletree


Attached Files Thumbnail(s)
   

.txt   openocd-zcu102-digilent-jtag-hs2.txt (Size: 667 bytes / Downloads: 3)
Reply
#2
Regarding 1.:

The supported compile flow is using the pulp-sdk.
Reply
#3
Regarding 2:

In order to use openocd with RISCV cores you need the riscv compatible version of openocd. Furthermore you need a specially patched version of openocd in order to communicate with PULPissimo. The right version will be installed automatically together with the pulp-sdk (https://github.com/pulp-platform/pulp-sdk).

After you installed the pulp-sdk you can try the hello world example in the pulp-rt-examples repository (https://github.com/pulp-platform/pulp-rt-examples). These examples also contain the necessary makefile to compile them and may act as a starting point to develop your own software.

Greetings,
Manuel
Reply
#4
Hi Manuel,

Thank you so much for your help! I reinstalled the SDK that provides the right openocd for riscv. now I can run the hello world on my ZCU102 board!

I still have a few questions regarding the pulp tools:

a) regarding pulp-builder and pulp-sdk:

on the pulpissimo platform github page (https://github.com/pulp-platform/pulpissimo), it asks to install the pulp-builder instead of pulp-sdk as software development kit. I actually installed it and used it to build the hello world application running on the pulpissimo RTL simulation platform. However it seems not including the openocd for riscv, and it has a few other differences from the pulp-sdk as well. I am just wondering what are pulp-sdk and pulp-builder for respectively? when should I use pulp-builder and when to use pulp-sdk?

b). Regarding the openocd and the pulp-debug-bridge: is the pulp-debug-bridge required by the openocd? The pulp-debug-bridge was mentioned on the SDK build process web page, and I installed it following the instructions provided on the pulp-debug-bridge web page, but it seems not working for my platform when I tried the plpbridge command, it complained "ImportError: No module named 'bridge'


Thanks,
Mapletree
Reply
#5
(09-17-2019, 04:09 PM)mapletree Wrote: Hi Manuel,

Thank you so much for your help! I reinstalled the SDK that provides the right openocd for riscv. now I can run the hello world on my ZCU102 board!

I still have a few questions regarding the pulp tools:

a) regarding pulp-builder and pulp-sdk:

on the pulpissimo platform github page (https://github.com/pulp-platform/pulpissimo), it asks to install the pulp-builder instead of pulp-sdk as software development kit. I actually installed it and used it to build the hello world application running on the pulpissimo RTL simulation platform. However it seems not including the openocd for riscv, and it has a few other differences from the pulp-sdk as well. I am just wondering what are pulp-sdk and pulp-builder for respectively? when should I use pulp-builder and when to use pulp-sdk?

b). Regarding the openocd and the pulp-debug-bridge: is the pulp-debug-bridge required by the openocd? The pulp-debug-bridge was mentioned on the SDK build process web page, and I installed it following the instructions provided on the pulp-debug-bridge web page, but it seems not working for my platform when I tried the plpbridge command, it complained "ImportError: No module named 'bridge'


Thanks,
Mapletree

Hi Mapletree,

Pulp-builder is a set of script to quickly setup a version of the pulp-sdk that is compatible with the PULPissimo simulation target. In the end it uses the same sdk with a simpler but less feature complete installation flow custom tailored to pulpissimo wheras pulp-sdk can be used with almost all PULP platforms. If you already have the pulp-sdk installed as a standalone you can keep using this one. However it happens from time to time that some new bleeding edge features temporarily breaks compatibility with some platforms. So update with care...

The pulp-debug-bridge mentioned in the sdk was used to communicate with our old legacy debug module in older versions of PULPissimo. It has been superseeded by the new riscv debug spec compliant module. Technically, the old module is still present in the design side-by-side with the new one. While you used the pulp-debug-bridge to connect to the old debug module you now use openocd to communicate with the new one.

Greetings,
Manuel
Reply
#6
(09-19-2019, 11:00 PM)meggiman Wrote:
(09-17-2019, 04:09 PM)mapletree Wrote: Hi Manuel,

Thank you so much for your help! I reinstalled the SDK that provides the right openocd for riscv. now I can run the hello world on my ZCU102 board!

I still have a few questions regarding the pulp tools:

a) regarding pulp-builder and pulp-sdk:

on the pulpissimo platform github page (https://github.com/pulp-platform/pulpissimo), it asks to install the pulp-builder instead of pulp-sdk as software development kit. I actually installed it and used it to build the hello world application running on the pulpissimo RTL simulation platform. However it seems not including the openocd for riscv, and it has a few other differences from the pulp-sdk as well. I am just wondering what are pulp-sdk and pulp-builder for respectively? when should I use pulp-builder and when to use pulp-sdk?

b). Regarding the openocd and the pulp-debug-bridge: is the pulp-debug-bridge required by the openocd? The pulp-debug-bridge was mentioned on the SDK build process web page, and I installed it following the instructions provided on the pulp-debug-bridge web page, but it seems not working for my platform when I tried the plpbridge command, it complained "ImportError: No module named 'bridge'


Thanks,
Mapletree

Hi Mapletree,

Pulp-builder is a set of script to quickly setup a version of the pulp-sdk that is compatible with the PULPissimo simulation target. In the end it uses the same sdk with a simpler but less feature complete installation flow custom tailored to pulpissimo wheras pulp-sdk can be used with almost all PULP platforms. If you already have the pulp-sdk installed as a standalone you can keep using this one. However it happens from time to time that some new bleeding edge features temporarily breaks compatibility with some platforms. So update with care...

The pulp-debug-bridge mentioned in the sdk was used to communicate with our old legacy debug module in older versions of PULPissimo. It has been superseeded by the new riscv debug spec compliant module. Technically, the old module is still present in the design side-by-side with the new one. While you used the pulp-debug-bridge to connect to the old debug module you now use openocd to communicate with the new one.

Greetings,
Manuel

Thanks so much for your reply Manuel! it is clear to me now!

Olive
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)