This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM setup: How to load from flash?



Tell gcc you don't want start files linked in. IIRC, it's
-nostartfiles.


[ snip ]



Why are you using COFF instead of ELF?


Well, I'm assuming that it's simpler than ELF, and we're
talking about a very plain setup, so ELF might just introduce
more complexity without giving me anything extra that I need.



Perhaps if you're actually putting COFF files in flash and
"loading" them on the fly, the simpler format would be handy.


Yes, I've been thinking about doing that. I'm not sure it's worth the effort even with COFF, though.



That's not the real reason, though. Actually, it's not even
true that I'm "using" COFF. So far, I've just loaded plain
binary files and simply started execution from the start of
the image.



That's generally what we embedded people do. If you're
converting to binary or hex in the end, it doesn't matter which
object file format you use, and ELF seems to be the format with
the best support these days.


Hmm. Maybe I'll try building a gcc-arm-elf one of these days...



These files are created using objcopy -b binary with COFF
files as input, because as I said, I know I'll get the right
code at the beginning for COFF (I'm not saying that I know I
won't for ELF, though.)



With either, you can write your linker script and startup code
to make sure that there is an entry point at the beginning of
the binary image.


I wasn't sure at fist how I might do that, but of course, an explicit filename match in SECTIONS should do the trick.


- Toralf


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]