Thanks guys for yours different interesting note.

I'have some few update :

I succeed to figure out how to solve the error :
prussdrv_open() failed

The issue was that the function work like that : 
int prussdrv_open(unsigned int host_interrupt)
{
    char name[PRUSS_UIO_PRAM_PATH_LEN];
    if (!prussdrv.fd[host_interrupt]) {
        sprintf(name, "/dev/uio%d", host_interrupt);
        prussdrv.fd[host_interrupt] = open(name, O_RDWR | O_SYNC);
        return __prussdrv_memmap_init();
    } else {
        return -1;

    }
}
So it was trying  to load /dev/uio0 but when I look for it, it was not 
there.
So I change to this dts :  
https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BONE-REPLICAP-00B1.dts
And it's succeed to create the /dev/uio0.

However, now I'm facing new issue when I'm trying to execute the different 
programs :

root@beagle01:~/labs/bbb-pru/simple-tests# sudo ./major-tom-pru 
[167188.892328] Unhandled fault: external abort on non-linefetch (0x1018) 
at 0xb6da3000
[167188.900146] pgd = ddde8000
[167188.902965] [b6da3000] *pgd=9dc30831, *pte=4a304303, *ppte=4a304a33


root@beagle01:~/labs/exploringBB/chp13/fixedPRUClock# sudo ./fixedclock 
[167484.486691] Unhandled fault: external abort on non-linefetch (0x1018) 
at 0xb6e32000
[167484.494512] pgd = dcd78000
[167484.497330] [b6e32000] *pgd=9df94831, *pte=4a304303, *ppte=4a304a33



It's seem to appears when this function is launch :
int __pruss_detect_hw_version(unsigned int *pruss_io)
{

    if (pruss_io[(AM18XX_INTC_PHYS_BASE - AM18XX_DATARAM0_PHYS_BASE) >> 2]
        == AM18XX_PRUSS_INTC_REV)
        return PRUSS_V1;
    else {
        if (pruss_io

            [(AM33XX_INTC_PHYS_BASE - AM33XX_DATARAM0_PHYS_BASE) >> 2] ==
            AM33XX_PRUSS_INTC_REV)
            return PRUSS_V2;
        else
            return -1;
    }
}

Especially On the first case of the if.

It was launch by :
prussdrv.pru0_dataram_base =
        mmap(0, prussdrv.pruss_map_size, PROT_READ | PROT_WRITE,
             MAP_SHARED, prussdrv.mmap_fd, PRUSS_UIO_MAP_OFFSET_PRUSS);
    prussdrv.version =
        __pruss_detect_hw_version(prussdrv.pru0_dataram_base);

So as before, if anyone have a clue on what's going wrong :-)

Thanks by advance
Regards 
Vincent




 

