Running libmetal_amp_demo on Ubuntu 16.04

1,261 views
Skip to first unread message

dobleryan

unread,
Apr 26, 2018, 3:43:04 PM4/26/18
to open-amp
Hello,

I am trying to use libmetal and OpenAMP on an Ultrazed-EG board running Ubuntu 16.04. A linux master runs on the A-53 core and ultimately I will be looking to communicate with the R5 core. For now though, I am just trying to run some of the prepackaged demo applications. 

I have cloned the libmetal source and ran the build. After doing a "make install", I have done a "make all" and "make examples/" from the /libmetal/ directory. Both commands completed without errors, but there are no executable files produced in the examples/ directory. More specifically, I am looking to run libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo. 

Is the build process supposed to create executables in this directory? Or is there a part of the environmental setup that I am missing? I have not been able to find a ton of guidelines on porting libmetal or openamp to a linux environment  without using yocto or petalinux. 

Any support is much appreciated,

Ryan

Jiaying Liang

unread,
Apr 26, 2018, 6:50:50 PM4/26/18
to open...@googlegroups.com

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of dobleryan
Sent: Thursday, April 26, 2018 12:43 PM
To: open-amp <open...@googlegroups.com>
Subject: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

 

Hello,

 

I am trying to use libmetal and OpenAMP on an Ultrazed-EG board running Ubuntu 16.04. A linux master runs on the A-53 core and ultimately I will be looking to communicate with the R5 core. For now though, I am just trying to run some of the prepackaged demo applications. 

 

I have cloned the libmetal source and ran the build. After doing a "make install", I have done a "make all" and "make examples/" from the /libmetal/ directory. Both commands completed without errors, but there are no executable files produced in the examples/ directory. More specifically, I am looking to run libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo. 

 

[Wendy] you will need to use cmake to build it. the README on the libmetal and OpenAMP repo gives the instructions.

However, as you building application for R5 on Zynq UltraScale+ MPSoC. You will need to get some Xilinx library from Xilinx SDK.

It will be much easier if you can install XSDK 2018.1 and follow this document https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug1186-zynq-openamp-gsg.pdf to build the firmware.

 

In order for Linux runs on A53 to talk to RPU, you will need to update your device tree. You can also refer to the document in the above link

 

Is the build process supposed to create executables in this directory? Or is there a part of the environmental setup that I am missing? I have not been able to find a ton of guidelines on porting libmetal or openamp to a linux environment  without using yocto or petalinux. 

[Wendy] If you just want to try OpenAMP on the Linux host, that is communications between the two Linux processes with OpenAMP, you can follow README https://github.com/OpenAMP/open-amp/blob/master/README.md

But if you want to try Linux on APU to RPU, you can follow UG1186, you will need to use Xilinx kernel, https://github.com/Xilinx/linux-xlnx/tree/xilinx-v2018.1 to use the RPU remoteproc driver and you will need to update the device tree referring to UG1186.

 

Best Regards,

Wendy

 

Any support is much appreciated,

 

Ryan

--
You received this message because you are subscribed to the Google Groups "open-amp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Heminway

unread,
Apr 27, 2018, 10:09:30 AM4/27/18
to open...@googlegroups.com
Hi Wendy, 

I appreciate the quick feedback. I should have given a better description of my setup. I am running the Xilinx kernel, with the remoteproc driver adder, with a modified device tree according to UG1186. We are running an Ubuntu rootfs which is why I am hoping to avoid steps which require Petalinux. 

I have not been able to find the cmake instructions which you refer to on the OpenAMP/Libmetal repo. I cloned the Libmetal repo and have followed these steps thus far:
    $ mkdir -p build-libmetal
    $ cd build-libmetal
    $ cmake <libmetal_source>
    $ make VERBOSE=1 DESTDIR=<libmetal_install> install
Which resulted in the test executables, "test-metal-static" and "test-metal-shared" in libmetal/test/. Running these provides no output of any kind, but they seem to complete without error. It is unclear what these programs are doing so I am more interested in running the libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo/ demo applications which have more detailed descriptions. I have been trying to follow the instructions on https://github.com/OpenAMP/open-amp/blob/master/README.md, however they are not successful in producing the demo applications which I have referred to. 

Thank you for the guidance,
Ryan 

On Thu, Apr 26, 2018 at 6:50 PM, Jiaying Liang <jli...@xilinx.com> wrote:

 

 

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

Jiaying Liang

unread,
Apr 27, 2018, 4:16:15 PM4/27/18
to open...@googlegroups.com

Hi Ryan,

 

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
Sent: Friday, April 27, 2018 7:09 AM
To: open...@googlegroups.com
Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

 

Hi Wendy, 

 

I appreciate the quick feedback. I should have given a better description of my setup. I am running the Xilinx kernel, with the remoteproc driver adder, with a modified device tree according to UG1186. We are running an Ubuntu rootfs which is why I am hoping to avoid steps which require Petalinux. 

 

I have not been able to find the cmake instructions which you refer to on the OpenAMP/Libmetal repo. I cloned the Libmetal repo and have followed these steps thus far:

    $ mkdir -p build-libmetal
    $ cd build-libmetal
    $ cmake <libmetal_source>
$ make VERBOSE=1 DESTDIR=<libmetal_install> install

Which resulted in the test executables, "test-metal-static" and "test-metal-shared" in libmetal/test/. Running these provides no output of any kind, but they seem to complete without error.

[Wendy] When you run the test you should see output. And from the steps above, they are the test app for your build host.

It is unclear what these programs are doing so I am more interested in running the libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo/ demo applications which have more detailed descriptions. I have been trying to follow the instructions on https://github.com/OpenAMP/open-amp/blob/master/README.md, however they are not successful in producing the demo applications which I have referred to. 

[Wendy] You will need to have cross compile the demo. Libmetal on linux depends on sysfsutils, you will need to make sure your cross compiling sysroot has sysfsutils dev package in install.

You can create a toolchain file in this case. Here is a toolchain file example I got from yocto:

 

Best Regards,

Wendy

 

set( CMAKE_SYSTEM_NAME Linux )

set( CMAKE_SYSTEM_PROCESSOR aarch64 )

set( CMAKE_C_COMPILER aarch64-xilinx-linux-gcc )

set( CMAKE_CXX_COMPILER aarch64-xilinx-linux-g++ )

set( CMAKE_ASM_COMPILER aarch64-xilinx-linux-gcc )

set( CMAKE_AR aarch64-xilinx-linux-ar CACHE FILEPATH "Archiver" )

set( CMAKE_C_FLAGS "  --sysroot= <>/tmp/sysroots/zcu102-zynqmp  -O2 -pipe -g " CACHE STRING "CFLAGS" )

set( CMAKE_CXX_FLAGS "  --sysroot= <>/tmp/sysroots/zcu102-zynqmp  -O2 -pipe -g " CACHE STRING "CXXFLAGS" )

set( CMAKE_ASM_FLAGS "  --sysroot= <>/tmp/sysroots/zcu102-zynqmp  -O2 -pipe -g "  CACHE STRING "ASM FLAGS" )

set( CMAKE_C_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Additional CFLAGS for release" )

set( CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Additional CXXFLAGS for release" )

set( CMAKE_ASM_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Additional ASM FLAGS for release" )

set( CMAKE_C_LINK_FLAGS "  --sysroot<>/tmp/sysroots/zcu102-zynqmp  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" CACHE STRING "LDFLAGS" )

set( CMAKE_CXX_LINK_FLAGS "  <>/tmp/sysroots/zcu102-zynqmp  -O2 -pipe -g -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" CACHE STRING "LDFLAGS" )

 

# only search in the paths provided so cmake doesnt pick

# up libraries and tools from the native build machine

set( CMAKE_FIND_ROOT_PATH <>/tmp/sysroots/x86_64-linux    )

set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )

set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )

set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )

set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )

 

# add for non /usr/lib libdir, e.g. /usr/lib64

set( CMAKE_LIBRARY_PATH /usr/lib /lib)

 

Thank you for the guidance,

Ryan 

 

On Thu, Apr 26, 2018 at 6:50 PM, Jiaying Liang <jli...@xilinx.com> wrote:

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of dobleryan
Sent: Thursday, April 26, 2018 12:43 PM
To: open-amp <open...@googlegroups.com>
Subject: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

 

Hello,

 

I am trying to use libmetal and OpenAMP on an Ultrazed-EG board running Ubuntu 16.04. A linux master runs on the A-53 core and ultimately I will be looking to communicate with the R5 core. For now though, I am just trying to run some of the prepackaged demo applications. 

 

I have cloned the libmetal source and ran the build. After doing a "make install", I have done a "make all" and "make examples/" from the /libmetal/ directory. Both commands completed without errors, but there are no executable files produced in the examples/ directory. More specifically, I am looking to run libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo. 

 

[Wendy] you will need to use cmake to build it. the README on the libmetal and OpenAMP repo gives the instructions.

However, as you building application for R5 on Zynq UltraScale+ MPSoC. You will need to get some Xilinx library from Xilinx SDK.

It will be much easier if you can install XSDK 2018.1 and follow this document https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug1186-zynq-openamp-gsg.pdf to build the firmware.

 

