How to get a "*.out" or "S-recod" format file?
Michael Meissner
meissner@cygnus.com
Tue Nov 30 23:39:00 GMT 1999
On Thu, Nov 04, 1999 at 04:06:05PM +0800, hui_yuan_xia@tea.toshiba.co.jp wrote:
>
>
>
> Hi,
>
> Is there anyone can help me on below issue? Thank you in advance.
>
> I just install GNUPro ToolKit on a NT4.0 PII system. I created a "hello.c"
> file and then I compiled it with some setting as below:
>
> C:mips-tx39-elf-gcc -g -o hello hello.c -Tdve.ld
>
> A "Hello.exe" is generated but it is not an "hello.out" file.
> I can execute and debug it under a stand-allone simulator on this host
> (NT4.0 PII platform), but my objective is to build a executable file and
> down load to target board. So the output file should be a "S-recode" format
> file ( Motorola standard) or an binary file.
>
> Is there anyone can give me some advice on above issue?
The best way is to use objcopy after doing the link:
mips-tx39-elf-objcopy -O srec hello.exe hello.srec
If you want a binary file:
mips-tx39-elf-objcopy -O binary hello.exe hello.bin
If you want an Intel hex file:
mips-tx39-elf-objcopy -O ihex hello.exe hello.ihex
--
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482
More information about the Gcc-bugs
mailing list