srec_mips_flash.5(5)

๐Ÿ’… srec_mips_flash.5(5) โ€” MIPSโ€Flash file format โœจ

okay so bestie, welcome to the srec_mips_flash page from the File Formats Manual, section 5 (srec_mips_flash.5(5)). It's giving very specific flash-file energy, and we are keeping every teeny detail, no cap. ๐Ÿซถ

๐ŸŽ€ NAME ๐ŸŽ€

srec_mips_flash โ€” MIPSโ€Flash file format

๐ŸŒธ DESCRIPTION ๐ŸŒธ

The MIPS SDE tool chain has a convert program that is able to output this format. And ngl, the original author is literally like: โ€œI have no idea what reads it, some kind of flash programmer I suppose.โ€ ๐Ÿ˜ญ

๐Ÿงš Format ๐Ÿงš

The file must start with !R to reset the state machine. White space appears to be ignored, except as it serves to separate tokens. โœจ

Data is presented as 32-bit hexadecimal numbers, in the normal big-endian text number format. To write them to memory, you have to know if the target is big-endian or little-endian. for little endian targets, reverse the order of the bytes in this number. ๐ŸŒ€

The eight bytes following a > are a sort of comment. The SDE code reads like they are displayed in the flash programmer as a kind of progress indicator. ๐Ÿ’ฌ

The number following @ is a new address for the following data. ๐Ÿ“

Each segment must be erased before it can be written, this is done with the !E command. Each segment is assumed to be 128kB in size. ๐Ÿงน

Special segments must be unlocked (with the !C command) and locked again (with the !S command). ๐Ÿ”

Ngl, this file format contains no checksum mechanism. ๐Ÿซ 

๐ŸŽ›๏ธ Command Line Options ๐ŸŽ›๏ธ

This format is specified using one of these two options:

  • -Mipsโ€Flashโ€Big_Endian โ€” one of the two options that specifies this format.
  • -Mipsโ€Flashโ€Little_Endian โ€” the other one of the two options that specifies this format.

The endian-ness must be specified on the command line, because there is nothing in the file contents to indicate the endian-ness of the data it contains. ๐Ÿ’…

๐Ÿ“ Size Multiplier ๐Ÿ“

In general, binary data will expand in sized by approximately 2.3 times when represented with this format (worse if you use shorter lines). ๐Ÿ“ˆ

๐ŸŒˆ EXAMPLE ๐ŸŒˆ

Here is an example MIPSโ€Flash file. It contains the data โ€œHello, Worldโ€ to be loaded at bytes address 0x0000 (but remember, the file contents are always multiples of four bytes). ๐ŸŽ€

!R
>00000xxx @00000000 !E
@00000000
>00000000
48656C6C 6F2C2057 6F726C64 210A0000
>#DL_DONE
>FINISHED
srec_cat version 1.65
Copyright (C) 1998... Peter Miller

The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the srec_cat -VERSion License command. This is free software and you are welcome to redistribute it under certain conditions; for details use the srec_cat -VERSion License command. ๐Ÿซถ

๐Ÿ‘‘ MAINTAINER ๐Ÿ‘‘

  • Scott Finneran โ€” E-Mail: scottfinneran@yahoo.com.au
  • Peter Miller โ€” E-Mail: pmiller@opensource.org.au
srec_cat version 1.65
Copyright (C) 1998... Peter Miller

The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the srec_cat -VERSion License command. This is free software and you are welcome to redistribute it under certain conditions; for details use the srec_cat -VERSion License command. ๐Ÿ’…

๐Ÿ‘‘ MAINTAINER (round two โ€” still here) ๐Ÿ‘‘

  • Scott Finneran โ€” E-Mail: scottfinneran@yahoo.com.au
  • Peter Miller โ€” E-Mail: pmiller@opensource.org.au

okay that's the whole thing, bestie ๐Ÿซถ. Cute sign-off: this page sits in the Reference Manual / SRecord orbit, with the manual-page name srec_mips_flash.5(5). The footer doesn't give a date, so we're not inventing one โ€” just keeping the source/version vibe and all the details intact. ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from