通过翻阅资料 路径如下ti\ccs1210\ccs\tools\compiler\ti-cgt-pru_2.3.3\example test.c
了解到通用寄存器R31在 C程序下的定义和使用。
通过实际验证,R30/R31 可以直接应用并进行相应控制。
但是采用同样的定义方式,却无法定义R0-R29 ,如图:

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.
通过翻阅资料 路径如下ti\ccs1210\ccs\tools\compiler\ti-cgt-pru_2.3.3\example test.c
了解到通用寄存器R31在 C程序下的定义和使用。
通过实际验证,R30/R31 可以直接应用并进行相应控制。
但是采用同样的定义方式,却无法定义R0-R29 ,如图:

register伪指令只支持R30, R31,请看PRU编译器手册5.7.2 Global Register Variables上的定义。
https://www.ti.com/lit/ug/spruhv7b/spruhv7b.pdf
register type regid
The regid parameter can be __R30 and __R31.