FreeCalypso > hg > freecalypso-tools
annotate doc/Binary-file-formats @ 1003:7b4c011fa798
doc/Loadtool-targets: -h w220 => -h chimei
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Dec 2023 18:27:31 +0000 |
parents | b6b8307d195b |
children |
rev | line source |
---|---|
676
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 In FreeCalypso we use 3 different file formats for Calypso binary images, i.e., |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 code images to be loaded into either flash or RAM or retrieved flash dumps. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 These 3 different file formats are straight binary (*.bin), moko-style m0 (*.m0) |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 and little-endian S-records (*.srec). |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 Straight binary (*.bin) |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 ======================= |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 Straight binary is our preferred format for flash dumps. It is written in the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 native little-endian byte order of the Calypso ARM7 processor, i.e., the order |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 of bytes in the raw binary file directly corresponds to incrementing byte |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 addresses as visible to the ARM7 - any ASCII strings in the image thus appear |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 naturally. We also use the same straight binary format in native LE byte order |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 for flashable code images generated with the gcc+binutils toolchain (as opposed |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 to TI's TMS470), generated with arm-elf-objcopy -O binary - although we don't |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 have too many such code images currently given that neither FC Citrine nor FC |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 Selenite ever achieved production quality. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 Another unrelated use of this straight binary format is for RAM-loadable code |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 images that are fed to Compal's bootloader (Motorola C1xx and Sony Ericsson |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 J100) as opposed to Calypso boot ROM. Our generally preferred image format for |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 RAM-loadable code pieces is little-endian S-records (*.srec, see below), but |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 for Compal's bootloader we use straight binary instead because of the way this |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 bootloader protocol works. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 moko-style m0 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ============= |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 This format is a variant of Motorola hex (S-records), a variant invented by TI |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 rather than by us. This format is produced by TI's hex470 tool when run with |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 -m -memwidth 16 -romwidth 16 options, which is the configuration used by TI in |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 the Calypso program, and is read by TI's flash programming tool called FLUID. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 TI used this format not only for flashable firmware images, but also for various |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 RAM-loadable code pieces, particularly those that comprise the target-side |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 component of FLUID. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 The special quirk of this S-record variant format is its peculiar byte order. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 TI viewed it as "16-bit hex", meaning that the image is logically viewed as |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 consisting of 16-bit words rather than 8-bit bytes, each S3 record carries an |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 even number of bytes to be loaded at an even address, and each 16-bit word |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 (4 hex digits) appears in these S3 records with its most-significant hex nibble |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 toward the left, just like the address field of each S-record. But if this |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 image gets interpreted by some more naive tool (for example, objcopy from GNU |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 binutils) as bytes rather than 16-bit words, the result will be a reversed byte |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 order, with all strings etc messed up. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 In FreeCalypso we use this moko-style m0 format (our new name for what TI called |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 16-bit hex) only for flashable firmware images built with TI's TMS470 toolchain |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 (can be our own FC Magnetite or historical ones built by Openmoko or other |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 similar historical vendors), but never for any RAM-loadable code pieces - we use |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 little-endian SREC for the latter as explained below. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 And what about the name? Why do we call it moko-style m0 rather than just m0? |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 The reason is because Compal muddied our waters by introducing their own *.m0 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 files that were generated with -memwidth 8 -romwidth 8 instead of -memwidth 16 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 -romwidth 16, producing 8-bit hex instead of 16-bit hex. We do not support |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 Compal's different *.m0 files at all, and we needed some name to specifically |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 identify TI-style m0 files rather than Compal-style. We ended up with the name |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 moko-style rather than TI-style because we already had our mokosrec2bin program |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 going back to 2013-04-15, one of the very first programs written in the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 FreeCalypso family of projects: our very first encounter with this file format |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 were mokoN firmware images put out in this *.m0 format by That Company. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 Little-endian S-records (*.srec) |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 ================================ |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 Back at the beginning of FreeCalypso in the spring/summer of 2013 I (Mother |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 Mychaela) decided to use S-records instead of straight binary for our |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 RAM-loadable code pieces, i.e., code that is loaded into RAM either through the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 Calypso boot ROM (fc-iram) or by chain-loading via loadagent (fc-xram). I made |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 this decision based on two factors: |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 1) ARM code generated by common toolchains (both TI's TMS470 and gcc+binutils) |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 without special contortions is not position-independent: a code image that |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 was linked for a given address needs to be loaded at that specific address, |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 not some other. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 2) An S-record image has its load address embedded in the image itself, whereas |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 a raw binary naturally does not carry any such extra metadata. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 With SREC as the standardized hand-off format from code generation tools to |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 loadtools, the choice of load address is made entirely on the code generation |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 side; loadtools do not impose a fixed load address, nor do they require it to |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 be communicated via extra command line arguments or options. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 However, the variant of SREC we use for RAM-loadable code pieces is not the same |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 as moko-style m0 - the byte order is the opposite, with our RAM-loadable code |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 pieces using the native little-endian byte order of the ARM7 processor as the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 byte order within S3 records. Prior to the introduction of RAM-loadable FC |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 Magnetite fw images for Pirelli DP-L10 in late 2016 (and then likewise for our |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 own FCDEV3B), the only RAM-loadable code pieces we have had were built with |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 gcc+binutils, not with TMS470, and GNU binutils got a different take on the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 S-record format than TI did: they generate byte-oriented SREC files, with the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 byte order being the same as it would be in a straight binary file, matching |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 the target processor's memory byte addressing order. Thus GNU-style SREC has |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 been adopted as the format for our RAM-loadable code images for both fc-iram |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 and fc-xram, as opposed to TI-style SREC aka moko-style m0. The convention we |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 have adopted is that *.m0 filename suffix means TI-style aka moko-style, |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 whereas *.srec means GNU-style. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 Besides the S3 record byte order, there is one other difference between TI-built |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 *.m0 code images and GNU-built *.srec ones: the final S7 record carries the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 entry point address in GNU-built *.srec images, whereas TI's *.m0 images always |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 have a zero dummy address in there. Our fc-iram and fc-xram tools require the |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 real entry point address in the S7 record. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 How do we generate ramimage.srec RAM-loadable images for fc-xram in FC |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 Magnetite? Answer: FC Magnetite build system includes a special ad hoc |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 converter program that reads ramimage.m0 produced by TI's hex470 tool and |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 produces ramimage.srec: it reverses the order of bytes, adds another S3 record |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 that writes the boot-ROM-redirected interrupt and exception vectors and |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 generates an S7 record with the right entry point address. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 This little-endian *.srec format is actively used only for RAM-loadable code |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 pieces in FreeCalypso, not for anything that goes into or gets read from flash. |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 We do have flash dump2srec and flash program-srec commands in fc-loadtool, they |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 were implemented back in the founding stage of FreeCalypso in 2013 for the sake |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 of completeness and symmetry (it seemed right to support both binary and |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 S-record formats), but they never got any practical use: if you are making a |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 flash dump, you would normally want to examine it afterward, and any such |
b6b8307d195b
doc: new articles Binary-file-formats and Flash-programming
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 examination almost always needs a straight binary image, not S-records. |