>
> On Tuesday, April 5, 2016 at 10:22:36 AM UTC-5, Le Costaouec Vincent wrote:
>
>
> I forgot to indicate the release on which I'm working on :  
> #  lsb_release -da
>
> Distributor ID:    Debian
> Description:    Debian GNU/Linux 8.3 (jessie)
> Release:    8.3
> Codename:    jessie
>
> Is anyone have already work on the PRU on this kernel version ?
> Thanks by advance.
> Regards.
> Vincent
>
>
> Le mardi 5 avril 2016 11:33:06 UTC+2, Le Costaouec Vincent a écrit :
>
> Hello, 
>
> I'm currently trying to configure and use the PRU of the BBB.
>
> So I've tried two different method to do so however, with none of them I 
> get succeed and I don't really 
> understand why.
>
> 1) First method (from Derek Molloy book) :
>
> http://exploringbeaglebone.com/chapter13/
> So I have tried to do the PRU-based Clock Signal Generators, because this 
> one 
> do not required any additional material except an oscilloscope.
>
> So I had load the EBB-PRU-Example DTS overlay (provided in attachment), 
> and I have receive the following message : 
> # echo EBB-PRU-Example > $SLOTS
> [   51.417438] bone_capemgr bone_capemgr: part_number 'EBB-PRU-Example', 
> version 'N/A'
> [   51.425297] bone_capemgr bone_capemgr: slot #4: override
> [   51.430665] bone_capemgr bone_capemgr: Using override eeprom data at 
> slot 4
> [   51.437772] bone_capemgr bone_capemgr: slot #4: 'Override Board 
> Name,00A0,Override Manuf,EBB-PRU-Example'
> [   52.526058] gpio-of-helper ocp:gpio_helper: ready
> [   52.531052] bone_capemgr bone_capemgr: slot #4: dtbo 
> 'EBB-PRU-Example-00A0.dtbo' loaded; overlay id #0
>
>
>
> # cat $SLOTS
>  0: PF----  -1 
>  1: PF----  -1 
>  2: PF----  -1 
>  3: PF----  -1 
>  4: P-O-L-   0 Override Board Name,00A0,Override Manuf,EBB-PRU-Example
>
> I have also check :
> # lsmod |grep uio
> uio_pruss               4590  0 
> uio_pdrv_genirq         3317  0 
> uio                     8319  2 uio_pruss,uio_pdrv_genirq
>
>
> root@beagle01:~/labs/exploringBB/chp13/fixedPRUClock# ./build 
> PRU Assembler Version 0.86
> Copyright (C) 2005-2013 by Texas Instruments Inc.
> Pass 2 : 0 Error(s), 0 Warning(s)
> Writing Code Image of 12 word(s)
>
> # sudo ./fixedclock
> However, when I tried to monitor what append on pin P9_27 but I didn't 
> observed anything on this pins.
>
>
>
>
> 2) Second method (from the Beagle bone black cookbook written by Charles A 
> Hamilton) :
>
> This time, I have use this DTS : BB-BONE-PRU-01 (
> https://github.com/jadonk/cape-firmware/blob/master/arch/arm/boot/dts/BB-BONE-PRU-01-00A0.dts
> )
> In addition, I have tried to used this code :
> https://github.com/HudsonWerks/bbb-pru
>
> So first I tried to add the DTS, I received this message : 
> # echo EBB-PRU-Exampecho BB-BONE-PRU-01 > $SLOTS
> [59800.649273] bone_capemgr bone_capemgr: part_number 'BB-BONE-PRU-01', 
> version 'N/A'
> [59800.656947] bone_capemgr bone_capemgr: slot #12: override
> [59800.662528] bone_capemgr bone_capemgr: Using override eeprom data at 
> slot 12
> [59800.669680] bone_capemgr bone_capemgr: slot #12: 'Override Board 
> Name,00A0,Override Manuf,BB-BONE-PRU-01'
> [59800.699368] ------------[ cut here ]------------
> [59800.704089] WARNING: CPU: 0 PID: 619 at arch/arm/mach-omap2/omap_hwmod.
> c:2087 _enable+0x201/0x210()
> [59800.713188] omap_hwmod: pruss: enabled state can only be entered from 
> initialized, idle, or disabled state
> [59800.722894] Modules linked in: uio_pruss usb_f_ecm g_ether usb_f_rndis 
> u_ether libcomposite pvrsrvkm(O) omap_sham omap_aes snd_soc_davinci_mcasp 
> snd_soc_edma snd_soc_omap omap_rng rng_core snd_soc_core snd_compress 
> snd_pcm_dmaengine snd_pcm snd_timer snd soundcore evdev spi_omap2_mcspi 
> uio_pdrv_genirq uio leds_gpio
> [59800.751252] CPU: 0 PID: 619 Comm: bash Tainted: G        W  O    4.1.19
> -bone20 #1
> [59800.758778] Hardware name: Generic AM33XX (Flattened Device Tree)
> [59800.764974] [<c0012f39>] (unwind_backtrace) from [<c00110a9>] (
> show_stack+0x11/0x14)
> [59800.772791] [<c00110a9>] (show_stack) from [<c002e5b7>] (
> warn_slowpath_common+
>
> ...

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to