I need to transfer an ELF image in ARM to a DMA format. All I currently have is old code doing this for power PC, but the elf structure seems to be different. Can anyone point me in the direction? OR does anyone know of an open source tool for this?

==EDIT==

by dma format i mean something like :

D 0000000000000008 0000000000000000
D 0000000000000010 0000000000000000
D 0000000000000018 0000000000000000
D 0000000000000020 0000000000000000
D 0000000000000028 0000000000000000
D 0000000000000030 0000000000000000
D 0000000000000038 0000000000000000
D 0000000000000040 0000000000000000
D 0000000000000048 0000000000000000
D 0000000000000050 0000000000000000
D 0000000000000058 0000000000000000
D 0000000000000060 0000000000000000
D 0000000000000068 0000000000000000
D 0000000000000070 0000000000000000
D 0000000000000078 0000000000000000
D 0000000000000080 0000000000000000
D 0000000000000088 0000000000000000
D 0000000000000090 0000000000000000
D 0000000000000098 0000000000000000

just address and data - in this case all zeros. Thanks, weasel

有帮助吗?

解决方案

The elf structure is pretty standard. Fairly easy to make your own parser. If you want an even easier format to parse then use ihex or srec

arm-none-eabi-objcopy hello.elf -O ihex hello.hex

and then write a quick util to parse that and output whatever format you want.

其他提示

If by "DMA format" you mean plain binary, then you want to use objcopy (GNU tools) or fromelf (ARM tools) to convert the ELF file to plain binary:

arm-none-eabi-objcopy -O binary foo.elf foo.bin

or

fromelf --bin foo.elf -o foo.bin

If you mean something else, please clarify the questions.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top