Compiling AXI DMA linux drivers in SDK.

Hi guys,
I think I'm doing something wrong and It's making me crazy. I've got:
Vivado 2015.2 w/ SDK.
Zynq zc702.
Tested in Linux 14.04 and Windows 7.
And I want to use the axi dma drivers in a Linux application so that I downloaded the axidma_test.c example. At first most of the linux libraries threw an error until I linked somehow the libraries I found in the git repository "linux-xlnx/include".
Then all of the "linux/*.h" libraries are recognized, but a new error appears: fatal error: asm/linkage.h not found. I tried to include this last one but I just made it worse. I cut down the code so that I only have a small snippet, having the same error:
#include <linux/dma-mapping.h>
int main() {
    printf("Hello World\n");
    return 0;
I'm starting to think that I'm making it more difficult than it should be.
Could anyone give me some advise how to successfully compile that small snippet? I would really appreciate it.
Regards,
Leroy
 

Hello Leroy,
Hmmm okay I found the one that I was thinking of:
http://forums.xilinx.com/t5/Embedded-Linux/AXI-DMA-with-Zynq-Running-Linux/m-p/523105#M10658
There's a presentation there with some code. About halfway down the pdf is an explanation of the software architecture for the AXI DMA linux driver and an explanation of where you need to add your application-specific layers and an example of doing so.
As far as compiling, you really need two pieces still (bear in mind, I'm a little out of my area of expertise talking about the linux software side, so someone with more knowledge may correct the finer details. This is based on what I've gathered...):
1) Kernel module to interface from the driver to userspace (for simplicity, you might use UIO for this like the second pdf that linnj posted in that link)
2) Some application that runs in userspace that communicates with 1 above.
For 1, you don't use SDK. You build a cross compile environment dependent on your kernel configuration and follow build steps:
http://www.tldp.org/LDP/lkmpg/2.6/html/x181.html
For 2, you'd use SDK as you are to build a Linux 'Application' (the word seems to have the connotation of running in userspace).

