I am developing an AMP solution (Linux master, FreeRTOS slave) for my thesis, and so far I am able to run matrix multiplication demo but I can't modify the Linux master code. I have a couple of questions and every possible help is much appreciated.
1) I found the source code for master application at (https://github.com/OpenAMP/meta-openamp/tree/master/recipes-openamp/rpmsg-examples/rpmsg-mat-mul) and I created a new app from c template called "mymaster" by petalinux tools. My initial plan was to copy the source code into mymaster.c and after compiling it everything should have been worked.
2) After compiling it, I got an error; "#include <linux/rpmsg.h>" no such file or directory". I solved this issue by downloading the linux header files and putting a variable to that folder as CFLAGS, in Makefile. But now I got the errors down below.
ERROR: Logfile of failure stored in: /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/mymaster/1.0-r0/temp/log.do_compile.16468
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| ERROR: oe_runmake failed
| arm-xilinx-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm -c -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/mymaster/1.0-r0=/usr/src/debug/mymaster/1.0-r0 -fdebug-prefix-map=/home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm= -I/usr/src/linux-headers-4.13.0-38/include -o mymaster.o mymaster.c
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:38:0,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/types.h:14:26: error: conflicting types for 'fd_set'
| typedef __kernel_fd_set fd_set;
| ^~~~~~
| In file included from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/types.h:219:0,
| from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/stdlib.h:314,
| from mymaster.c:11:
| /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/select.h:75:5: note: previous declaration of 'fd_set' was here
| } fd_set;
| ^~~~~~
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:38:0,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/types.h:15:25: error: conflicting types for 'dev_t'
| typedef __kernel_dev_t dev_t;
| ^~~~~
| In file included from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/stdlib.h:314:0,
| from mymaster.c:11:
| /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/types.h:60:17: note: previous declaration of 'dev_t' was here
| typedef __dev_t dev_t;
| ^~~~~
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:38:0,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/types.h:17:26: error: conflicting types for 'mode_t'
| typedef __kernel_mode_t mode_t;
| ^~~~~~
| In file included from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/stdlib.h:314:0,
| from mymaster.c:11:
| /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/types.h:70:18: note: previous declaration of 'mode_t' was here
| typedef __mode_t mode_t;
| ^~~~~~
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:38:0,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/types.h:25:26: error: conflicting types for 'timer_t'
| typedef __kernel_timer_t timer_t;
| ^~~~~~~
| In file included from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/types.h:132:0,
| from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/stdlib.h:314,
| from mymaster.c:11:
| /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/time.h:103:19: note: previous declaration of 'timer_t' was here
| typedef __timer_t timer_t;
| ^~~~~~~
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:38:0,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/types.h:134:23: error: conflicting types for 'blkcnt_t'
| typedef unsigned long blkcnt_t;
| ^~~~~~~~
| In file included from /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/stdlib.h:314:0,
| from mymaster.c:11:
| /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/sysroots/plnx_arm/usr/include/sys/types.h:235:20: note: previous declaration of 'blkcnt_t' was here
| typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */
| ^~~~~~~~
| In file included from /usr/src/linux-headers-4.13.0-38/include/linux/kernel.h:6:0,
| from /usr/src/linux-headers-4.13.0-38/include/linux/list.h:8,
| from /usr/src/linux-headers-4.13.0-38/include/linux/kobject.h:20,
| from /usr/src/linux-headers-4.13.0-38/include/linux/device.h:17,
| from /usr/src/linux-headers-4.13.0-38/include/linux/rpmsg.h:39,
| from mymaster.c:18:
| /usr/src/linux-headers-4.13.0-38/include/linux/linkage.h:7:25: fatal error: asm/linkage.h: No such file or directory
| #include <asm/linkage.h>
| ^
| compilation terminated.
| make: *** [Makefile:31: mymaster.o] Error 1
| ERROR: Function failed: do_compile (log file is located at /home/berk/Desktop/Petalinux_Projects/deneme6/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/mymaster/1.0-r0/temp/log.do_compile.16468)
3) How can I solve this issue, all I want is to be able to modify linux master side of the example applications, since I am already able to modify the FreeRTOS side, I will be ready to develop my final application. Thanks in advance for your help and answers. All are much appreciated.
Sincerely,
Berk
Sent: Wednesday, April 25, 2018 4:46 PM
To: open-amp <open...@googlegroups.com>
Subject: Re: [open-amp] Matrix Multiplication Linux User Space Zynq7000
Thank you very much for your response Wendy, however after trying many hours, I am still not able to overcome the issue. Let me explain it very simple to you:
1) I can run AMP examples provided (echo_test and mat_mul_demo)
2) I am able to modify the slave code from xsdk, creating the .elf file and putting it into recipes-apps/<app-name>/files directory and editing the bitbake recipe, works perfectly.
3) I want to be able to modify linux master code of these applications as well and I found these codes from meta-openamp repository. How can I do it, can you please explain step by step maybe ?
[Wendy] you can add meta-openamp to your layer, and then build the rpmsg-echo-test first to see if it works
and then you can create your own app based on the example.
You can try copy the recipe and the source file and makefile and make update.
Since my deadline is approaching for the thesis, any explanation will be greatly appreciated. Thank you so much in advance Wendy.
Sincerely,
Berk
--
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.