Posted on:
|
Hi everyone, When i try to create binary file, its size 512M, but it must be about 12K. I do this: arm-elf-objcopy -O binary myfile.elf myfile.bin Where is problem? Thanks. PS. Sorry for my english:)
Posted on:
|
From the objcopy manual http://www.gnu.org/software/binutils/manual/html_chapter/binutils_3.html "objcopy can be used to generate a raw binary file by using an output target of `binary' (e.g., use `-O binary'). When objcopy generates a raw binary file, it will essentially produce a memory dump of the contents of the input object file. All symbols and relocation information will be discarded. The memory dump will start at the load address of the lowest section copied into the output file. When generating an S-record or a raw binary file, it may be helpful to use `-S' to remove sections containing debugging information. In some cases `-R' will be useful to remove sections which contain information that is not needed by the binary file." 1/ Check your source (assembler listing, linker control script) for the lowest load address and the highest load address. Seems there is a 512 MB address space used. 2/ Try the -S and the -R options.
Posted on:
|
Thanks, Stefan. Looks like problem is in my code. When i remove any function from my source code, i get correct code size. When code size reach some limit, linker insert some variable at address 0x0. (i work with str7 microcontroller which have rom at 0x40000000). Possible, its because friday evening:)