it seems there are two C-compilers available that are able to generate PRU-code. One from TI and one introduced here in this board. But…which one is recommended to be used? That’s what I found out so far, may be somebody can add some missing information to make it easier to choose one:
OK, I'll try GCC version! Just wanted to collect some information regarding
both compilers in this thread...
Hi Karl,
The PRU GAS and LD ports should be in a good shape. But the PRU GCC port
has not yet reached beta. Judge for yourself:
PRU GCC has not been "battle tested" on a big project.
Only two small examples are currently used to "sanity check" the pru gcc
releases.
PRU GCC has no known bugs.
If you can take a little risk and don't mind checking the
compiler-generated assembler, then go ahead and try PRU GCC.
If you want an "ASAP, no hassles" C compiler for PRU, TI's one would be a
more suitable choice right now.
Regards,
Dimitar
Hi,
it seems there are two C-compilers available that are able to generate
PRU-code. One from TI and one introduced here in this board. But...which one
is recommended to be used? That's what I found out so far, may be somebody
can add some missing information to make it easier to choose one:
The latest version of the C compiler is no longer in beta. Even
better, it is a freely redistributable binary. While not as good as
redistributable source like the GCC, at least we can easily get it to
everyone;
I updated the wiki page and PRU-ICSS resources - BeagleBoard. I expect this
to be included in upcoming Debian releases, if not the GCC as well.
Meanwhile I’m more than happy with TI’s C-compiler. Especially the disassembler is very useful in case one has to count instructions to get the exact number of clock cycles a code-sequence requires (needed in some realtime applications).
The standard objcopy should be able to extract and convert:
pru-objcopy -j .data myprog.elf -O binary DMEM.bin
pru-objcopy -j .text myprog.elf -O binary IMEM.bin