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.

[参考译文] AM2634:用 C:C 语言环境和栈指针初始化编写的 PRU 程序

Guru**** 2756835 points

Other Parts Discussed in Thread: AM2634

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1601918/am2634-pru-program-written-in-c-c-environment-and-stack-pointer-initialization

器件型号: AM2634

尊敬的 TI 支持服务:

最近、我开始开发一个简单的程序、用于实现 AM2634 的 R5F 和 PRU 内核通信。

我在正确的 C 环境初始化方面遇到了一些困难、例如栈指针值、因此我想与您确认我所做的操作是否正常:

  • 我已将 boot.c 文件添加到我的 src 项目(取自 C:\ti\cgt-PRU_2.3.3\lib\pru\boot.c)
  • 我已将例程_c_int00 _noinit_noargs 设置为入口点
  • 在 linker.cmd 文件中、我已设置:  
    .text:_c_int00*> 0x0、第 0 页
    ...
    .stack      > PRU0_DMEM_0、第 1 页
     
    这样、我就能够从 R5F 内核加载并执行 PRU 固件文件。
     
    问题是:  
    • 这是否是设置可从 R5F 内核加载的 PRU C 工程的正确方法?

     

    此致、非常感谢您的帮助!