Using arm-elf-gcc to creat a .bin file
I have a c source file, now I want to use arm-elf-gcc to creat a .bin file which can be executed on ARM processor. How can I do this.BTW, what's the relationship between the .bin file and .elf file?
What do you want the .bin file to do? Neither of those two filename extensions are commonly used in Linux, although one can imagine that a .elf file is an object module in the elf file format. .bin has no particular meaning that I know of, although it tends to be used somewhat generically to suggest that a file's content is something other than human-readable text.
Typically, executable files are named without any filename extension.
If your C source module includes main() and doesn't reference any libraries not known to the compiler, you should be able to simply add the /path/to/your/cross/compiler to $PATH, and then compile:
The above assumes a functional and conventionally built cross toolchain.
|All times are GMT -5. The time now is 09:44 AM.|