Erich,
The pasm compiler is no longer supported officially by TI. Like you mentioned above you can use the pasm compiler to generate an .h has all the instruction code by using a set compiler flagshat. This feature is no longer supported in the new C based compiler. Also as mentioned above you are wanting to use the prussdrv.h file, this file is for the linux user space driver and the linux driver doesn't load the code in this method.
If you are still wanting to continue to use the pasm compiler ( which is not recommended ) you can load the .h file into instruction memory with a function like the following.
void ICSSMemLoad(unsigned int StartAddress , unsigned int Length ,const unsigned int *Pointer)
{
unsigned int tempCount;
for(tempCount = 0; tempCount < Length ; tempCount++)
HWREG(StartAddress + tempCount * 4) = Pointer[tempCount];//Fill the Pru with the instructions
}
If you look into the technical reference manual for the AM335x you can find that the base address for the ICSS_PRU in table 2-4 (0x4A30_0000). This is the starting address for the memory space of the ICSS peripheral. Now by looking at table 4-8 you can see that the instruction memory for pru0 and pru1 is at memory location 0x0003_4000 and 0x0003_8000 respectively. These are global memory address which means if you want to write these locations from the arm they need to have the ICSS offset added to them also. PRU0’s instruction memory is at 0x4A33_4000 with respect from the ARM and this would be the starting address in the above code example.
Also some things to look for are that the ARM cannot access the PRU’s instruction memory space when the PRU is running. To initialize the ICSS you have to turn on the clock, enable the power in the PRM PER domain, and then enable the clock. Look in chapter 8 for register information for this.
-Jason