In order for Linux runs on A53 to talk to RPU, you will need to update your device tree. You can also refer to the document in the above link

 

Is the build process supposed to create executables in this directory? Or is there a part of the environmental setup that I am missing? I have not been able to find a ton of guidelines on porting libmetal or openamp to a linux environment  without using yocto or petalinux. 

[Wendy] If you just want to try OpenAMP on the Linux host, that is communications between the two Linux processes with OpenAMP, you can follow README https://github.com/OpenAMP/open-amp/blob/master/README.md

But if you want to try Linux on APU to RPU, you can follow UG1186, you will need to use Xilinx kernel, https://github.com/Xilinx/linux-xlnx/tree/xilinx-v2018.1 to use the RPU remoteproc driver and you will need to update the device tree referring to UG1186.

 

Best Regards,

Wendy

 

Any support is much appreciated,

 

Ryan

--
You received this message because you are subscribed to the Google Groups "open-amp" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

Ryan Heminway

unread,
May 1, 2018, 2:09:39 PM5/1/18
to open...@googlegroups.com
Thanks for the reply Wendy, 

I am still having no luck. As you recommended, I am trying to cross-compile the Libmetal and OpenAMP demos. I am following the instructions posted here: https://github.com/Xilinx/open-amp/tree/xilinx-v2018.1 in the section "Example to compile Zynq UltraScale MPSoC R5 generic(baremetal) remote". 

The toolchain file I used for both Libmetal and OpenAMP compiling is shown below. From here on out, I will refer to the toolchain file as "my-platform.cmake". Also, to note, I have cloned and am using the Xilinx/embeddedsw library found at https://github.com/Xilinx/embeddedsw


  1. set (CMAKE_SYSTEM_PROCESSOR "arm"              CACHE STRING "")
  2. set (MACHINE                "zynqmp_r5"        CACHE STRING "")
  3. set (CROSS_PREFIX           "arm-none-eabi-" CACHE STRING "")
  4.  
  5. # Xilinx SDK version earlier than 2017.2 use mfloat-abi=soft by default to generat libxil
  6. set (CMAKE_C_FLAGS          "-mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I[PATHS-TO-EMBEDDEDSW-LIBRARYS]" CACHE STRING "")
  7.  
  8. include (cross-generic-gcc)
  9.  
  10. # vim: expandtab:ts=2:sw=2:smartindent


With this toolchain file, I ran the following commands to build Libmetal:
    $ mkdir -p build-libmetal
    $ cd build-libmetal
    $ cmake .. -DCMAKE_TOOLCHAIN_FILE=/libmetal/cmake/platforms/my-platform.cmake
    $ make VERBOSE=1 DESTDIR=/lib/sys/ install
I was able to get libmetal to compile, however test applications were not produced. I also ran a "make VERBOSE=1 all" to be safe. I would love to get libmetal standalone test applications to run, however I have had no success so far. Moving on to OpenAMP, this is where I was not able to complete the build. Using the same toolchain file, I ran the following commands to try and build OpenAMP. 
    $ mkdir -p build
    $ cd build
    $ cmake .. -DCMAKE_INCLUDE_PATH=/lib/sys/usr/local/include/ -DCMAKE_LIBRARY_PATH=/lib/sys/usr/local/lib/ -DCMAKE_TOOLCHAIN_FILE=/libmetal/cmake/platforms/my-platform.cmake -DWITH_APPS=ON
    $ make VERBOSE=1 DESTDIR=$(pwd) install
