[Bugfix][VTA] PkgConfig cause crash in PYNQ board due to link library (#3257)
authorHua <allenhjiang@outlook.com>
Sat, 1 Jun 2019 02:42:15 +0000 (19:42 -0700)
committerThierry Moreau <moreau@uw.edu>
Sat, 1 Jun 2019 02:42:15 +0000 (21:42 -0500)
* [Bugfix][VTA] PkgConfig cause crash in PYNQ board due to link library
not exist.

Symptom:
When run vta_get_started.py with pynq board, host crash and
complain "cannot find -lsds_lib" and "cannot find -l:libdma.so"

Reproduce:
At pynq board, delete the ./build/vta_config.json, then run rpc
server.
In host machine run vta_get_started.py, issue would reproduce.

Analysis:
This issue caused by 'PkgConfig' function  still using pynq2.1
library which not exist in pynq2.4 anymore, when a "reconfig_runtime"
logic of rpc_server.py get triggered , the compile would failed due to
link library not exist.

Solution:
change the link library to libcma.so.

* [Document Change][VTA] Change pynq version from 2.3 into 2.4.

Issue:
pynq 2.3 image not available anymore from pynq download page and pynq
2.4 is the current latest image which available in the said website, after
verification, currently VTA work good with pynq 2.4 image, hence update
related document from pynq 2.3 to 2.4.

cmake/modules/VTA.cmake
docs/vta/install.md
vta/python/vta/pkg_config.py

index 1adb0aaf387abbbc9350cccf3b119370b5cb8e75..1df6c6676fac6d30da4a368ac866b9cd750df30f 100644 (file)
@@ -55,7 +55,7 @@ elseif(PYTHON)
     set_target_properties(vta PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
   endif(APPLE)
 
-  # PYNQ rules for Pynq v2.3
+  # PYNQ rules for Pynq v2.4
   if(${VTA_TARGET} STREQUAL "pynq")
     find_library(__cma_lib NAMES cma PATH /usr/lib)
     target_link_libraries(vta ${__cma_lib})
index 8fa779a5d5b87d117f924bfaace821688b37d2c1..6c87b4edd288a161ba34e897bae5d6e093814079 100644 (file)
@@ -84,7 +84,7 @@ This guide covers the following themes:
 
 Setup your Pynq board based on the [Pynq board getting started tutorial](http://pynq.readthedocs.io/en/latest/getting_started.html).
 You should follow the instructions up to and including the *Turning On the PYNQ-Z1* step (no need to pursue the tutorial beyond this point).
-* Make sure that you've downloaded the latest Pynq image, [PYNQ-Z1 v2.3](http://www.pynq.io/board.html) (released October 3rd 2018), and have imaged your SD card with it (we recommend the free [Etcher](https://etcher.io/) program).
+* Make sure that you've downloaded the latest Pynq image, [PYNQ-Z1 v2.4](http://www.pynq.io/board.html)(released February 22rd 2019), and have imaged your SD card with it (we recommend the free [Etcher](https://etcher.io/) program).
 * For this test setup, follow the ["Connect to a Computer"](http://pynq.readthedocs.io/en/latest/getting_started.html#connect-to-a-computer) Ethernet setup instructions. To be able to talk to the board, make sure to [assign your computer a static IP address](http://pynq.readthedocs.io/en/latest/appendix.html#assign-your-computer-a-static-ip)
 
 Once the board is powered on and connected to your development machine, try connecting to it to make sure you've properly set up your Pynq board:
index 3b2824765010add2a5738eba20b4812e2661197f..2c30414ace1aa3b5ebe95521f1d22bdbda394e11 100644 (file)
@@ -77,10 +77,9 @@ class PkgConfig(object):
         if self.target == "pynq":
             self.ldflags = [
                 "-L/usr/lib",
-                "-lsds_lib",
                 "-L/opt/python3.6/lib/python3.6/site-packages/pynq/drivers/",
                 "-L/opt/python3.6/lib/python3.6/site-packages/pynq/lib/",
-                "-l:libdma.so"]
+                "-l:libcma.so"]
         else:
             self.ldflags = []