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: How to load and execute COFF file


Hi Toralf

I've attached the S Record loader, the only thing that I have done is modified the meaning of the
S0 type record. According to the spec it is a title and has an ASCII encoded string, I have changed
this to specify a memory range to be cleared. It contains 3 addresses (32 bit values) for a total of 12 bytes of data, if the record is not exactly 12 bytes long this module simply ignores it and assumes 
that the data is to be loaded into the default addresses.

If the S0 record is 12 bytes long then the first 2 4 byte values are the start and end addresses of the 
program block and the third address is the address of the "boot" block used by my monitor. This boot block
contains the start and end addresses of the program in flash, a checksum (actually a CRC, but it used to be a checksum and the routine name never got updated) of the data between the start and end addresses and the
start address of the code (from the S7/S8/S9 record).

The S0 record is the one that initiates the erasing of the Flash and the S7/S8/S9 record generates and write the boot block. I can also have several different flash areas cleared by sending multiple S0 records. I have a separate program that I run on the S Record file from objcopy that strips of the original S0 line and adds a new one with the required format.

I think that the external references in this file are fairly obvious in what they do, but if you have any questions don't hesitate to ask.

Hope this helps

Stan Katz

------
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]