On Nov 22, 2014 12:45 PM, "Peter Gregory" <[email protected]> wrote:
>
> I have a simple PRU app to control 2 stepper motors.
> I'm on a Beaglebone Black
>
> #uname -a
>
> Linux beaglebone 3.8.13-bone67 #1 SMP Wed Sep 24 21:30:03 UTC 2014 armv7l
GNU/Linux
>
>
> I've enable the PRU module by appending the following to modules.  lsmod
shows it active
> #sudo nano /etc/modules
> uio_pruss
>
> I've installed the PRU c compiler and installer
> #sudo apt-get install make gcc g++ am335x-pru-package ti-pru-cgt-installer
>
> I copied my source to a directory and created the linker commands:
> #nano AM3359_PRU.cmd
> -cr
> -stack 0x100
> -heap 0x100
> MEMORY
> {
>     PAGE 0:
>       PRUIMEM:   o = 0x00000000  l = 0x00002000  /* 8kB PRU0 Instruction
RAM */
>     PAGE 1:
>       PRUDMEM:   o = 0x00000000  l = 0x00002000  /* 8kB PRU Data RAM 0 */
> }
> SECTIONS
> {
>     GROUP: load = PRUIMEM
>     {
>         .text:_c_int00* :
>         .text           :
>     }
>     .stack         >  PRUDMEM, PAGE 1
>     .bss           >  PRUDMEM, PAGE 1
>     .cio           >  PRUDMEM, PAGE 1
>     .const         >  PRUDMEM, PAGE 1
>     .data          >  PRUDMEM, PAGE 1
>     .switch        >  PRUDMEM, PAGE 1
>     .sysmem        >  PRUDMEM, PAGE 1
>     .cinit         >  PRUDMEM, PAGE 1
> }
>
>
> I then compile and link the source code by issuing the following:
> #clpru --silicon_version=3 -o1 pru_steppers.c -z AM3359_PRU.cmd -o
pru_steppers.out -m pru_steppers.map
>
>
> However, it fails to find the C libraries:
>
> <Linking>
>
> warning: automatic RTS selection:  attempt to automatically link in index
>
>    library "libc.a" failed; file not found
>
> error: no input section is linked in
>
> warning: entry-point symbol "_c_int00" undefined
>
> warning: no suitable entry-point found; setting to 0
>
> error: errors encountered during linking; "pru_steppers.out" not built
>
>
> >> Compilation failure
>
>
>
> where is libc.a located for the PRU?  Is that installed with the compiler
somewhere?

Odd, the ti self extractor puts it under /usr/share/ti/cgt-pru/ wonder if
we need an environmental variable to hint that location.

Regards,

>
> --
> 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.

-- 
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