This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4379: PRU1 assigned to eth0

Part Number: AM4379

Tool/software: Linux

Hello,

I'm trying to send a code to my PRU1.

When I cat the firmware, it says that it's assigned to eth0.

remoeproc1: ti-pruss/am437x-pru0-prueth-fw.elf

and the state condition is 'running'.

When I try to echo 'stop' to it, I get the permission denied error ("sh: echo: write error: Operation not permitted").

What am I doing wrong?

  • Please post which Linux version you are using, and the log file.

  • Hello Biser,

    The linux version is:

    Linux 4.14.79-gbde58ab01e armv7l

    ID="arago"
    NAME="Arago"
    VERSION="2018.10"
    VERSION_ID="2018.10"
    PRETTY_NAME="Arago 2018.10"

    The log file is attached.

    I'm also putting the step that I did here:

    root@core-ace:~# cd /sys/class/remoteproc/remoteproc1
    root@core-ace:/sys/class/remoteproc/remoteproc1# ls
    device        firmware        power        state        subsystem        uevent
    root@core-ace:/sys/class/remoteproc/remoteproc1# echo '/home/root/PRU_Project.out' > firmware
    -sh: echo: write error: Operation not permitted
    root@core-ace:/sys/class/remoteproc/remoteproc1# echo 'stop' > state
    -sh: echo: write error: Operation not permitted

    Please let me know if you need any other info.

    2514.dmesg.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.14.79-gbde58ab01e (root@dev-vbox) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #10 PREEMPT Wed May 15 15:43:34 EDT 2019
    [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] OF: fdt: Machine model: TI AM437x Industrial Development Kit
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] cma: Reserved 48 MiB at 0xbd000000
    [ 0.000000] On node 0 totalpages: 262144
    [ 0.000000] free_area_init_node: node 0, pgdat c0d4fb10, node_mem_map ef6f9000
    [ 0.000000] Normal zone: 1728 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 196608 pages, LIFO batch:31
    [ 0.000000] HighMem zone: 65536 pages, LIFO batch:15
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM437x ES1.2 (sgx neon)
    [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [ 0.000000] pcpu-alloc: [0] 0
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260416
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=ad09261c-02 rw rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 976260K/1048576K available (8192K kernel code, 328K rwdata, 2496K rodata, 1024K init, 268K bss, 23164K reserved, 49152K cma-reserved, 212992K highmem)
    [ 0.000000] Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
    lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
    pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    .text : 0xc0008000 - 0xc0900000 (9184 kB)
    .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
    .data : 0xc0d00000 - 0xc0d52348 ( 329 kB)
    .bss : 0xc0d52348 - 0xc0d9559c ( 269 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] Tasks RCU enabled.
    [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [ 0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [ 0.000000] OMAP L2C310: ROM does not support power control setting
    [ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000011] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000030] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000039] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000417] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [ 0.000426] OMAP clocksource: 32k_counter at 32768 Hz
    [ 0.000785] Console: colour dummy device 80x30
    [ 0.000812] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000817] This ensures that you still see kernel messages. Please
    [ 0.000821] update your kernel commandline.
    [ 0.000844] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
    [ 0.060184] pid_max: default: 32768 minimum: 301
    [ 0.060340] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.060363] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.061045] CPU: Testing write buffer coherency: ok
    [ 0.061102] CPU0: Spectre v2: using BPIALL workaround
    [ 0.061783] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.061925] Hierarchical SRCU implementation.
    [ 0.062246] EFI services will not be available.
    [ 0.063167] devtmpfs: initialized
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • What board are you using? I suspect that you set up your device tree file to use that PRU for ethernet, rather than leaving it available for the user to load other firmware. Let me know if you need guidance on which sample device tree files to look at.

    Regards,

    Nick

  • Hi Nick,

    I'm using a Sitara 437x IDK.

    Would you please help me to edit the device tree? I definitely need your guidance on finding and correcting the device tree files.

    Best,

    Mohsen.

  • I searched online and could eventually edit the device tree.

    The device tree source file is attached.

    Now, I'm getting this error:

    root@core-ace:~# echo '/home/root/PRU_Project.out' > /sys/class/remoteproc/remoteproc1/firmware
    root@core-ace:~# cat /sys/class/remoteproc/remoteproc1/firmware
    /home/root/PRU_Project.out
    root@core-ace:~# echo 'start' > /sys/class/remoteproc/remoteproc1/state
    [ 564.780409] remoteproc remoteproc1: powering up 54434000.pru
    [ 564.786154] remoteproc remoteproc1: Direct firmware load for /home/root/PRU_Project.out failed with error -2
    [ 564.800036] remoteproc remoteproc1: request_firmware failed: -2
    [ 564.805999] remoteproc remoteproc1: Boot failed: -2
    -sh: echo: write error: No such file or directory

    CoreACE_A_B_MOH.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */
    /dts-v1/;
    #include "am4372.dtsi"
    #include <dt-bindings/pinctrl/am43xx.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>
    / {
    model = "CoreACE_A_B Processor DT";
    compatible = "ti,am437x-idk-evm","ti,am4372","ti,am43";
    chosen {
    stdout-path = &uart0;
    };
    aliases {
    spi0 = &qspi;
    spi2 = &spi2;
    spi4 = &spi4;
    };
    v24_0d: fixed-regulator-v24_0d {
    compatible = "regulator-fixed";
    regulator-name = "V24_0D";
    regulator-min-microvolt = <24000000>;
    regulator-max-microvolt = <24000000>;
    regulator-always-on;
    regulator-boot-on;
    };
    v3_3d: fixed-regulator-v3_3d {
    compatible = "regulator-fixed";
    regulator-name = "V3_3D";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    vin-supply = <&v24_0d>;
    };
    vdd_corereg: fixed-regulator-vdd_corereg {
    compatible = "regulator-fixed";
    regulator-name = "VDD_COREREG";
    regulator-min-microvolt = <1100000>;
    regulator-max-microvolt = <1100000>;
    regulator-always-on;
    regulator-boot-on;
    vin-supply = <&v24_0d>;
    };
    vdd_core: fixed-regulator-vdd_core {
    compatible = "regulator-fixed";
    regulator-name = "VDD_CORE";
    regulator-min-microvolt = <1100000>;
    regulator-max-microvolt = <1100000>;
    regulator-always-on;
    regulator-boot-on;
    vin-supply = <&vdd_corereg>;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello,

    Firmware name must be relative to /lib/firmware/

    See our RemoteProc and RPMsg documentation for more information.

    Regards,

    Nick

  • YESSSS!!! Worked. 

    Thanks!

  • Hello Mohsen,

    No problem! Good luck with the rest of your development.

    Regards,

    Nick