Similar Messages

  • Multiple AXI DMA channels on zedboard

    Hello All,
    I am trying to use the two HP ports in zedboard by connecting axi-dma [instantiating two times] in a loopback fashion. I have already written a linux driver for single axi-dma connected to one HP port in a loopback fashion and it is working fine. Now I am extending to use multiple HP ports but could not able to do it successfully. I have also updated the device tree file with new axi-dma instantiation, created the necessary bitstream and loaded into the board.
    I referred the xilinx website, 
    http://www.wiki.xilinx.com/DMA+Drivers+-+Soft+IPs
    They say "NOTE: Multi-channel mode of AXI DMA is not supported in the driver."
    Meaning, I cannot able to use the remaining HP ports with axi-dma driver? 
    Could you please give me some suggestions or websites or threads for this concern?
    Thanks,
    Mani...

    Hello  and All,
    I forgot to ask one more thing.... While I was doing experiments with Xilinx axi-dma I was not able to get the interrupts working... 
    Well I will try to explain bit more,
    Linux driver is developed using the dma generic engine with the following procedure,
    i)   Get the dma slave channel with proper mask and filter.
    ii)  prepare for the dma copy with the correct direction.
    iii) Register a callback [On completion this callback should be called automatically]
    iv) Submit the transaction
    v)  Issue the transaction....
    vi) Wait for a flag until it becomes some specified value for termination... and this flag will be set to the proper value only in the callback....
    If I follow this procedure, then every time my driver get hangs since there is no callback being called after completion.....
    So I removed the final step and it seems everything works correctly.... I could able to see the updated and correct values....
    Of course, this is not the proper way of assessing the time taken for writing data using dma..... 
    Any idea about this issue? 
    I made sure the F2P thing is enabled and also I could able to see cdma interrrupt is getting registered in /proc/interrupt....
     

  • Where are the Audigy 2 ZS Linux Drivers?????????????????????????????????????????

    I Just recently installed Fedora core 4 on a partition on one of the Raids and discovered I cannot find a creative Audigy2 zs linux driver anywhere? I have found a all in one alsa driver set but so far no success, and i'd prefer not to use non certified drivers on the audigy2 due to hardware failing on me in the past because of bad drivers. Why is there a Linux section in the drivers area and no linux drivers? eh common if you haven't coded linux drivers after the ammount of time the audigy2 zs has been released for ... then why you guys are going to have to have the proverbial finger removed from the preverbial arse and support your customers ... I've seen 00's of questions in forums about creative drivers for linux ... if you guys are going to be racists and only code microsloth / bloatware then I think i'll be more than happy to chuck the audigy2 on the junk pile and use the evil on board ac '97 which HAS Linux drivers....
    Totally Frustrated and fed up
    :BumpMessage Edited by Isiah on -07-2005 :38 PM

    Incase it helps ... specs for system follows:
    3.2E skt-478 @ 4GHZ
    Asus P4P800E Delexe
    Corsair 4000 pro @ 490mhz Dualchannel,Liniar mode
    Gigabyte 6600gt TFE @ 550mhz-core/.3ghz-ddr3 (yes its better than a 6800GT)
    Audigy 2 ZS
    2x WD 80GB SATA RAID0 60GB
    2x WD 250GB SATA RAID2+0 500GB
    40GB seagate IDE (Cacheing dri've)
    gigabyte dvd-rw
    dvd combo dri've
    etc
    etc
    etc
    Windows XP Pro Partition
    Fedora Linux Core Rev.4 Partition
    /w G.R.U.B boot control

  • Can I use LINUX Drivers in Solaris 10...

    As a beginner, I have installed Solaris 10 version 08/07 onto my system. The motherboard is ASUS M2A-VM, with integrated graphics, network interface, audio, etc...
    My audio and network interface are not working... The motherboard came with a cd which has windows drivers and additional software.
    It also has linux drivers for:
    Audio:
    Core5
    Core6
    Linux
    RHEL4
    SUSE10
    Other
    realtek-linux-audiopack-4.05f
    LAN
    FreeBSD
    Linux
    SCO_OpenServer6
    Unixware7.x
    Chipset, and RAID!
    Has anyone used any of these ASUS Linux drivers with Solaris...
    If so what steps do I need to take to get them to work on my system! (I hate to ask, I know you all have better things to do) Maybe you can point me to a good book that explains how to go step by step...
    My question is how do I get my NIC to work (What steps do I need to follow? the sound is not an issue, as, I can do with out that. Will any of the drivers mentioned above work?) thank you in advance for your answers...

    Drivers are the "connective tissue" between the Operating System and the hardware. The connections from the drivers to the OS are not compatible between different operating systems, so no, you cannot use Linux drivers in Solaris.
    If the OS is similar enough you can sometimes get away with it -- example, using Solaris 9 drivers in Solaris 10. But between completely different OSes? Won't work.

  • Is it possible to use linux drivers to get a pluscom USB to ethernet adaptor to work.

    I'm grasping at straws here, the adaptor it seems has only linux and windows drivers and I'm avoiding having to return it, given the dramatic difference in price between these adaptors and the official apple onese for a device with the same functionality it'd be best to get these working. I found an open source website with drivers for other brands which are said to work for devices not of the particular brand the driver is said to be for as well but there's no guarantee. I'd try these out but none of those on offer are for the right chipset (ADM8515) so I think it would be very risky to try running drivers that are open source, not from the developer, and are for a different chipset.
    The cd that came with the device has linux drivers, Mac OS x and linux are in a way based on the same architecture, is there a chance these drivers are installable and would work with Mac OS x 10.6.8?

    Yeh Great thanks, anyone have any real answers? Incidentally it isn't my machine which shouldn't really be of any importance to the discussion as I'm asking for technical advice about the Mac OS x system. But yeh thanks your glib remarks help a great deal.

  • How to compile form in linux server

    Hi All:
    Any one can say how to compile form in linux server using form builder fmb.

    If you are talking about forms 10g then here is the method
    1) run x windows interface on your machine
    2) login to linux server
    $ export DISPLAY=<IP address of machine>:0.0
    $ frmcmp.sh module_type=form module=myform.fmb userid=user/password@connectstring compile_all=yes
    Regards
    Anuj

  • LabVIEW for Linux, Drivers for DAQCard 500 & DAQCard-AO-2DC

    I can't seem to find the drivers on the web site. If they are not yet available, when can I get them? Thank you, Harry

    Harry,
    National Instruments currently does not provide any linux drivers for its daq devices. You can get all the related info you need about labview, daq and linux from http://www.ni.com/linux/.
    Check this site out and it'll lead you to the Comedi project website from where you may be able to get open-source drivers for some of NI's data acquistion products.
    Regards,
    Afreen S.
    www.ni.com/ask

  • Compiling an old linux code on a new mac

    Hello,
    I am trying to compile an old Linux program on my new macbook pro (Intel + 10.6). The program uses a mix of fortran and c source codes. On the Linux environment where it works I have gcc(f77) 3.2.3 installed.
    The only external library called for in the Makefile is libg2c, which as far as I can tell comes with gcc 3 but not any longer in gcc 4. This means that the original Makefile, which works on a Linux environment with gcc 3.2.3 does not work on my Mac.
    For sure I need some g2c-like library because the system is mixing Fortran and C code, and doesn't compile if I just remove -lg2c from the Makefile, the compiling crashes.
    I have tried to install libf2c from Fink but it doesn't seem compatible with gfortran created code.
    Now I'm a bit lost. Can someone offer some help?

    atticus_pf wrote:
    You keep saying gcc4.4 is bad.
    There is nothing inherently wrong with gcc4.4. I just don't trust anything that comes from the Mac "ports" packages. Why would I need to "port" something to MacOS X if it build fine from a tarball? More importantly, why would I use a version newer than what Apple ships with the OS? MacOS X is not Linux. Those newer versions have not been tested and MacOS X and MacOS X is fundamentally different from any OS that those versions have been tested on. If you want to test new software on Mac OS X, that's great. Just get the original code and build it yourself instead of going through a 3rd party who may or may not know what they are doing. Every time I see a problem here in Apple Discussions with someone who can't build an open-source software package on MacOS X, some "ports" package has been installed. Every Time.
    What is the best version to use? I have gcc in /usr/bin which is gcc 4.2.1 - I think this is the apple version. ... I just want to use what is best and most reliable.
    That would be the one Apple build the OS with. Even then, gcc 4.2.1 is still a bit flaky on MacOS X. Apple may never use gcc 4.4. It is moving towards Clang for future development.
    gcc -framework Carbon -arch i386 -m64 -g -I/Users/jpfaendt/Modeling/parest/ddasac/software/include -O2 -o parest ./model.o jacobian.o bsub.o -L/Users/jpfaendt/Modeling/parest/ddasac/software -L/Users/jpfaendt/Modeling/parest/ddasac/software/myUtil -L/Users/jpfaendt/Modeling/parest/ddasac/software/lib -L/sw/lib/gcc4.4/lib -lm -lliqparest -ldassl -lgregpack -lgfortran -lUtil -L/sw/lib/gcc4.4/lib/
    Undefined symbols:
    "_Delete", referenced from:
    _ModelODEs in model.o
    sorry for the messy paste, it's an ugly makefile (although it works in linux). You can see I'm including libraries that I myself compiled (libliqparest, libdassl, libgregpack, libUtil are all compiled in this code).
    But what is that "-m64" doing there? That is not a good flag to use even in the best of times. It really isn't appropriate with "-arch i386". Add to that the fact that Carbon isn't 32-bit and you've got a mess-o-problems.
    The first function that has a problem above (_Delete) is defined in a c program that is compiled as part of libUtil.a. This library just has a bunch of house-made functions for vector handling, etc. The code could be probably be overhauled to not need this anymore but I don't have the energy to do it.
    I really think these are old relics of a MacOS port back when you needed such "ports" because MacOS (note the absence of "X") didn't have such things as open(), malloc(), and free().
    You have the source to libUtil.a, so it would be worthwhile to look at it and see if my hypothesis is correct. You may be able to fix it with just a compiler flag and have it use the POSIX code instead of the MacOS Carbon routines. Then, hopefully, you can get rid of Carbon altogether and build a true 64-bit executable.
    In any case, I'm now suspecting my compiler configuration, etc for causing the problems. What is the best solution for having the fink gcc-4 installed and apples gcc installed? I guess I have to reconcile this somehow with the gfortran that is in /sw/bin.
    You could also download a better version of gfortran that installs into /usr/local, where it is supposed to be.

  • MP54G2 MiniPCI WiFi Car - WPA2 and Linux drivers or support?

    Hi All,
    I have a Rock Quddra T64 laptop with a MP54G2 module installed. I am looking for two thing from the MP54G2 WiFi module.
    1) Support of WPA2 encryption. The standard driver for windows support WPA but even with the update from MS, they do not appear to support the newer WPA2. This would be highly usefull as WiFi router already support this standard.
    2) Linux drivers. I am also looking for Linux support for this module. Obviously with the equivalant Windows support feature set and WPA2 as given above.
    Many thanks
    Chris

    Quote from: swinster on 28-March-06, 19:49:39
    2) Linux drivers. I am also looking for Linux support for this module. Obviously with the equivalant Windows support feature set and WPA2 as given above.
    Well, I have found out that the chipset in the MP54G2 MiniPCI module is a Ralink RT2500. This is supported natively in the newer versions of Linux. I myself am using Kubuntu Beta (6.04).
    However, there is a gottcha withi this. On my set up I have set my wireless router to use channel 13 and out of the box the Linux driver is only setup up to scan channels 1-11. Of course I had a hell of a time figureing out what was going on. There do seem to be ways around this which I will investigate.
    Still, I don't know of any information as to when, or if, there will be drivers in Linux or Windows that will support WPA2 authentication. MSI's technical team has, once again, lacked in thier support.

  • Petition to Synaptics about Linux drivers

    To Synaptics Corporation:
    I am writing this on my new Lenovo Yoga 2 Pro which comes with a beautiful screen and your Synaptics Clickpad. I have created this petition because there are a lot of problems with your hardware on Linux that are frustrating, time-wasting, and distracting.
    I’ve been using your Trackpads happily on Linux for years, but with your new model, things are such a mess that they get in the way of my ability to work. What if Linux users added up all the time they have collectively wasted and sent you the bill? Given that Linux on the desktop has more marketshare than the Mac, the total number would have a lot of zeros. With the suffering I’ve been through, I’d sign up for $200 / year.
    I know you spend most of your effort working on the Windows drivers, and that is fine because it is cheaper to maintain Linux drivers. The community will help you. I read you’ve written a Linux driver, but you never made it available. You are apparently happy to write something no one uses. There is a free driver Synaptics Linux kernel driver written for your users, but it is buggy with newer hardware and you aren’t helping fix it.
    I wrote a full review of Linux on my new hardware talking about the problems with your mouse in more detail. The key point is that your new devices with an integrated button require smarter software to be usable. Well, now that you’ve pushed this new hardware of dubious benefit, what are you going to do? I create this petition to ask you to do three things:
    Release a copy of your proprietary Linux driver under the GPL and publish it somewhere where it can be used as a reference.
    Find a smart kernel engineer from somewhere in your 550-person company and have them help maintain the existing Linux driver.
    Help ensure the Gnome, KDE, and XFCE user interfaces allow customers to configure the gestures and other advanced features. While you wait for the magic that is Windows 9, you must have some free time.
    We can wonder why Linux on the desktop hasn’t arrived like it has for cellphones and servers, but in the meanwhile, it would be nice if you made sure the effing mouse works out of the box.
    If you are frustrated with Synaptics hardware on Linux, sign this petition: https://www.change.org/petitions/synaptics-corporation-help-maintain-linux-drivers

    I absolutely agree and I doubt why for over a year this topic here is left without any official answer from Lenovo.
    I am also *asking for releasing drivers available for Windows so I could make use of them on Linux*.

  • Hardware specifics on audio and Linux drivers

    S300-EZ2502 owner here.
    Pretty happy with how it works with windows. Never much liked windows though.
    Did an Ubuntu 9.04 installation.
    Everything except audio worked.
    I am confused as to who made the driver and to whether there are Linux drivers and configurations for this card.
    Linux has always worked well on my prior Toshiba Laptops.
    Solved!
    Go to Solution.

    Eureka!
    If you use the link I posted earlier and/or info from here: http://ubuntuforums.org/showthread.php?t=416207&page=4
    ... What it involves is changing the codec by editing the alsa-base.conf file... 
    sudo /etc/modprobe.d/alsa-base.conf
    ...then adding a line to the end of the file...
    options snd-hda-intel model=auto
    ... only "auto" didn't work for me. Tried several of the options at http://git.alsa-project.org for my sound card before finding one that worked.
    Doesn't make a whole lot of sense, but this works for me:
    options snd-hda-intel model=acer

  • Where can I find linux drivers for my laptop? Does lenovo support provides that to download?

    Dear All,
    I purchased a Lenovo G570 (Model Name: 20079).
    Where can I find linux drivers for my laptop?
    Does lenovo support provides that to download?
    Sincerely,
    Srinivas Nayak

    Hello snayak
    Do not worry about Linux drivers for your laptop. All needed drivers for most of the machines are on the Linux kernel. Most hardware are recognized by latest kernel. So all you have to do is install your distro and enjoy Linux.
    The best way to check if all hardware are recognized is booting up a distro in live mode and test the hardware.
    You can make a test with Linux Mint, and install their new and amazing DE called Cinnamon. I'm sure you will enjoy it.
    Regards
    abvasili
    I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
    Who helped you today? Do not forget to thank him.
    My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.

  • K7n420pro linux drivers?

    Does anyone know where to find linux drivers for the onboard sound and ethernet controller?  I can't find them on my cd or available for download.  I guess it's possible they don't exist.  oh well, linux is free anyway

    nvidias web site driver downloads
    this may help as well
    http://www.nforcershq.com/forum/viewforum.php?f=29

  • Need Linux Drivers for X

    where can i get them?

    alexs3d2 wrote:
    Creative have stated that they are working on closed-source Linux drivers for the X-Fi cards, which would enable full support for X-Fi under Linux. Read more here.Although given the current hassle with the release of Vista, I guess Linux drivers are on hold...
    Thank you. I found this site soon after posting my request here.
    I hope it comes to pass.
    After installing my NVIDIA driver I appreciate how complicated Linux driver installation applications can be when you are designing an install app that'll work with every flavor and installation quirks of linux there are. My sincere thanks to the people at Creative who have to develop it!
    patience is golden (or is that silence?)

  • Axi DMA correct parameters

    I'm making my design with Vivado HLs and Vivado and I'm doing some somewhat big transfers between DDR and my custom IP block and vice-versa.
    Each transfer from DDR to custom IP is of 256x256x4=262144 bytes and it happens 4 times.
    My MM2S (Memory Mapped to Stream) velocity is at 350Mbytes/s and by S2MM is at 200 Mbytes/s.
    I know I can get better velocities and I guess these slow ones are related to the parameters of the Axi DMA block.
    That's what I came here to ask you, to help me understand which should be the correct parameters since I still can't understand it from reading the logicore product guide.
    Width of buffer length n
    From what I understand this is the maximum length of the transfer in bytes like so 2^n. So in my case as 2^18=262144 shall I put 18 in here?
    Memory Map Data Width
    Data width in bits of the AXI MM2S Memory Map Read data bus. I have no idea here. My words have 32 bits and I defined the entrance stream of my block to have a length of 32 bits but what is this?
    Stream Data Width
    I guess here I should put 32 correct?
    Max Burst Size
    Burst partition granularity setting. This setting specifies the maximum size of the burst cycles on the AXI4-Memory Map side of MM2S. Valid values are 2, 4, 8,16, 32, 64, 128, and 256.
    Again, I have no idea what to put here.
    I could do a trial-and-error approach and change parameters until I find the best ones but the problem is that each re-synthesyze and re-implementation in Vivado takes a lot of time...

    Hi,
    The meaning of those parameters is rather simple, however  it may be difficult to understand from the documentation:
    Width of buffer length register - Length of internal counter / register in the DMA which stores the length of DMA operation data. It should be in your case at least 19 bits as 2^18 give you max length 262143 bytes which is lower than the requested length 262144. This parameter does not directly impact performance. It mainly impact maximal achievable frequency and has slight impact on utilized FPGA resources.
    Memory Map Data Width - This specifies data-width of AXI4 interface, data width 64 bits when connected to HP or ACP port can significantly improve throughput (when connected to 64bit AXI Stream). This parameter is independent on the AXI stream data width. With 32 bit AXI Stream the improvement will be insignificant in your case. Setting this parameter to 64 has impact on utilized FPGA resources.
    Stream Data Width - Width of AXI Stream interface. Set 32 here, if your component has 32 bit AXI Stream Interface.
    Max Burst Size - Data on AXI interface can be transferred in bursts - N words can be transferred in one transaction on AXI. Higher burst size leads to better throughput. This parameter should be set to at least 16. You can set in to 256 (Maximum allowed by AXI4), however speedup against 16 will be small. It is caused by the fact that PS AXI interfaces are AXI3 compliant, which limits the burst size to 16. Therefore the AXI interconnect must split the AXI4 burst to several AXI3 bursts.
    To improve throughput you can use:
    Higher design clock frequency.
    Scatter-Gather DMA to improve throughput by hiding latencies of direct register mode by utilization of multiple buffer descriptors.
    64 bit AXI Stream interface in your component.
                              VK

Maybe you are looking for

  • DVD from PE9 won't play in computer let alone another DVD player

    I produced a 7 minute video in HD. I can play it on my computer either as HD or at standard res from files produced via the "Computer:Export files..." on the Share menu. I need to produce a standard NTSC DVD and when I burn using the "Disc: Burn DVD.

  • Status Rel is not allowed (ORD 301343)

    Hi, We want to change the User Status of and Internal Order under Control data tab. Problem is that user 1st do the 03 Teco Technicaly Complete and after Teco, he want to change it into 02 Rel  Released position. when we are doing 02 Rel  Released, s

  • Adobe reader control kills key events

    I am using visual studio express 2013 on Win7 professional (x64) to write a private c# form application. Adobe reader is installed and added to my project. The control shows a pdf, wounderful. But at the moment, my form has the adobe reader control,

  • Dumb newbie hardware question! :)

    Hi folks, I'm new to the world of the blackberry and am just about to take the plunge with an unlocked sim-free BB Bold to use in the UK on Vodafone. I have read about the software differences between BIS and BES and would be going for a BIS set-up.

  • "extend a network" feature can only be taken adv. of by N capable devices?

    Is this true? I thought that extend a network can be accessed by b/g computers/iphones/other devices.