07-21-2016 03:17 AM
Hello,
I'm a newbie so take it easy on me.
I've used the https://github.com/analogdevicesinc/hdl to build a design with hdmi monitor and I added an IP for image processing that I generated with vivado HLS and a VDMA to transfer data between my ip and the ddr.
I've tested the design on sdk with a standalone application and it is working fine. Now I want to run my application on a running linux on my zc702( I'm using an sd card with 2 partitions: Linaro FS and one for booting files).
I've seen that people are using <sys/mman.h> to communicate with the PL blocs like :
void configureVDMA(unsigned long vdma_physical_base) { unsigned long int PhysicalAddress = vdma_physical_base ; int map_len = 0x20; int fd = open( "/dev/mem", O_RDWR); unsigned char* vdma_base_address; vdma_base_address = (unsigned char*)mmap(NULL, map_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, (off_t)PhysicalAddress); if(vdma_base_address == MAP_FAILED) { perror("VDMA Mapping memory for absolute memory access failed.\n"); return; } DEBUG_Printf ("VDMA mapping 0x%x to 0x%x, size = %d\n ", (int )PhysicalAddress, (int)vdma_base_address, map_len ); .....
munmap((void *)vdma_base_address, map_len); close(fd); }
But I got the failed message.
I don't know but should I add drivers to the kernel image "uImage" for PL blocs? and if yes, should I add drivers for both the HLS IP and VDMA?
I need your help plz
07-21-2016 04:15 AM
Hi jackolus
Could you make sure whether device tree blob file is correct or not ?
Also, could you show me device tree source file ?
Thank you.
Best regards
07-21-2016 04:55 AM
07-21-2016 05:12 AM
Hi jackolus
Could you execute the following commands on your linux and show me the result ?
% ls /proc/device-tree/amba
% ls -l /proc/device-tree/amba_pl
% ls /boot/
Thank you
Best regards,
07-21-2016 05:36 AM
I tried the commands and here are the results:
% ls /proc/device-tree/amba
% ls -l /proc/device-tree/amba_pl
there was no "amba_pl" in the device-tree directory
% ls /boot/
was empty
07-21-2016 07:40 AM
Hi jackolus
I confirmed your uploaded information.
According to them, the description of device tree source file and the result of "ls /proc/device-tree/amba" and "ls /proc/device-tree/amba_pl" are different.
It's very strange.
Could you explain how to generate device tree blob file to me ?
or
Could you make sure device tree blob file ?
I'm probably sure that the route cause is wrong device tree blob file.
Thank you.
Best regards,
07-22-2016 08:40 PM
You don't have to add drivers to the kernel if you are going to write userspace drivers using mmap. If you don't have anything in the amba_pl directory it means you device tree is not correct. Are you sure the system.dts is including your dtsi file?
jeff
07-25-2016 04:53 AM
Thank you both jeffdaq and watari, you are correct the problem was in the devicetree I've been using the https://github.com/analogdevicesinc/linux.git devicetree (sorry I feel stupid now).
However, now I'm having another problem. I'm using SDK to build my devicetree and when I tested it the hdmi monitor isn't working, I'm able to access the filesystem through uart but the hdmi isnt working.
Could the problem be the audio because when booting, I used to get:
ALSA device list:
#0: HDMI monitor
...
However now I'm getting
ALSA device list:
No soundcards found.
...
07-25-2016 07:27 AM
Hi jackolus
Could you show me your block diagram for HDMI ?
Also, how do you generate output clock frequency at HDMI ?
Thank you.
Best regards,
07-26-2016 02:19 AM
Hello watari,
Thank you for responding.
I couldn't attatch my block design so here it is https://drive.google.com/open?id=0BzR7agsHdJabbGxpUGpodVMzVkE.
However, can you please check if I am building the devicetree correctly?
I'm using this repository : https://github.com/Xilinx/device-tree-xlnx
and the default settings :
execpt for bootargs I'm using: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait
Am I doing something wrong?
07-26-2016 08:08 PM
Hi jackolus
I can't access https://drive.google.com/open?id=0BzR7agsHdJabbGxpUGpodVMzVkE.
Could you show me block diagram ?
Also could you show me device tree source file, what you want to build and result by "ls" command, if you want that I confirm it ?
Thank you.
Best regards,
08-04-2016 10:08 AM
08-09-2016 02:10 AM
Hi jackolus
I mention to you.
1) HDMI issue
I guess you connect HDMI monitor via HDMA calue with AUX/Audio.
Hence you find this message.
> ALSA device list:
> #0: HDMI monitor
> ...
> However now I'm getting
2) device-tree issue
I already confirmed your uploaded files.
You define axi_vdma_0 in pl.dtsi file.
However, I can't find this definition in your posted picutre which is generated by "ls /proc/device-tree/amba" and "ls /proc/device-tree/amba_pl" to make sure recognition of device tree.
Hence I suspect you have mistake to generate device tree blob file.
Could you execute the following command to make sure the definition of device tree ?
% dtc -I dtb -O dts -o <output dts file name> <input dtb file name>
After that, you get "<output dts file name>" file as device tree source file and you can confirm it.
Could you confirm it, too ?
Thank you.
Best regards,
08-10-2016 01:36 AM
Hello watari,
Thank you for responding.
The pictures I've posted where when I was using the analogdevicesinc from github. Now I'm generating my own devicetree using SDK and here are the results: