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: PRU program written in C: C environment and stack pointer initialization

Part Number: AM2634

Dear TI support service,

recently, I started developing a simple program that makes the R5F and the PRU cores of an AM2634 communicate.

I had some difficult times with the proper C environment initialization, e.g. the stack pointer value, so I wanted to check with you if what I have done is OK:

  • I have added to my PRU project the boot.c file (taken from C:\ti\ti-cgt-pru_2.3.3\lib\src\boot.c)
  • I have set as entry point the routine _c_int00_noinit_noargs
  • in the linker.cmd file, I have set: 
    .text:_c_int00* >  0x0, PAGE 0
    ...
    .stack          >  PRU0_DMEM_0, PAGE 1
     
    this way, I was able to load the PRU firmware file from the R5F core and execute it.
     
    The question is: 
    • is this the correct way to set up a PRU C project that can be loaded from a R5F core?

     

    Best regards, and many thanks for your help!