0

I have been trying to further understand the Sitara Am335x PRUs and I tried to follow the TI labs on how to get started with Programmable real-time units on the BeagleBone Black and but I encountred this problem that I couldn't overcome;

sudo -i  
cp /home/debian/pru_blinky.out /lib/firmware/pru_blinky
cd /sys/class/remoteproc/remoteproc1  
echo 'pru_blinky' > firmware

but when I type echo 'start' > state I get the following error

this is the return of man echo

NAME
   echo - display a line of text

SYNOPSIS
   echo [SHORT-OPTION]... [STRING]...
   echo LONG-OPTION

DESCRIPTION
   Echo the STRING(s) to standard output.

   -n     do not output the trailing newline

   -e     enable interpretation of backslash escapes

   -E     disable interpretation of backslash escapes (default)

   --help display this help and exit

   --version
          output version information and exit



-bash: echo: write error: Invalid argument

I tried to to specify the directory and file with command: echo 'pru_blinky/pru_blinky.out' > firmware but still problem not solved can anyone explain to me what am i doing wrong here

aouainia
  • 21
  • 5
  • What is the nature of `state` file ? Is that a regular file ? Or an I/O ? – Welgriv May 14 '20 at 16:37
  • it's supposed to be an output, to control an LED – aouainia May 15 '20 at 13:29
  • What kind of output ? I don't know the stuff you use but in my understanding if it's a register of some GPIO of course `echo` command can't write text in it. – Welgriv May 15 '20 at 15:19
  • it's an output register yeah, can you please explain why the echo command can't write to it – aouainia May 18 '20 at 18:09
  • Cause `echo` aim is to output a line of text (see here: https://linux.die.net/man/1/echo) but a given shell can overwrite the echo command. Can you edit your post and give the return of `man echo` please ? – Welgriv May 19 '20 at 14:52
  • i get what you are trying to say, i am following this exemple " https://www.element14.com/community/community/designcenter/single-board-computers/next-genbeaglebone/blog/2019/05/14/coding-for-the-beaglebone-pru-with-c-in-2019 " as an initiation on how to use PRUs on the beaglebone black board and the last command dosen't work as it returns the stated error – aouainia May 29 '20 at 07:16
  • edit : the extention of state is .swp file – aouainia May 29 '20 at 07:54
  • I found the error after checking the kernel log I found out that there is a header file that must be provided so that the PRU can execute the program – aouainia Jun 30 '20 at 11:46

0 Answers0