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
Alternatively, you can parse the ELF file yourself, as does the example loader: https://github.com/dinuxbg/gnupru/blob/master/example/host/pload.c#L109 Regards, Dimitar 21 ноември 2014, петък, 10:09:57 UTC+2, Karl Karpfen написа: > > That's cool! Is there also a tool to extract text and data binaries out of > an ELF file to load it into PRUs instruction and data RAM separately? > > Am Donnerstag, 20. November 2014 20:24:49 UTC+1 schrieb [email protected]: >> >> Just to let you know that the PRU GCC toolchain also has a disassembler: >> pru-objdump -d myprog.elf >> For more information do "man objdump" >> >> Regards, >> Dimitar >> >> 19 ноември 2014, сряда, 15:25:21 UTC+2, Karl Karpfen написа: >>> >>> 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). >>> >>> Am Donnerstag, 6. November 2014 18:40:08 UTC+1 schrieb Jason Kridner: >>>> >>>> On Tue, Nov 4, 2014 at 11:56 AM, Karl Karpfen <[email protected]> >>>> wrote: >>>> > OK, I'll try GCC version! Just wanted to collect some information >>>> regarding >>>> > both compilers in this thread... >>>> > >>>> > 2014-11-04 17:47 GMT+01:00 <[email protected]>: >>>> >> >>>> >> 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 >>>> >> >>>> >> >>>> >> On Tuesday, November 4, 2014 2:11:23 PM UTC+2, Karl Karpfen wrote: >>>> >>> >>>> >>> 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: >>>> >>> >>>> >>> TI's PRU-C-compiler is >>>> >>> >>>> >>> - available at >>>> >>> http://software-dl.ti.com/codegen/non-esd/downloads/beta.htm >>>> >>> - BETA >>>> >>> - can be used to create ARM-objects (which can be linked to a bare >>>> metal >>>> >>> application and loaded to PRU on start-up automatically?) >>>> >>>> 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; >>>> >>>> http://software-dl.ti.com/codegen/non-esd/downloads/download.htm#PRU >>>> >>>> I updated the wiki page and http://beagleboard.org/pru. I expect this >>>> to be included in upcoming Debian releases, if not the GCC as well. >>>> >>>> >>> >>>> >>> Community/Open Source PRU-C-compiler is >>>> >>> >>>> >>> - avaialble at https://github.com/dinuxbg/gnupru >>>> >>> - BETA >>>> >>> - GCC-based and therefore more stable >>>> >>> >>>> >> -- >>>> >> For more options, visit http://beagleboard.org/discuss >>>> >> --- >>>> >> You received this message because you are subscribed to a topic in >>>> the >>>> >> Google Groups "BeagleBoard" group. >>>> >> To unsubscribe from this topic, visit >>>> >> >>>> https://groups.google.com/d/topic/beagleboard/rwNrqudk0Ug/unsubscribe. >>>> >> To unsubscribe from this group and all its topics, send an email to >>>> >> [email protected]. >>>> >> For more options, visit https://groups.google.com/d/optout. >>>> > >>>> > >>>> > -- >>>> > For more options, visit http://beagleboard.org/discuss >>>> > --- >>>> > You received this message because you are subscribed to the Google >>>> Groups >>>> > "BeagleBoard" group. >>>> > To unsubscribe from this group and stop receiving emails from it, >>>> send an >>>> > email to [email protected]. >>>> > For more options, visit https://groups.google.com/d/optout. >>>> >>> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