The last command, the "make", failed at 40% with the following errors: 
  1. [ 40%] Building C object apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj
  2. cd /open-amp/build/apps/echo_test && /usr/bin/arm-none-eabi-gcc   -I/lib/sys/usr/local/include -I/open-amp/lib/include -I/open-amp/apps/machine/zynqmp_r5 -I/open-amp/apps/echo_test  -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynq_fsbl/misc/zed/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra -g   -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynq_fsbl/misc/zed/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra  -oCMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj   -c /open-amp/apps/machine/zynqmp_r5/platform_info.c
  3. /open-amp/apps/machine/zynqmp_r5/platform_info.c:25:30: error: 'XPAR_XIPIPSU_0_BASE_ADDRESS' undeclared here (not in a function)
  4.  #define IPI_BASE_ADDR        XPAR_XIPIPSU_0_BASE_ADDRESS /* IPI base address*/
  5.                               ^
  6. /open-amp/apps/machine/zynqmp_r5/platform_info.c:55:27: note: in expansion of macro 'IPI_BASE_ADDR'
  7.   {NULL, NULL, NULL, NULL, IPI_BASE_ADDR, IPI_CHN_BITMASK, 0, 0},
  8.                            ^
  9. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:
  10. /open-amp/apps/machine/zynqmp_r5/platform_info.c: In function 'platform_create_proc':
  11. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: error: 'XPAR_XIPIPSU_0_INT_ID' undeclared (first use in this function)
  12.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID
  13.                                  ^
  14. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'
  15.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);
  16.    ^
  17. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: note: each undeclared identifier is reported only once for each function it appears in
  18.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID
  19.                                  ^
  20. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'
  21.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);
  22.    ^
  23. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vdev_ipi' makes integer from pointer without a cast
  24.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID
  25.                                  ^
  26. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'
  27.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);
  28.    ^
  29. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:
  30. /open-amp/lib/include/openamp/hil.h:535:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'
  31.  int hil_set_vdev_ipi (struct hil_proc *proc, int index,
  32.      ^
  33. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:
  34. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vring_ipi' makes integer from pointer without a cast
  35.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID
  36.                                  ^
  37. /open-amp/apps/machine/zynqmp_r5/platform_info.c:91:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'
  38.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);
  39.    ^
  40. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:
  41. /open-amp/lib/include/openamp/hil.h:550:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'
  42.  int hil_set_vring_ipi (struct hil_proc *proc, int index,
  43.      ^
  44. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:
  45. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vring_ipi' makes integer from pointer without a cast
  46.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID
  47.                                  ^
  48. /open-amp/apps/machine/zynqmp_r5/platform_info.c:94:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'
  49.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);
  50.    ^
  51. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:
  52. /open-amp/lib/include/openamp/hil.h:550:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'
  53.  int hil_set_vring_ipi (struct hil_proc *proc, int index,
  54.      ^
  55. apps/echo_test/CMakeFiles/echo_test.out.dir/build.make:62: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj' failed
  56. make[2]: *** [apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj] Error 1
  57. make[2]: Leaving directory '/open-amp/build'
  58. CMakeFiles/Makefile2:402: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/all' failed
  59. make[1]: *** [apps/echo_test/CMakeFiles/echo_test.out.dir/all] Error 2
  60. make[1]: Leaving directory '/open-amp/build'
  61. Makefile:138: recipe for target 'all' failed
  62. make: *** [all] Error 2
I am having a hard time deciphering what the error messages are caused by. Any insight would be appreciated. Thanks for the continued assistance.

Additionally, I was curious about the feasibility of using the Xilinx SDK from my Windows host machine. Would it be possible to create the demo application from the XSDK and then port the binary .elf file to the Ubuntu instance that I am running on the A53 processor? Just a thought as I have no had a lot of success building from source. 

Thanks, 
Ryan

Hi Ryan,

 

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.

To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "open-amp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

Ryan Heminway

unread,
May 1, 2018, 3:54:05 PM5/1/18
to open...@googlegroups.com
Hello again Wendy,

Since my last message, I was able to figure out that I was including the wrong "xparameters.h" file, which is why I was getting "variable undefined" errors rather than just "include file not found" errors. Since there are a lot of files with different versions in the Xilinx/embeddedsw repo, would you be able to point me to which subdirectories within Xilinx/embeddedsw are the proper ones to include for the ZynqMP r5 baremetal cross compilation that I am trying to achieve?

Thanks
Ryan

Ryan Heminway

unread,
May 1, 2018, 4:35:31 PM5/1/18
to open...@googlegroups.com
Sorry for the string of messages, but I keep discovering new questions to ask. In the compilation of OpenAMP, I am now stuck with the following error:
  1. [50%] Linking C executable echo_test.out
  2. cd /open-amp/build/apps/echo_test && /usr/bin/cmake -E cmake_link_script CMakeFiles/echo_test.out.dir/link.txt --verbose=1
  3. /usr/bin/arm-none-eabi-gcc  -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/sw_apps/zynqmp_fsbl/misc/zcu102/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynqmp_fsbl/misc/zcu102/r5/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra -g   CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/rsc_table.c.obj CMakeFiles/echo_test.out.dir/__/system/generic/machine/zynqmp_r5/helper.c.obj CMakeFiles/echo_test.out.dir/echo_test.c.obj  -o echo_test.out  -L/lib/sys/usr/local/lib  -L/open-amp/build/lib -Wl,-Map=echo_test.map -Wl,--gc-sections -T"/open-amp/apps/system/generic/machine/zynqmp_r5/linker_remote.ld" -Wl,--start-group ../../lib/libopen_amp.a /lib/sys/usr/local/lib/libmetal.a -lxil-lc -lm -Wl,--end-group
  4. /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lxil
  5. collect2: error: ld returned 1 exit status
  6. apps/echo_test/CMakeFiles/echo_test.out.dir/build.make:174: recipe for target 'apps/echo_test/echo_test.out' failed
  7. make[2]: *** [apps/echo_test/echo_test.out] Error 1
  1. make[2]: Leaving directory '/open-amp/build'
  2. CMakeFiles/Makefile2:402: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/all' failed
  3. make[1]: *** [apps/echo_test/CMakeFiles/echo_test.out.dir/all] Error 2
  4. make[1]: Leaving directory '/open-amp/build'
  5. Makefile:138: recipe for target 'all' failed
  6. make: *** [all] Error 2
    I understand this is because I am compiling without access to the XSDK. Normally, libxil would be produced when using the XSDK. Do you know how to link to the standalone BSP included with Xilinx/embeddedsw to build libxil? I am not sure what to add to my cmake toolchain to get it compile libxil. 

    Thanks
    Ryan

    Jiaying Liang

    unread,
    May 1, 2018, 4:41:55 PM5/1/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, May 01, 2018 1:35 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Sorry for the string of messages, but I keep discovering new questions to ask. In the compilation of OpenAMP, I am now stuck with the following error:

    1.  [50%] Linking C executable echo_test.out

    2.  cd /open-amp/build/apps/echo_test && /usr/bin/cmake -E cmake_link_script CMakeFiles/echo_test.out.dir/link.txt --verbose=1

    3.  /usr/bin/arm-none-eabi-gcc  -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/sw_apps/zynqmp_fsbl/misc/zcu102/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynqmp_fsbl/misc/zcu102/r5/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra -g   CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/rsc_table.c.obj CMakeFiles/echo_test.out.dir/__/system/generic/machine/zynqmp_r5/helper.c.obj CMakeFiles/echo_test.out.dir/echo_test.c.obj  -o echo_test.out  -L/lib/sys/usr/local/lib  -L/open-amp/build/lib -Wl,-Map=echo_test.map -Wl,--gc-sections -T"/open-amp/apps/system/generic/machine/zynqmp_r5/linker_remote.ld" -Wl,--start-group ../../lib/libopen_amp.a /lib/sys/usr/local/lib/libmetal.a -lxil-lc -lm -Wl,--end-group

    4.  /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lxil

    5.  collect2: error: ld returned 1 exit status

    6.  apps/echo_test/CMakeFiles/echo_test.out.dir/build.make:174: recipe for target 'apps/echo_test/echo_test.out' failed

    7.  make[2]*** [apps/echo_test/echo_test.out] Error 1

    8.  make[2]: Leaving directory '/open-amp/build'

    9.  CMakeFiles/Makefile2:402: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/all' failed

    10. make[1]*** [apps/echo_test/CMakeFiles/echo_test.out.dir/all] Error 2

    11. make[1]: Leaving directory '/open-amp/build'

    12. Makefile:138: recipe for target 'all' failed

    13. make: *** [all] Error 2

    I understand this is because I am compiling without access to the XSDK. Normally, libxil would be produced when using the XSDK. Do you know how to link to the standalone BSP included with Xilinx/embeddedsw to build libxil? I am not sure what to add to my cmake toolchain to get it compile libxil. 

    [Wendy] Currently, you are not able to get libxil without creating the BSP with XSDK tools.

    You can install the XSDK from Xilinx website to create the application (If you just want the libxil.a, you can just create helloworld RPU app) from XSDK.

    (That’s easier)

    Or install PetaLinux, and then you can refer to https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes-openamp/examples/openamp-fw-echo-testd_git.bb to build the standalone app from yocto or PetaLinux. In this way, it is not too easy if you want to customized the application, but you can get the BSP which contains the libxil.a.

     

    Best Regards,

    Wendy

     

    Thanks

    Ryan

     

    On Tue, May 1, 2018 at 3:54 PM, Ryan Heminway <ryanhe...@gmail.com> wrote:

    Hello again Wendy,

     

    Since my last message, I was able to figure out that I was including the wrong "xparameters.h" file, which is why I was getting "variable undefined" errors rather than just "include file not found" errors. Since there are a lot of files with different versions in the Xilinx/embeddedsw repo, would you be able to point me to which subdirectories within Xilinx/embeddedsw are the proper ones to include for the ZynqMP r5 baremetal cross compilation that I am trying to achieve?

     

    Thanks

    Ryan

    On Tue, May 1, 2018 at 2:09 PM, Ryan Heminway <ryanhe...@gmail.com> wrote:

    Thanks for the reply Wendy, 

     

    I am still having no luck. As you recommended, I am trying to cross-compile the Libmetal and OpenAMP demos. I am following the instructions posted here: https://github.com/Xilinx/open-amp/tree/xilinx-v2018.1 in the section "Example to compile Zynq UltraScale MPSoC R5 generic(baremetal) remote". 

     

    The toolchain file I used for both Libmetal and OpenAMP compiling is shown below. From here on out, I will refer to the toolchain file as "my-platform.cmake". Also, to note, I have cloned and am using the Xilinx/embeddedsw library found at https://github.com/Xilinx/embeddedsw

     

     
    1.  set (CMAKE_SYSTEM_PROCESSOR "arm"              CACHE STRING "")
    2.  set (MACHINE                "zynqmp_r5"        CACHE STRING "")
    3.  set (CROSS_PREFIX           "arm-none-eabi-" CACHE STRING "")
    4.   
    5.  # Xilinx SDK version earlier than 2017.2 use mfloat-abi=soft by default to generat libxil
    6.  set (CMAKE_C_FLAGS          "-mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I[PATHS-TO-EMBEDDEDSW-LIBRARYS]" CACHE STRING "")
    7.   
    8.  include (cross-generic-gcc)
    9.   
    10. # vim: expandtab:ts=2:sw=2:smartindent
     

     

    With this toolchain file, I ran the following commands to build Libmetal:

        $ mkdir -p build-libmetal
        $ cd build-libmetal
        $ cmake .. -DCMAKE_TOOLCHAIN_FILE=/libmetal/cmake/platforms/my-platform.cmake
        $ make VERBOSE=1 DESTDIR=/lib/sys/ install

    I was able to get libmetal to compile, however test applications were not produced. I also ran a "make VERBOSE=1 all" to be safe. I would love to get libmetal standalone test applications to run, however I have had no success so far. Moving on to OpenAMP, this is where I was not able to complete the build. Using the same toolchain file, I ran the following commands to try and build OpenAMP. 

        $ mkdir -p build
        $ cd build
        $ cmake .. -DCMAKE_INCLUDE_PATH=/lib/sys/usr/local/include/ -DCMAKE_LIBRARY_PATH=/lib/sys/usr/local/lib/ -DCMAKE_TOOLCHAIN_FILE=/libmetal/cmake/platforms/my-platform.cmake -DWITH_APPS=ON
        $ make VERBOSE=1 DESTDIR=$(pwd) install

    The last command, the "make", failed at 40% with the following errors: 

    1.  [ 40%] Building C object apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj

    2.  cd /open-amp/build/apps/echo_test && /usr/bin/arm-none-eabi-gcc   -I/lib/sys/usr/local/include -I/open-amp/lib/include -I/open-amp/apps/machine/zynqmp_r5 -I/open-amp/apps/echo_test  -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynq_fsbl/misc/zed/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra -g   -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexr5/  -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/common/gcc/ -I/usr/include/embeddedsw/XilinxProcessorIPLib/drivers/scugic/src/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/common/ -I/usr/include/embeddedsw/lib/sw_apps/zynq_fsbl/misc/zed/ -I/usr/include/embeddedsw/lib/bsp/standalone/src/arm/cortexa53/64bit/  -Wall -Wextra  -oCMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj   -c /open-amp/apps/machine/zynqmp_r5/platform_info.c

    3.  /open-amp/apps/machine/zynqmp_r5/platform_info.c:25:30: error: 'XPAR_XIPIPSU_0_BASE_ADDRESS' undeclared here (not in a function)

    4.   #define IPI_BASE_ADDR        XPAR_XIPIPSU_0_BASE_ADDRESS /* IPI base address*/

    5.                                ^

    6.  /open-amp/apps/machine/zynqmp_r5/platform_info.c:55:27: note: in expansion of macro 'IPI_BASE_ADDR'

    7.    {NULL, NULL, NULL, NULL, IPI_BASE_ADDR, IPI_CHN_BITMASK, 00},

    8.                             ^

    9.  In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:

    10. /open-amp/apps/machine/zynqmp_r5/platform_info.c: In function 'platform_create_proc':

    11. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: error: 'XPAR_XIPIPSU_0_INT_ID' undeclared (first use in this function)

    12.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID

    13.                                  ^

    14. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'

    15.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);

    16.    ^

    17. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: note: each undeclared identifier is reported only once for each function it appears in

    18.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID

    19.                                  ^

    20. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'

    21.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);

    22.    ^

    23. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vdev_ipi' makes integer from pointer without a cast

    24.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID

    25.                                  ^

    26. /open-amp/apps/machine/zynqmp_r5/platform_info.c:88:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'

    27.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);

    28.    ^

    29. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:

    30. /open-amp/lib/include/openamp/hil.h:535:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'

    31.  int hil_set_vdev_ipi (struct hil_proc *proc, int index,

    32.      ^

    33. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:

    34. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vring_ipi' makes integer from pointer without a cast

    35.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID

    36.                                  ^

    37. /open-amp/apps/machine/zynqmp_r5/platform_info.c:91:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'

    38.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);

    39.    ^

    40. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:

    41. /open-amp/lib/include/openamp/hil.h:550:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'

    42.  int hil_set_vring_ipi (struct hil_proc *proc, int index,

    43.      ^

    44. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:23:0:

    45. /open-amp/apps/machine/zynqmp_r5/platform_info.h:7:33: warning: passing argument 3 of 'hil_set_vring_ipi' makes integer from pointer without a cast

    46.  #define IPI_IRQ_VECT_ID         XPAR_XIPIPSU_0_INT_ID

    47.                                  ^

    48. /open-amp/apps/machine/zynqmp_r5/platform_info.c:94:3: note: in expansion of macro 'IPI_IRQ_VECT_ID'

    49.    IPI_IRQ_VECT_ID, (void *)&chn_ipi_info[0]);

    50.    ^

    51. In file included from /open-amp/apps/machine/zynqmp_r5/platform_info.c:21:0:

    52. /open-amp/lib/include/openamp/hil.h:550:5: note: expected 'unsigned int' but argument is of type 'struct ipi_info *'

    53.  int hil_set_vring_ipi (struct hil_proc *proc, int index,

    54.      ^

    55. apps/echo_test/CMakeFiles/echo_test.out.dir/build.make:62: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj' failed

    56. make[2]*** [apps/echo_test/CMakeFiles/echo_test.out.dir/__/machine/zynqmp_r5/platform_info.c.obj] Error 1

    57. make[2]: Leaving directory '/open-amp/build'

    58. CMakeFiles/Makefile2:402: recipe for target 'apps/echo_test/CMakeFiles/echo_test.out.dir/all' failed

    59. make[1]*** [apps/echo_test/CMakeFiles/echo_test.out.dir/all] Error 2

    60. make[1]: Leaving directory '/open-amp/build'

    61. Makefile:138: recipe for target 'all' failed

    62. make: *** [all] Error 2

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    May 2, 2018, 2:52:03 PM5/2/18
    to open...@googlegroups.com
    Hi Wendy,

    I cannot get the Xilinx SDK on the Linux image running on the A53 core. However, I have the XSDK on my Windows host and another Linux virtual machine. I have used the XSDK to compile the libmetal_amp_demo targeted for baremetal OS on the R5 processor. I transferred the executable (libmetal_amp_demo.elf) to my linux client running on the A53 processor. I made sure to transfer the file to /lib/firmware/. I then tried to run the application with the commands "echo libmetal_amp_demo.elf > /sys/class/remoteproc/remoteproc0/firmware" and "echo start > /sys/class/remoteproc/remoteproc0/state". I got no output of any kind that would indicate the program ran successfully. I was able to see that the remoteproc/remoteproc0/state was "running" which was not occurring previously, but nothing else.

    Is this normal behavior? Do you have have an idea why I would see no output at all? I would expect either an error message or output detailing what the application is doing.

    I know it is not the most common use case, but it would be very helpful if your documentation included some details about how to run the software without the use of Petalinux or Yocto. That being said, I greatly appreciate the time you have taken to respond to my persistent emails.

    Thanks again,

    Ryan

    On Tue, May 1, 2018 at 4:41 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    May 2, 2018, 3:35:15 PM5/2/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, May 02, 2018 11:52 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Hi Wendy,

     

    I cannot get the Xilinx SDK on the Linux image running on the A53 core. However, I have the XSDK on my Windows host and another Linux virtual machine. I have used the XSDK to compile the libmetal_amp_demo targeted for baremetal OS on the R5 processor. I transferred the executable (libmetal_amp_demo.elf) to my linux client running on the A53 processor. I made sure to transfer the file to /lib/firmware/. I then tried to run the application with the commands "echo libmetal_amp_demo.elf > /sys/class/remoteproc/remoteproc0/firmware" and "echo start > /sys/class/remoteproc/remoteproc0/state". I got no output of any kind that would indicate the program ran successfully. I was able to see that the remoteproc/remoteproc0/state was "running" which was not occurring previously, but nothing else.

     

    Is this normal behavior? Do you have have an idea why I would see no output at all? I would expect either an error message or output detailing what the application is doing.

    [Wendy] If you are using the XSDK to generate the RPU libmetal demo image, you should be able to see the output from console.

    The remoteproc state shows the RPU is running, but it doesn’t mean the firmware on RPU itself runs properly.

     

    I know it is not the most common use case, but it would be very helpful if your documentation included some details about how to run the software without the use of Petalinux or Yocto. That being said, I greatly appreciate the time you have taken to respond to my persistent emails.

    [Wendy] This is the document to talk about running the libmetal example with PetaLinux. https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug1186-zynq-openamp-gsg.pdf

     

    Best Regards,

    Wendy

     

    Thanks again,

     

    Ryan

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    May 4, 2018, 2:28:09 PM5/4/18
    to open...@googlegroups.com
    Hi Wendy,

    I think you misunderstood my final statement. I am looking for documentation about how to use Libmetal/OpenAMP WITHOUT the use of Petalinux. We are not using a Petalinux image so we cannot use Petalinux software. I have access to the Xilinx SDK on my windows host but I am looking to run the demo applications from my Ubuntu linux image running on the APU. 

    This is what I have tried most recently:

    I cloned Libmetal from github on to my Ubuntu image running on the APU. I build libmetal and manually compiled the demo application for a Linux system target. Compiling it gave me the executable output, "a.out". 

    I used the Xilinx SDK to build the libmetal_amp demo targeted for a baremetal platform. I used SCP to transfer the binary .elf file that was produced to the file system of my Ubuntu image running on the Zynq board. I placed it in /lib/firmware and tried to launch it on the RPU with remoteproc. I used the following commands to do so:
    > echo libmetal_demo.elf > /sys/class/remoteproc/remoteproc0/firmware
    > echo start > /sys/class/remoteproc/remoteproc0/state
    I get 0 console output from running these commands. However the RPU did boot properly because the state file says "running". Following some of the libmetal documentation, I then tried to run the Linux counterpart of the Libmetal demo. I did this by navigating to /usr/bin/ and executing "a.out".
    > sudo "a.out"
    From this, I get the following output: 
    > CLIENT> ERROR: Failed to initialize libmetal
    > SERVER> ERROR: Failed to initialize system

    I am not sure why this is failing. I have checked multiple times that I have properly modified my device tree to support the Libmetal software. I have also definitely enabled remoteproc support in the Kernel, as I can see that the RPU is running from /sys/class/remoteproc/remoteproc0/state.

    Any tips on how to debug this would be great. I CANNOT use petalinux. 

    Thanks, 
    Ryan

    On Wed, May 2, 2018 at 3:35 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    May 4, 2018, 7:33:28 PM5/4/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Friday, May 04, 2018 11:28 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Hi Wendy,

     

    I think you misunderstood my final statement. I am looking for documentation about how to use Libmetal/OpenAMP WITHOUT the use of Petalinux. We are not using a Petalinux image so we cannot use Petalinux software. I have access to the Xilinx SDK on my windows host but I am looking to run the demo applications from my Ubuntu linux image running on the APU. 

     

    This is what I have tried most recently:

     

    I cloned Libmetal from github on to my Ubuntu image running on the APU. I build libmetal and manually compiled the demo application for a Linux system target. Compiling it gave me the executable output, "a.out". 

     

    I used the Xilinx SDK to build the libmetal_amp demo targeted for a baremetal platform. I used SCP to transfer the binary .elf file that was produced to the file system of my Ubuntu image running on the Zynq board. I placed it in /lib/firmware and tried to launch it on the RPU with remoteproc. I used the following commands to do so:

    > echo libmetal_demo.elf > /sys/class/remoteproc/remoteproc0/firmware

    > echo start > /sys/class/remoteproc/remoteproc0/state

    I get 0 console output from running these commands. However the RPU did boot properly because the state file says "running".

    [Wendy] Did you pick “Libmetal AMP Demo” from XSDK template list when you create the application for RPU?

    You can check your source code to see if you compile libmetal_amp_demod.c file

    [Wendy] Did you setup stdout from XSDK BSP configuration? Make sure it is set.

    You can use xsdb to connect to the RPU to see where the processor hangs. you can find xsdb help from XSDK help or you can type help from xsdb

    Following some of the libmetal documentation, I then tried to run the Linux counterpart of the Libmetal demo. I did this by navigating to /usr/bin/ and executing "a.out".

    > sudo "a.out"

    From this, I get the following output: 

    > CLIENT> ERROR: Failed to initialize libmetal

    > SERVER> ERROR: Failed to initialize system

    [Wendy] the https://github.com/OpenAMP/libmetal/blob/master/examples/system/linux/zynqmp/zynqmp_amp_demo/libmetal_amp_demo.c is used on the Linux side to talk to the libmetal_amp_demod.c on the RPU side. The SERVER> is from libmetal_amp_demod.c and the CLIENT> is from the libmetal_amp_demo.c.

    Please just use libmetal_amp_demo.c only first.

    Before calling metal_init() in the sys_init.c, you can set init_param.metal_log_level = METAL_LOG_DEBUG to get more information.

    Could you check if your sysfs is enabled, and did you see platform bus in your sysfs? And did you enable UIO from your kernel config?

    You can add some debugging output from metal_linux_probe_bus() in <libmetal>/lib/system/linux/device.c to print some message in the error return path.

     

    Best Regards,

    Wendy

     

    I am not sure why this is failing. I have checked multiple times that I have properly modified my device tree to support the Libmetal software. I have also definitely enabled remoteproc support in the Kernel, as I can see that the RPU is running from /sys/class/remoteproc/remoteproc0/state.

     

    Any tips on how to debug this would be great. I CANNOT use petalinux.

     

    [Wendy] you don’t need to use petalinux, the document just provide you instructions on how to build firmware on RPU, and how to change device tree on Linux side

     

    Thanks, 

    Ryan

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    May 8, 2018, 4:08:48 PM5/8/18
    to open...@googlegroups.com
    Hello again Wendy,

    I appreciate your last response. I was able to get the Libmetal shared memory demo running between the APU and RPU. My demo application then got stuck at the atomic memory shared demo. Both sides would loop infinitely as the remote was "Waiting for notification to kickoff demo". Is this expected, since "Linux user space does not allow use of IPI buffer space"? 

    Anyway, I have now moved on to trying to get the OpenAMP echo test application running between the APU and RPU. Using the Xilinx SDK, I created the FreeRTOS version of the OpenAMP EchoTest demo application. I then used SCP to transfer the binary to my A53 Linux userspace. I can load this program using remoteproc and I get the following output:
    > Starting application...
    > Try to init remoteproc resource
    > Init remoteproc resource succeeded
    > Waiting for events...

    I then try to load the Linux side of the application. I compiled the linux side by following the directions at https://github.com/OpenAMP/open-amp, using the cmake flag -DWITH_APPS=ON during compilation. With the program still running on the R5 processor, I executed the following: 
    # Run echo test to send message to echo test server
    $ sudo LD_LIBRARY_PATH=<openamp_built>/usr/local/lib:<libmetal_built>/usr/local/lib \
       build/usr/local/bin/echo_test-shared 1
    This command results in no response from the server side, but I get the following output on the client side: (I apologize for the spacing)
    metal: debug: Failed fread /dev/urandom
    metal: debug: added page size 4096@tmp
    metal: debug: registered platform bus
    1 - Send data to remote core, retrieve the echo and validate its integrity ...         
    Open IPI: unix:/tmp/openamp.event.0
    ERROR: Failed to open sock unix:/tmp/openamp.event.0 for IPI
    Open IPI: unix:/tmp/openamp.event.1
    ERROR: Failed to open sock unix:/tmp/openamp.event.1 for IPI
    Remote proc resource initialized.
    My IPI implementation is the same as it was for Libmetal, but I am under the impression this will have to change. I am not clear on what has to change, or why, though. Could you clarify the difference in IPI implementation between libmetal and OpenAMP? 

    Additionally, the OpenAMP user guide (UG1186) mentions that the RPMsg drivers used in OpenAMP are out-of-tree kernel modules. I am not clear on what this means. Does OpenAMP build the RPMsg drivers when it gets built? I have looked in my Xilinx Kernel configuration menu, but there are no modules available under Device drivers --> RPMsg -->.

    Same question for the Virtio implementation. Do I need to enable modules from within my Kernel configuration menu, or does OpenAMP provide the implementation? 

    Are there debug flags I can add at run time for additional debug information on these OpenAMP demo applications?

    Thank you for the all the help,
    Ryan 


    On Fri, May 4, 2018 at 7:33 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    May 8, 2018, 6:19:42 PM5/8/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, May 08, 2018 1:09 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Hello again Wendy,

     

    I appreciate your last response. I was able to get the Libmetal shared memory demo running between the APU and RPU. My demo application then got stuck at the atomic memory shared demo. Both sides would loop infinitely as the remote was "Waiting for notification to kickoff demo". Is this expected, since "Linux user space does not allow use of IPI buffer space"? 

     

    Anyway, I have now moved on to trying to get the OpenAMP echo test application running between the APU and RPU. Using the Xilinx SDK, I created the FreeRTOS version of the OpenAMP EchoTest demo application. I then used SCP to transfer the binary to my A53 Linux userspace. I can load this program using remoteproc and I get the following output:

    > Starting application...

    > Try to init remoteproc resource

    > Init remoteproc resource succeeded

    > Waiting for events...

     

    I then try to load the Linux side of the application. I compiled the linux side by following the directions at https://github.com/OpenAMP/open-amp, using the cmake flag -DWITH_APPS=ON during compilation. With the program still running on the R5 processor, I executed the following: 

    # Run echo test to send message to echo test server
    $ sudo LD_LIBRARY_PATH=<openamp_built>/usr/local/lib:<libmetal_built>/usr/local/lib \
       build/usr/local/bin/echo_test-shared 1

    This command results in no response from the server side, but I get the following output on the client side: (I apologize for the spacing)

    metal: debug: Failed fread /dev/urandom
    metal: debug: added page size 4096@tmp
    metal: debug: registered platform bus
    1 - Send data to remote core, retrieve the echo and validate its integrity ...         
    Open IPI: unix:/tmp/openamp.event.0
    ERROR: Failed to open sock unix:/tmp/openamp.event.0 for IPI
    Open IPI: unix:/tmp/openamp.event.1
    ERROR: Failed to open sock unix:/tmp/openamp.event.1 for IPI
    Remote proc resource initialized.
    [Wendy] It looks like you are compiling the OpenAMP application demo between the two Linux processes. Maybe this is something need to improve in the README to make it clearer.
    For Linux application to talk to RPU, you will need to run cmake with option –DMACHINE=zynqmp.

    My IPI implementation is the same as it was for Libmetal, but I am under the impression this will have to change. I am not clear on what has to change, or why, though. Could you clarify the difference in IPI implementation between libmetal and OpenAMP? 

    [Wendy] the IPI implementation is the same for libmetal and OpenAMP, and in both demos, we only use IPI to interrupt the other side.

     

    Additionally, the OpenAMP user guide (UG1186) mentions that the RPMsg drivers used in OpenAMP are out-of-tree kernel modules. I am not clear on what this means. Does OpenAMP build the RPMsg drivers when it gets built? I have looked in my Xilinx Kernel configuration menu, but there are no modules available under Device drivers --> RPMsg -->.

    [Wendy] Those kernels are not in the Linux kernel source code, instead, they are https://github.com/OpenAMP/meta-openamp/tree/master/recipes-kernel

     

     

    Same question for the Virtio implementation. Do I need to enable modules from within my Kernel configuration menu, or does OpenAMP provide the implementation? 

    [Wendy] When you enable the remoteproc driver, the virtio module will be selected

     

    Are there debug flags I can add at run time for additional debug information on these OpenAMP demo applications?

    [Wendy] today, as OpenAMP demo app doesn’t use libmetal log yet, you can change the LPRINTF() in the echo test demo code to

    #define LPRINTF(format, ...) xil_printf(format, ##__VA_ARGS__)

    to see more input. If you want to debug the library, for now, will need to add print into the library code.

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to
    open...@googlegroups.com.
    For more options, visit
    https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    May 9, 2018, 9:40:02 AM5/9/18
    to open...@googlegroups.com
    Thanks for the reply Wendy, 

    Looks like adding the -DMACHINE=zynqmp solved my first problem. I can now run the echo-test demo successfully. However the first payload of the test always gets corrupted. Is this an error you recognize? 
    Remote proc resource initialized. 
    RPMSG channel has created. 
    sending payload number 0 of size 17
    echo test: sent : 17
      received payload number 810174417700425106 of size 40
    Data corruption at index 0
    sending payload number 1 of size 18
    echo test: sent : 18
      received payload number 1 of size 18
    ... (the rest succeed)
    It does not seem like a big deal, since the message channel works properly for all the other payloads, but I am curious to what causes this.

    Furthermore, I am running the "echo_test-static" on the linux side. Could you point me to where the source code for this application is? There seems to be different versions for different use cases, so I want to be sure I am referring to the correct source code. 

    Thanks,
    Ryan


    On Tue, May 8, 2018 at 6:19 PM, Jiaying Liang <jli...@xilinx.com> wrote:
    ...

    [Message clipped]  

    Jiaying Liang

    unread,
    May 10, 2018, 2:24:58 AM5/10/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, May 09, 2018 6:40 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Thanks for the reply Wendy, 

     

    Looks like adding the -DMACHINE=zynqmp solved my first problem. I can now run the echo-test demo successfully. However the first payload of the test always gets corrupted. Is this an error you recognize? 

    Remote proc resource initialized. 
    RPMSG channel has created. 
    sending payload number 0 of size 17
    echo test: sent : 17
      received payload number 810174417700425106 of size 40
    Data corruption at index 0
    sending payload number 1 of size 18
    echo test: sent : 18
      received payload number 1 of size 18
    ... (the rest succeed)

    It does not seem like a big deal, since the message channel works properly for all the other payloads, but I am curious to what causes this.

    [Wendy] the 1st package should not fails, good to debug

     

    Furthermore, I am running the "echo_test-static" on the linux side. Could you point me to where the source code for this application is? There seems to be different versions for different use cases, so I want to be sure I am referring to the correct source code. 

    --

    Ryan Heminway

    unread,
    Jul 17, 2018, 11:32:42 AM7/17/18
    to open...@googlegroups.com
    Hello Wendy,

    I have been using the echo_test example application between my R5 processor running FreeRTOS and my A53 processor running Ubuntu 16.04. I have had a long time issue where the first message sent in this application always fails. The first message from the A53 processor never makes it to the R5 side (no output on this side), yet the callback function on the A53 linux side is called to read from the shared memory buffer. Since no message was ever returned by the R5, the A53 reads junk values as seen in the snippet in my last email. 

    Do you have any idea where this failure could be occurring? I would imagine it has to be part of the messaging initialization. The first message is always sent with an acceptable status returned from rpmsg_send(), but then the "hil_poll" call seems to trigger the "rpmsg_read_cb" callback function prematurely, before the R5 processes and returns the payload. All subsequent messages work properly and the remote processor can read, print, and return the proper payload. 

    Is there somewhere in the HIL initialization that could cause a flag to be set prematurely, causing the "hil_poll" function to prematurely assume a message has been received? 

    Any insight on the HIL initialization would be very helpful. 

    Thanks, 
    Ryan 

    On Thu, May 10, 2018 at 2:24 AM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 17, 2018, 2:00:15 PM7/17/18
    to open...@googlegroups.com
    Hi Wendy,

    I wanted to give some more specifics about the issue I detailed in my last email. I found that the problem occurs when the A53-Linux echo_test application first runs a hil_poll() to wait for the created RPMSG channel. In this call, in rpmsg_rx_callback, the channel gets created and then the program remains in the "while (rp_hdr)" loop for one cycle more than it should. This causes a call to rp_ept->cb() prematurely, where it looks for data which cannot be accessed since data was never sent. 

    Do you have any insight on this problem or a patch to fix this?

    Thank you,
    Ryan

    Jiaying Liang

    unread,
    Jul 17, 2018, 2:51:05 PM7/17/18
    to open...@googlegroups.com

    Hi Ryan,

     

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, July 17, 2018 11:00 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Hi Wendy,

     

    I wanted to give some more specifics about the issue I detailed in my last email. I found that the problem occurs when the A53-Linux echo_test application first runs a hil_poll() to wait for the created RPMSG channel. In this call, in rpmsg_rx_callback, the channel gets created and then the program remains in the "while (rp_hdr)" loop for one cycle more than it should. This causes a call to rp_ept->cb() prematurely, where it looks for data which cannot be accessed since data was never sent. 

    [Wendy] rpmsg_rx_callback() is supposed to get all the pending packages from the vring. If it stays in the queue, it means there is one extra package in the ring.

    From your what you described, it didn’t drop package, instead the first one is always corrupted.

    Could you change the application to just send the first package? And on both sides, could you dump what it received in rpmsg_rx_callback() and what you send from rpmsg_send_offchannel_raw()?

     

    Best Regards,

    Wendy

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 17, 2018, 3:55:21 PM7/17/18
    to open...@googlegroups.com
    So I have changed the program so that it sends nothing. No packages are sent from either side. If all was working correctly, the program would initialize and then sit idle waiting for packages to come (which are never sent) forever. Even in this version of the program, the A53-Linux side of the application "receives" and prints a payload of size 40. The callback function to read from shared memory is getting triggered without sending any payload. As you said, I think this means there is data in the ring before any messages are sent and this causes the rpmsg_rx_callback() to get triggered prematurely. 

    Is there a way I can clear the ring or the shared memory before I send any messages? This way I can test the hypothesis that the error is caused by pre-existing data written to the shared memory. 

    Ryan

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 17, 2018, 4:09:16 PM7/17/18
    to open...@googlegroups.com

    Hi Ryan,

     

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, July 17, 2018 12:55 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    So I have changed the program so that it sends nothing. No packages are sent from either side. If all was working correctly, the program would initialize and then sit idle waiting for packages to come (which are never sent) forever. Even in this version of the program, the A53-Linux side of the application "receives" and prints a payload of size 40. The callback function to read from shared memory is getting triggered without sending any payload. As you said, I think this means there is data in the ring before any messages are sent and this causes the rpmsg_rx_callback() to get triggered prematurely. 

    [Wendy] The A53 is the one to initialize vring, and thus, it should not call rx_callback before it finish initialization.

     

    However, event you didn’t send anything from A53 to RPU, after vring finished initialization, you will received the name service announcement from RPU. As the current version of implementation, RPU will send a NS announcement to announce its RPMsg service when it received the first kick and its payload size is 40. I think the message you have received is the NS announcement.

     

    Best Regards,

    Wendy

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 17, 2018, 4:13:55 PM7/17/18
    to open...@googlegroups.com
    Ah okay. That would make sense. How should I process the NS announcement? The echo_test application treats the NS announcement as if it is a normal payload, which of course is not true.

    Is there a different way I should be receiving this announcement? Or a way to confirm that the message I am receiving is the NS announcement?

    Thank you

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 17, 2018, 4:18:18 PM7/17/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, July 17, 2018 1:14 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Ah okay. That would make sense. How should I process the NS announcement? The echo_test application treats the NS announcement as if it is a normal payload, which of course is not true.

     

    Is there a different way I should be receiving this announcement? Or a way to confirm that the message I am receiving is the NS announcement?

    [Wendy] the library should handle the NS with the ns_callback(), it will not go to the application callback, the rx_callback() will call the ns_callback().

    Are you saying the NS announcement went to your application’s callback() which is incorrect. If this is the case, please track the rx_callback() to see why the ns callback is not get called.

     

    Best Regards,

    Wendy

     

    Thank you

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 17, 2018, 5:01:54 PM7/17/18
    to open...@googlegroups.com
    When the NS announcement is received, it first triggers the rx_callback(), which as you said should call ns_callback(). 

    The if statement "if((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS))" is failing every time, so the rx_callback() never calls the ns_callback. At the time of the if statement, the variable rp_chnl seems to get corrupted. My visual debugger says "rp_chnl" is at address 0x0. I see the following values for rp_ept at the time of the if statement:
    rp_ept = rp_chnl = 0x0
                   cb = 0x408e84 (rpmsg_ns_callback)
                   addr = 53
                   priv = 0x4517a0 

    It seems like rp_chnl gets corrupted for the NS announcement, causing rx_callback to fail to call ns_callback. 



    On Tue, Jul 17, 2018 at 4:18 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 17, 2018, 7:14:54 PM7/17/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Tuesday, July 17, 2018 2:02 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    When the NS announcement is received, it first triggers the rx_callback(), which as you said should call ns_callback(). 

    [Wendy] the rpmsg_rx_callback() will call the rpmsg_ns_callback()

     

    The if statement "if((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS))" is failing every time, so the rx_callback() never calls the ns_callback.

    [Wendy] It is just to send the name service, but not for receiving.

    At the time of the if statement, the variable rp_chnl seems to get corrupted. My visual debugger says "rp_chnl" is at address 0x0. I see the following values for rp_ept at the time of the if statement:

    rp_ept = rp_chnl = 0x0

                   cb = 0x408e84 (rpmsg_ns_callback)

                   addr = 53

                   priv = 0x4517a0 

     

    It seems like rp_chnl gets corrupted for the NS announcement, causing rx_callback to fail to call ns_callback. 

    [Wendy] the rpmsg_rx_callback will call the NS endpoint callback which is rpmsg_ns_callback .

    Are you seeing the callback you defined in your application. E.g. the rpmsg_read_cb() in https://github.com/OpenAMP/open-amp/blob/master/apps/echo_test/echo_test.c received the NS announcement?

     

    Best Regards,

    Wendy

     

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 8:30:44 AM7/18/18
    to open...@googlegroups.com
    Yes that is what I am seeing. "rpmsg_read_cb()" receives the NS announcement and tries to treat it as a normal payload, but it throws an error because it does not expect a payload of size 40 for the first message.

    On Tue, Jul 17, 2018 at 7:14 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 9:37:47 AM7/18/18
    to open...@googlegroups.com
    I believe one of the main causes for this problem is that "rp_hdr" is not being assigned a proper value.

    The lines: 
     /* Process the received data from remote node */
    rp_hdr = (struct rpmsg_hdr *)rpmsg_get_rx_buffer(rdev, &len, &idx);
    result in rp_hdr being assigned to a location in memory which cannot be accessed properly. This results in rp_ept->rp_chnl holding the value "0x0". 

    Jiaying Liang

    unread,
    Jul 18, 2018, 1:25:25 PM7/18/18
    to open...@googlegroups.com

    Hi Ryan

     

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 6:38 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    I believe one of the main causes for this problem is that "rp_hdr" is not being assigned a proper value.

     

    The lines: 

     /* Process the received data from remote node */

    rp_hdr = (struct rpmsg_hdr *)rpmsg_get_rx_buffer(rdev, &len, &idx);

    result in rp_hdr being assigned to a location in memory which cannot be accessed properly. This results in rp_ept->rp_chnl holding the value "0x0". 

    [Wendy] What the value you are seeing in the rp_hdr buffer? Could you dump the buffer?

    [Wendy] Also is your shared memory is mapped as uncached on RPU? From xsdb, are you seeing the same buffer contents?

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 2:18:37 PM7/18/18
    to open...@googlegroups.com
    I cannot dump the buffer. If I try to print any of the contents of "rp_hdr", I get a segmentation fault and the program crashes. 

    I am not as familiar debugging in xsdb. How do I check if my shared memory is mapped as uncached? 

    Just to remind you, I am running FreeRTOS on my RPU. I had problems previously where data size definitions differed from linux to FreeRTOS. Could this be another case of that? 

    Hi Ryan

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 18, 2018, 2:26:47 PM7/18/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 11:19 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    I cannot dump the buffer. If I try to print any of the contents of "rp_hdr", I get a segmentation fault and the program crashes. 

    [Wendy] how about if you just print the pointer of the rp_hdr, does it mean you are not able access that buffer at all?

     

    I am not as familiar debugging in xsdb. How do I check if my shared memory is mapped as uncached? 

    [Wendy] It is OK, you can check the memory with devmem if you know the address.

     

    Just to remind you, I am running FreeRTOS on my RPU. I had problems previously where data size definitions differed from linux to FreeRTOS. Could this be another case of that? 

    [Wendy] if using uint<>_t should be fine.

     

    Hi Ryan

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 2:54:01 PM7/18/18
    to open...@googlegroups.com
    I tried to print the pointer of rp_hdr, and I got a segmentation fault once again. 

    I removed all my print commands from the file and reverted it back to a version of the program that was not throwing a segmentation fault, yet I still fail with a segmentation fault. The program gets to "virtqueue_get_buffer" and the exits when it hits the line "if ((vq = NULL) || (vq->vq_used_cons_idx == vq->vq_ring.used->idx)) return (NULL);". It exits with seg fault. 

    On Wed, Jul 18, 2018 at 2:26 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    Hi Ryan

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 4:26:07 PM7/18/18
    to open...@googlegroups.com
    Digging a bit deeper, I have found that the segmentation fault is caused because "vq->vq_ring". Its components are mapped to a memory locations that cannot be accessed.

    Inside rpmsg_rx_callback, "vq->vq_ring" has the following struct values:
    vq_ring->num = 256
    vq_ring->desc = 0x7fb75a4000
    vq_ring->avail = 0x7fb75a5000
    vq_ring->used = 0x7fb75a6000         (these memory locations are not accessible. Attempts to access them cause segmentation fault)


    I am not sure if these are supposed be the same address, but in my device tree, my vring node is located at 0x3ED40000.

    Is there a way I can turn off the namespace announcement to see if the application works otherwise? 


    ...

    [Message clipped]  

    Jiaying Liang

    unread,
    Jul 18, 2018, 4:28:32 PM7/18/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 11:54 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    I tried to print the pointer of rp_hdr, and I got a segmentation fault once again. 

     

    I removed all my print commands from the file and reverted it back to a version of the program that was not throwing a segmentation fault, yet I still fail with a segmentation fault. The program gets to "virtqueue_get_buffer" and the exits when it hits the line "if ((vq = NULL) || (vq->vq_used_cons_idx == vq->vq_ring.used->idx)) return (NULL);". It exits with seg fault. 

    [Wendy] This dones’t sound right. Likely it segfaults when the application tries “vq->vq_ring.used->idx” looks like you vring got corrupted.

     

     

    Hi Ryan

     

    Hi Ryan,

     

    Hi Ryan,

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 18, 2018, 4:30:24 PM7/18/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 1:26 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Digging a bit deeper, I have found that the segmentation fault is caused because "vq->vq_ring". Its components are mapped to a memory locations that cannot be accessed.

     

    Inside rpmsg_rx_callback, "vq->vq_ring" has the following struct values:

    vq_ring->num = 256

    vq_ring->desc = 0x7fb75a4000

    vq_ring->avail = 0x7fb75a5000

    vq_ring->used = 0x7fb75a6000         (these memory locations are not accessible. Attempts to access them cause segmentation fault)

     

     

    I am not sure if these are supposed be the same address, but in my device tree, my vring node is located at 0x3ED40000.

    [Wendy] those looks like virtual address, you can get physical address from libmetal metal_io_virt_to_phys()

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 4:58:49 PM7/18/18
    to open...@googlegroups.com
    I can't use "metal_io_virt_to_phys()" because any attempts to access that virtual address causes a segmentation fault. 

    If the vring is corrupted, how do all payload messages get sent and received successfully? 

    It is only the namespace announcement that gets corrupted. Where in the initialization should I be looking for the corrupted buffer? On APU or RPU side?

    On Wed, Jul 18, 2018 at 4:30 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 5:14:47 PM7/18/18
    to open...@googlegroups.com
    Throughout debugging, the program has a variable for "num_vrings". This value is always 2, but I only defined 1 vring in my device tree. Is this wrong? Or am I misunderstanding. 

    Jiaying Liang

    unread,
    Jul 18, 2018, 5:20:49 PM7/18/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 2:15 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Throughout debugging, the program has a variable for "num_vrings". This value is always 2, but I only defined 1 vring in my device tree. Is this wrong? Or am I misunderstanding. 

    [Wendy] This fine, as both vrings can share the same I/O region(presented as vring device node in the device tree) as long the I/O region is large enough.

    [Wendy] it is very strange that you get seg fault from accessing the vring but somehow you are able to send/receive messages.

    How about you print the vring address from vq_ring_init() in lib/virtio/virtqueue.c?

     

    Best Regards,

    Wendy

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 18, 2018, 5:52:17 PM7/18/18
    to open...@googlegroups.com
    In vq_ring_init() the "vr" vring variable is at the address "0x451ad0". 

    I also tried this:
    void *buffer;
    buffer = metal_io_virt_to_phys(vq->shm_io, vr->desc);
    printf("Buffer location: %p\n", buffer);
     resulted in printing ---> "Buffer location: 0xffffffffffffffff"

    I also tried this:
    void *buffer;
    buffer = metal_io_virt_to_phys(vq->shm_io, (void *)0x7fb75a4000);
    printf("Buffer location: %p\n", buffer);
     resulted in printing --->  "Buffer location: 0xffffffffffffffff"

    Not sure if I screwed up trying to print the location. But these are the values I got. 

    On Wed, Jul 18, 2018 at 5:20 PM, Jiaying Liang <jli...@xilinx.com> wrote:
    ...

    [Message clipped]  

    Jiaying Liang

    unread,
    Jul 19, 2018, 3:22:36 AM7/19/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Wednesday, July 18, 2018 2:52 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    In vq_ring_init() the "vr" vring variable is at the address "0x451ad0". 

     

    I also tried this:

    void *buffer;

    buffer = metal_io_virt_to_phys(vq->shm_io, vr->desc);

    printf("Buffer location: %p\n", buffer);

     resulted in printing ---> "Buffer location: 0xffffffffffffffff"

    [Wendy] desc should be part of the vring memory but not part of the shared buffer memory

     

    I also tried this:

    void *buffer;

    buffer = metal_io_virt_to_phys(vq->shm_io, (void *)0x7fb75a4000);

    printf("Buffer location: %p\n", buffer);

     resulted in printing --->  "Buffer location: 0xffffffffffffffff"

    [Wendy] Did you print in the vq_ring_init() function, at that time, the buffers are not added yet.

    The buffer will be added in rpmsg_rdev_create_virtqueues()

     

    --

    Ryan Heminway

    unread,
    Jul 19, 2018, 11:00:27 AM7/19/18
    to open...@googlegroups.com
    The buffers do not appear to be corrupted when they are created in rpmsg_rdev_create_virtqueues. 

    I believe the problem starts at rpmsg_rx_callback. The "rdev" device is being initialized improperly. In rpmsg_rx_callback, rdev->rvq does not look initialized.
    rdev->rvq->callback = 0x0
    rdev->rvq->vring->desc = 0x0
    rdev->rvq->vring->avail= 0x0
    rdev->rvq->vring->used= 0x0
    rdev->rvq->vring->shm_io = 0x0

    So when this rdev device gets passed down to virtqueue_get_buffer, it tries to access data at 0x0, and seg faults. vq which is passed to rpmsg_rx_callback appears to be properly initialized with name "rx_vq" a populated vq_ring and shm_io. Where does the rdev (and vdev) device get its value?


    On Thu, Jul 19, 2018 at 3:22 AM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 19, 2018, 11:25:01 AM7/19/18
    to open...@googlegroups.com
    I believe the memory for the vring has been corrupted. How should I go about initializing a new vring with a new location or name? No matter what I do, my application is seg faulting. This was not happening before I tried to dump the contents of the vring. 

    Ryan Heminway

    unread,
    Jul 19, 2018, 1:29:48 PM7/19/18
    to open...@googlegroups.com
    I have fixed my segmentation fault error. I had accidentally deleted the line where vdev was getting initialized in virtqueue_get_buffer(). I now have the same issue as I had previously: When the NS announcement gets sent from the R5 to the A53, the normal payload callback is used instead of the ns_callback. 

    Ryan Heminway

    unread,
    Jul 19, 2018, 2:57:14 PM7/19/18
    to open...@googlegroups.com
    Sorry for the large number of emails, but I am trying to understand what is happening here. I have a couple questions regarding the rpmsg initialization. 

    Why is the NS announcement necessary, and why is it happening? In "rsc_table.c", on both sides, VIRTIO_RPMSG_F_NS is set to 0. Doesn't this mean there should be no NS announcement happening? 

    Either way, when rpmsg is being initialized, rpmsg_rx_callback is called. In this function, rp_chnl->state = 0 during the first time it is called. Because of this, it is != RPMSG_CHNL_STATE_NS, so it does not process the first message properly.

    Ryan Heminway

    unread,
    Jul 19, 2018, 3:50:11 PM7/19/18
    to open...@googlegroups.com
    Furthermore, in rpmsg_rx_callback, you are using "unsigned long" as the type for "len". Is this not a problem for differing data sizes? On FreeRTOS, an unsigned long is 4 bytes while on Linux, an unsigned long is 8 bytes. 

    Jiaying Liang

    unread,
    Jul 19, 2018, 6:05:05 PM7/19/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Thursday, July 19, 2018 12:50 PM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    Furthermore, in rpmsg_rx_callback, you are using "unsigned long" as the type for "len". Is this not a problem for differing data sizes? On FreeRTOS, an unsigned long is 4 bytes while on Linux, an unsigned long is 8 bytes. 

    [Wendy] it is fine as the len in the vring virtio_ring.h is fixed to 32bit.

     

    On Thu, Jul 19, 2018 at 2:57 PM, Ryan Heminway <ryanhe...@gmail.com> wrote:

    Sorry for the large number of emails, but I am trying to understand what is happening here. I have a couple questions regarding the rpmsg initialization. 

     

    Why is the NS announcement necessary, and why is it happening? In "rsc_table.c", on both sides, VIRTIO_RPMSG_F_NS is set to 0. Doesn't this mean there should be no NS announcement happening? 

    [Wendy] Name service is for one side to notify the other its available service. Right, today’s implementation it just always sent the name service out, which is not necessary.

    However, which is confusing to your issue is the in the rx_callback, it will get the endpoint based on the endpoint address in the rpmsg header (rp_ept = rpmsg_rdev_get_endpoint_from_addr(rdev, rp_hdr->dst);). Unless the name service header itself is corrupted, otherwise, it should go to the name service endpoint callback but not the user defined endpoint callback. You can dump the received message from rx_callback to check the target endpoint address

     

    Best Regards,

    Wendy

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 20, 2018, 2:11:49 PM7/20/18
    to open...@googlegroups.com
    I have clarified some of my confusion. I have to apologize, I am a bit new to this so I made some assumptions in my debugging that were incorrect.

    The namespace announcement from the RPU to the APU is getting handled properly. I was misunderstanding. 

    The issue remains that, when I send the first message from APU to RPU, the "rpmsg_read_cb" is triggered prematurely. The first message is never received on the RPU side. On the APU, it acts as if the message was echoed back, but the message is size 40. 

    Do you have any ideas why the APU would assume there is a message in the queue without ever successfully transmitting a message to the RPU? The RPU is not issuing a response, so the APU should not be triggering a message callback. 

    Thank you for your continued insight.

    On Thu, Jul 19, 2018 at 6:05 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 20, 2018, 5:18:07 PM7/20/18
    to open...@googlegroups.com

    HI Ryan,

     

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Friday, July 20, 2018 11:12 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    I have clarified some of my confusion. I have to apologize, I am a bit new to this so I made some assumptions in my debugging that were incorrect.

    [Wendy] No worries, I hope we can improve code to make it easier to understand.

     

    The namespace announcement from the RPU to the APU is getting handled properly. I was misunderstanding. 

     

    The issue remains that, when I send the first message from APU to RPU, the "rpmsg_read_cb" is triggered prematurely. The first message is never received on the RPU side. On the APU, it acts as if the message was echoed back, but the message is size 40. 

    [Wendy] did you set break point to make sure RPU didn’t send anything to APU? and when you call poll(), APU application callback will still get the message?

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 23, 2018, 11:01:34 AM7/23/18
    to open...@googlegroups.com
    I have set up some print messages on the RPU to see what is happening. 

    The RPU initializes, and sends 1 NS message, and the APU receives and handles it properly. 

    When the APU sends its first payload message, the RPU does not receive it in the main loop where it should. However, it still responds with a message. But instead of echoing back the message it received (size 17), it echoes back a message of size 40. Digging deeper, the message it is sending is the NS announcement, again. 

    Why would "rpmsg_send_offchannel_raw" get called with the NS_MESSAGE as the data it gets passed? 


    HI Ryan,

     

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 23, 2018, 12:46:35 PM7/23/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Monday, July 23, 2018 8:02 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    I have set up some print messages on the RPU to see what is happening. 

     

    The RPU initializes, and sends 1 NS message, and the APU receives and handles it properly. 

     

    When the APU sends its first payload message, the RPU does not receive it in the main loop where it should. However, it still responds with a message. But instead of echoing back the message it received (size 17), it echoes back a message of size 40. Digging deeper, the message it is sending is the NS announcement, again. 

    [Wendy] did you figure out which function sends this message? is it from the application’s callback? Or from “rpmsg_send_ns_message()”? the “rpmsg_send_ns_message()” always sends the message to name service endpoint. If it is from the application’s callback, you can add print to the application’s callback and the rpmsg_rx_callback to see what message it received first.

    HI Ryan,

     

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 23, 2018, 1:00:06 PM7/23/18
    to open...@googlegroups.com
    I believe "rpmsg_ns_callback" is the source of the 2nd NS announcement. 

    The first NS announcement comes from RPU to APU. This triggers the NS_CALLBACK on APU, which echoes the NS announcement back to the RPU. The RPU receives the NS announcement, triggering NS_CALLBACK, which echoes the NS announcement back to the APU for a 2nd time. This time, instead of NS_CALLBACK being called, rpmsg_read_cb gets called, processing the NS announcement as a normal payload message.

    Is the NS announcement supposed to get continuously echoed back like this? 

    On Mon, Jul 23, 2018 at 12:46 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    HI Ryan,

     

    --

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 23, 2018, 1:01:33 PM7/23/18
    to open...@googlegroups.com
    In rpmsg_ns_callback, it uses "rpmsg_send" to send the NS announcement instead of using "rpmsg_send_ns_message". 

    Ryan Heminway

    unread,
    Jul 23, 2018, 1:24:46 PM7/23/18
    to open...@googlegroups.com
    It seems that is the intended course of action. So what is supposed to happen on the APU side to process that final NS message? 

    ...

    [Message clipped]  

    Jiaying Liang

    unread,
    Jul 23, 2018, 1:28:02 PM7/23/18
    to open...@googlegroups.com

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Monday, July 23, 2018 10:25 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    It seems that is the intended course of action. So what is supposed to happen on the APU side to process that final NS message? 

    [Wendy] the NS message should only send to name service endpoint.

     

    On Mon, Jul 23, 2018 at 1:01 PM, Ryan Heminway <ryanhe...@gmail.com> wrote:

    In rpmsg_ns_callback, it uses "rpmsg_send" to send the NS announcement instead of using "rpmsg_send_ns_message". 

    [Wendy] are you using the latest master? from the latest master, I can see ns_callback using rpmsg_send_ns_message.

     

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 23, 2018, 2:02:56 PM7/23/18
    to open...@googlegroups.com
    On the RPU, I am using the code from the XSDK demo application. The code comes from the template application. The libraries should be up to date, yes?


    On Mon, Jul 23, 2018 at 1:27 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Ryan Heminway

    unread,
    Jul 23, 2018, 2:04:03 PM7/23/18
    to open...@googlegroups.com
    If my BSP is out of date in XSDK, is there a way I can pull the most recent sources and rebuild the BSP? 

    On Mon, Jul 23, 2018 at 1:27 PM, Jiaying Liang <jli...@xilinx.com> wrote:

     

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+unsubscribe@googlegroups.com.

    Jiaying Liang

    unread,
    Jul 24, 2018, 12:32:43 PM7/24/18
    to open...@googlegroups.com

    Hi Ryan,

     

    From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ryan Heminway
    Sent: Monday, July 23, 2018 11:04 AM
    To: open...@googlegroups.com
    Subject: Re: [open-amp] Running libmetal_amp_demo on Ubuntu 16.04

     

    If my BSP is out of date in XSDK, is there a way I can pull the most recent sources and rebuild the BSP? 

    [Wendy] you can copy the openamp source code lib/ dir to your BSP’s   psu_cortexr5_0/libsrc/openamp_v1_5/src/open-amp/lib/ directory, or follow “Example to compile Zynq UltraScale+ MPSoC R5 generic(baremetal) remote” in the README file to build OpenAMP with Xilinx XSDK BSP(without enabled openamp library).

     

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --

    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.


    To post to this group, send email to open...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    You received this message because you are subscribed to the Google Groups "open-amp" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to open-amp+u...@googlegroups.com.

    Reply all
    Reply to author
    Forward
    0 new messages