FreeCalypso > hg > freecalypso-reveng
annotate frbl/README @ 405:f7df0f4d7d4f
tfo/find-is-hdr.c: print found offset in hex
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 18 Mar 2023 05:57:23 +0000 |
parents | 814d3f24bed6 |
children |
rev | line source |
---|---|
336 | 1 TI's TCS211 firmware and its predecessors contain a flash-resident bootloader |
2 stage which we call FRBL. This FRBL implements not one but two different | |
3 protocols for interrupting the normal fw boot process, downloading a code image | |
4 into RAM and jumping to it; we call these two protocols FRBL1 and FRBL2. The | |
5 reasons for this oddity are historical: the original FRBL (TI GSM bootloader or | |
6 TI GSM monitor or whatever it was called officially) consisted of cmdboot.c, | |
7 command.c, convert.c, optboot.c, serial.c and start.c source modules and | |
8 implemented the protocol we call FRBL1, then came MMJ and other TIDK people | |
9 with their new FLUID idea, they decided on a different protocol which we call | |
10 FRBL2, and they jerry-rigged their new FLUID bootloader into the firmware's | |
11 FRBL code. | |
12 | |
13 The original source for FRBL1 C modules appears to have been lost (it is not | |
14 present in what we presume to be the world's last surviving copy of TCS211 from | |
15 OM), all we have are COFF objects from TI-OM's 20070608 build. The reconst | |
16 subdirectory contains our reconstruction attempt; this reconstruction is of | |
17 poor quality because these particular COFF objects have only minimal symbolic | |
18 information required for linking, as opposed to the much richer -g kind we got | |
19 for L1 and GPF. | |
20 | |
21 The test subdirectory is intended to contain our frbl1test and frbl2test | |
337
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
22 programs; only frbl2test has been written so far. frbl2test implements the |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
23 host downloader side of the protocol we call FRBL2 in the same way how FLUID |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
24 (the PC-side application) implements it, allowing tests at both 115200 and |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
25 230400 baud as explained below. You need to provide a FreeCalypso-style (not |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
26 TI-style) S-record image to be fed to the target bootloader; helloapp from |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
27 freecalypso-tools/target-utils works ideally for this purpose. Because this |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
28 boot path does not go through the Calypso boot ROM, you will need to manually |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
29 select helloapp-irda.srec or helloapp-modem.srec, matching the Calypso UART you |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
30 are going through. frbl1test will work the same way if I ever get around to |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
31 writing it. |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
32 |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
33 230400 baud bogosity |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
34 ==================== |
336 | 35 |
36 Aside from implementing two different serial protocols, TI's FRBL as featured | |
37 in their Calypso firmwares has one other major quirk: both FRBL1 and FRBL2 were | |
38 implemented on 13 MHz platforms (the original purpose was to facilitate fw | |
39 loading on TI's earlier DBB chips before Calypso that didn't have the boot ROM | |
40 which we are so used to), on TI's D-Sample board (Calypso chip, 13 MHz CLKTCXO | |
41 input) both the old way (fluid -oO via FRBL or via JTAG) and the new way | |
42 (fluid -oo via the boot ROM) work well, but FRBL was never updated for 26 MHz | |
43 platforms, thus on all practical Calypso platforms (Leonardo derivatives) one | |
44 must use the boot ROM, not FRBL. | |
45 | |
46 TI's TCS211 builds for Leonardo and all vendor firmwares (Openmoko etc) derived | |
47 from this reference do include FRBL which was never updated for 26 MHz CLKTCXO | |
48 input on these platforms. The result is that FRBL will only work if you talk | |
49 to it at 230400 baud instead of TI's intended 115200 baud. TI's official | |
50 version of FLUID does not support FRBL entry at 230400 baud and such operation | |
51 was clearly never intended or officially supported - instead the officially | |
52 supported way for Leonardo and Leonardo-based customer designs was to use | |
53 fluid -oo mode, which works through the boot ROM just like fc-loadtool. | |
337
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
54 |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
55 There is, however, an inexplicable mystery in that Openmoko seem to have used |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
56 fluid -oO mode somehow (at least with their version of FLUID that may have |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
57 unknown changes relative to TI's original) even though it should have never |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
58 worked at all. See this FreeCalypso community mailing list thread: |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
59 |
814d3f24bed6
frbl/README: minor updates
Mychaela Falconia <falcon@freecalypso.org>
parents:
336
diff
changeset
|
60 https://www.freecalypso.org/pipermail/community/2020-March/000743.html |