annotate doc/Leonardo-target @ 633:f760e858098b

doc/Compiling: tangomdm target added
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 04 Jan 2020 20:12:07 +0000
parents b639f7ab0007
children 6edd9be81b94
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
626
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 TI's primary development platform for TCS211 firmware was D-Sample - see our
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 D-Sample article for explanation of our current limited support for that target
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 in FC Magnetite - but they also had another platform called Leonardo. The
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 primary difference is the RF section: D-Sample had Clara RF (the one for which
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 we lack support), whereas Leonardo was TI's reference platform for Rita RF and
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 for the complete Calypso+Iota+Rita chipset. Another major difference is that
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 D-Sample was a single stable platform, whereas Leonardo was made in a
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 bewildering assortment of different variants.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 We (FreeCalypso core team) never succeeded in getting our hands on a real
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 TI-made Leonardo board of any variant, but we do have a Leonardo build target
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 in FC Magnetite for two reasons:
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 1) Adding this build target was trivial: our starting hw target for which we
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 got our original starting-point fw was Openmoko's embedded GSM/GPRS modem,
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 and that modem is a very close derivative of Leonardo. The only firmware-
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 affecting diff between Leonardo and OM's modem is FIC/OM's reshuffling of
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 TSPACT control lines for their triband RFFE; producing a build configuration
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 with these TSPACT control signals put back into their original Leonardo
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 arrangement became trivial once our reconstruction of tpudrv12.c from
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 disassembly of tpudrv12.obj reached production quality.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 2) We are currently evaluating a certain third-party (non-TI) development board
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 which strongly appears to be a very close derivative of Leonardo, even closer
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 than Openmoko. We are hoping to get one of these boards into Mother
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Mychaela's lab some time in 2020-01, at which time we will try running our
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 Magnetite-Leonardo fw on it.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 Supported Leonardo variants
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ===========================
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 RF bands: there were several Leonardo variants with full quadband RF using Epcos
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 M034F FEM, and there were several more variants with artifically restricted RF,
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 using a dual-band/single-region FEM and supporting only the two EU bands. The
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 two versions should be firmware-compatible according to our available schematics
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 (the same TSPACT signals are used for Tx control), thus our Magnetite-Leonardo
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 fw should run on any Leonardo variant that matches any of our known schematic
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 versions at least in the principal aspects.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 Flash memory: our Magnetite-Leonardo fw supports the following flash chips for
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 FFS:
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 4 MiB: Fujitsu MBM29DL320FB or MBM29DL320FT
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 8 MiB: Am29DL640G or its Fujitsu equivalent, or any MCP containing this flash
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 16 MiB: Spansion PL129J or its AMD predecessor, second bank on nCS2
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 If anyone finds a Leonardo variant with some other flash, it may not be
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 supported out of the box - but our included FFS configs for the Leonardo target
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 come directly from TI's original TCS211 version (it is highly unlikely that OM
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 changed anything other than adding their Samsung flash), thus we support
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 everything that TI's own TCS211 supported out of the box.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 Memory size limits
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 ==================
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 The linker script template we use for target leonardo has memory region size
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 limits set as follows: 8 MiB of flash, 2 MiB of XRAM and 512 KiB of IRAM. If
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 you are working with a Leonardo or Leonardo-compatible board that has smaller
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 flash or XRAM, or has a Calypso Lite chip with only 256 KiB of IRAM, then you
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 have to manually ensure that you stay within your actual memory limits, as you
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 won't get a failing link unless you exceed the larger linker script limits.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 If you are building a modem-only fw configuration (l1reconst or hybrid), it
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 will fit into under 3 MiB of flash (fitting into a 4 MiB flash chip together
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 with FFS), 512 KiB of XRAM and 256 KiB of IRAM, so you are safe unless you are
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 going to add a lot of your own code or data space. But if you are going to
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 build a UI-enabled fw config (2092 or hybrid-ui), then you will need at least
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 an 8 MiB flash chip (won't fit into a 4 MiB chip together with FFS) and at least
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 1 MiB of XRAM. So far all of our configs fit into 256 KiB of IRAM.
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 Different Calypso chip versions
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 ===============================
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 If you specify the build target as just leonardo, your fw will be configured
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 and built for the leonardo-dsp36 target. If you actually need leonardo-c05b or
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 leonardo-dsp34 because your board has an older Calypso chip version on it, then
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 you will need to specify the build target as just stated - see the
41238a8e140c Leonardo target documented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 Calypso-version-override article.
630
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
79
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
80 Calypso GPIO 2 configuration
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
81 ============================
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
82
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
83 On TI's C-Sample and D-Sample boards Calypso GPIO 2 is wired to serve as the DCD
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
84 output for the MODEM UART (Calypso device as DCE), and our FC Magnetite firmware
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
85 drives it as such on D-Sample, FCDEV3B and GTM900 targets. But this same config
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
86 does NOT apply to Leonardo: on the latter boards GPIO 2 is wired in a way that
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
87 requires it to be configured as an input to Calypso, not an output.
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
88
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
89 TI's TCS211 firmware had this Leonardo GPIO 2 situation handled in a very
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
90 bizarre manner: the main GPIO init code in AI_InitIOConfig() in armio.c made no
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
91 differentiation between D-Sample and Leonardo and configured GPIO 2 as an
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
92 output, then the init code in uartfax.c did the same setup again, but at the
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
93 end of the Init_Serial_Flows() function in the init module (which we only got
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
94 as init.obj, with init.c censored out) they inserted a bit of code that switches
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
95 GPIO 2 to be an input. What a mess.
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
96
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
97 Our handling of this GPIO 2 situation in FC Magnetite is much cleaner: we have
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
98 put an #ifndef CONFIG_TARGET_LEONARDO around the AI_ConfigBitAsOutput(2) call
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
99 in AI_InitIOConfig() so this GPIO line never becomes an output in the first
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
100 place, and our targets/leonardo.h configuration header defines
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
101 UARTFAX_CLASSIC_DTR_DCD to 0 on this target, disabling that code in the
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
102 uartfax.c driver.
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
103
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
104 Other GPIO and multifunction pins
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
105 =================================
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
106
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
107 Our Magnetite-Leonardo fw is unchanged from TI's TCS211 original in that GPIO0,
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
108 TSPDI/GPIO4 and DSR_MODEM/LPG pins are left configured as inputs, even though
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
109 the schematics we've got show GPIO0 as an output and the other two pins as
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
110 unconnected, in which case they should also be configured as outputs in order
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
111 to not float. We are leaving this aspect unchanged currently because this
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
112 Magnetite-Leonardo fw build target is really just a reference for practically
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
113 non-existent hw, and given the unknown of what other Leonardo variants may have
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
114 existed once beyond our known schematics, we would rather leave a few floating
b639f7ab0007 Leonardo GPIO 2 fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 626
diff changeset
115 inputs than risk causing a driver conflict on some unknown board.