>
> *Worked perfectly! Thankyou so much. No idea why clpru is pickier than
> pasm, but at least that problem is solved.And I'd still be curious if
> anyone has any simple methods of using C to write to the pru data ram
> rather than assemby code.*
> *Cheers,*
> *JR*


All the examples I've seen, which I may have only seen the same post as
you( can't remember been doing lots of reading the last few days) I've only
ever seen use of inline assembly. There is also an open sourced C compiler
somewhere, but no idea if it's been updated in the last year+ or so. Since
TI released theirs. There should be documentation for the TI PRU C compiler
*somewhere* though. I have not looked yet.

According to texane though, the compiler comes with CCS, and is self
contained in it's own directory. Meaning it can be used standalone. The
point here being, I would assume the documentation is in that directory as
well.

Doing a quick google search, I found this project:
https://github.com/BeaglePilot/PRUSS-C/, and looking through one C file it
seems to be all C. However, I did not check to see, if the file in question
was actually just some C abstraction layer for inline assembly or some
compiled library that was initially written in assembly . . .

Keywords I used where "TI PRU C compiler" in google. turned up many
results, and many seemingly decent prospects. Anyway, I'm off doing
something different otherwise I'd look deeper into it. Good luck !

On Tue, Oct 6, 2015 at 12:07 PM, Jonathan Ross <[email protected]>
wrote:

> Worked perfectly! Thankyou so much. No idea why clpru is pickier than
> pasm, but at least that problem is solved.
> And I'd still be curious if anyone has any simple methods of using C to
> write to the pru data ram rather than assemby code.
> Cheers,
> JR
>
>
> On Tuesday, October 6, 2015 at 9:19:15 AM UTC-7, Luiz Chamon wrote:
>>
>> That is one of those little things you need to be careful when writing
>> code for the clpru: that code will work fine for pasm, but clpru will
>> complain (I am talking about the assembly, no idea about inline or C, I've
>> only worked with assembly in the PRU). Basically two things:
>>
>> 1) you need to "dereference origin registers" (I have no better way to
>> say this, just use &): SBBO   &r3, r0, 0, 4;
>> 2) you need to explicitly use LDI instead of MOV when working with
>> immediate values. In your case, LDI32: e.g., LDI32    r3, 0x00002222
>>
>> You can try this and see if it helps.
>>
>> Cheers!
>>
> --
> 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