EBC Exercise 30 PRU porting pasm to clpru

From eLinux.org
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder


http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions#pasm_vs._clpru has better notes that I have here.

Here are some notes on things to watch for when converting from pasm assembly to clpru. Much of this came from http://www.ti.com/lit/ug/spruhv6a/spruhv6a.pdf

pasm clpru Notes
Comments \\  ; Start comments with ;
Loading constants MOV r0, 0x0000 LDI r0, 0x0000 pasm generalized MOV to not only move registers (MOV r0, r1), but also

moving immediate values (MOV r0, 0x0). The MOV in clpru is only for moving registers.

Loading 32-bit constants MOV r0, 0xffffffff LDI32 r0, 0xffffffff If you are loading more than 16 bits, use LDI32.
load/store byte burst LBBO r2, r1, 0, 4 LBBO &r2, r1, 0, 4 An & is needed before the first register of LBBO, SBBO, LBCO or SBCO.
Substitution Symbols #define CH1BIT r30.t8 .asg r30.t8, CH1BIT Be sure the . isn't in the first column.




thumb‎ Embedded Linux Class by Mark A. Yoder