FreeCalypso > hg > freecalypso-tools
comparison doc/Target-boot-control @ 738:f19d12f5756f
doc/Target-boot-control: updated for DUART28C
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 16 Sep 2020 06:49:31 +0000 |
parents | d3e2b23ebf1d |
children | b0b6966fa62e |
comparison
equal
deleted
inserted
replaced
737:6d97866bad79 | 738:f19d12f5756f |
---|---|
1 There is a new feature in loadtools (fc-loadtool & friends) and rvinterf as of | 1 There is a new feature in loadtools (fc-loadtool & friends) and rvinterf as of |
2 fc-host-tools-r12: target boot control. In a typical development environment | 2 fc-host-tools-r12, actually functional as of fc-host-tools-r14: target boot |
3 where FC host tools run on a general-purpose PC or laptop and communicate with | 3 control. In a typical development environment where FC host tools run on a |
4 various Calypso targets via general-purpose serial or USB-serial ports, adapters | 4 general-purpose PC or laptop and communicate with various Calypso targets via |
5 and cables, there is generally no way for the host computer running FC host | 5 general-purpose serial or USB-serial ports, adapters and cables, there is |
6 tools to directly command the Calypso target to power on and/or reboot - instead | 6 generally no way for the host computer running FC host tools to directly command |
7 such control must be performed "out of band" by the operator pressing the PWON | 7 the Calypso target to power on and/or reboot - instead such control must be |
8 or RESET button on the target device; some targets may even require complex | 8 performed "out of band" by the operator pressing the PWON or RESET button on |
9 battery manipulations. However, there may be more elaborate (less casual) | 9 the target device; some targets may even require complex battery manipulations. |
10 setups where FC host tools run on a special kind of host system which does have | 10 However, there may be more elaborate (less casual) setups where FC host tools |
11 some means to directly control power and reset to an associated Calypso target: | 11 run on a special kind of host system which does have some means to directly |
12 control power and reset to an associated Calypso target: | |
12 | 13 |
13 * The Mother has a plan to produce a special FreeCalypso UART+JTAG Adapter, or | 14 * Our new FreeCalypso DUART28 adapter available as of 2020-09 has an optional |
14 FC-UJA. This FC-UJA will be a special FT2232D adapter whose Channel A will | 15 provision (requires additional wire connections and a custom patch to Linux |
15 operate in MPSSE mode, connecting to the Calypso target's JTAG and nTESTRESET | 16 kernel ftdi_sio driver) for controlling Calypso target board PWON and RESET |
16 signals, whereas Channel B will act as a standard UART, i.e., a ttyUSB device. | 17 with otherwise unused secondary channel RTS and DTR outputs - see the new |
17 This FC-UJA needs to be built as a prerequisite before embarking on the | 18 DUART28-boot-control article for the details. |
18 ambitious HSMBP (Handset Motherboard Prototype) project, as the special | 19 |
19 adapter will be required for working with the HSMBP in development. When | 20 * The Mother has a plan to produce another custom FT2232D-based adapter called |
20 FC-UJA becomes a reality, FC host tools running on a development host with | 21 FC-UJA, standing for FreeCalypso UART+JTAG Adapter. This FC-UJA will be a |
21 this adapter will need to be given the ability to issue nTESTRESET pulses to | 22 special FT2232D adapter whose Channel A will operate in MPSSE mode, connecting |
22 the target through the adapter's MPSSE+GPIO channel; this nTESTRESET pulse | 23 to the Calypso target's JTAG and nTESTRESET signals, whereas Channel B will |
23 will cause the Calypso target to deep-reset, power on and boot. | 24 act as a standard UART, i.e., a ttyUSB device. This FC-UJA needs to be built |
25 as a prerequisite before embarking on the ambitious HSMBP (Handset Motherboard | |
26 Prototype) project, as the special adapter will be required for working with | |
27 the HSMBP in development. When FC-UJA becomes a reality, FC host tools | |
28 running on a development host with this adapter will need to be given the | |
29 ability to issue nTESTRESET pulses to the target through the adapter's | |
30 MPSSE+GPIO channel; this nTESTRESET pulse will cause the Calypso target to | |
31 deep-reset, power on and boot. | |
24 | 32 |
25 * FC host tools (particularly fc-loadtool) may run on the application processor | 33 * FC host tools (particularly fc-loadtool) may run on the application processor |
26 of a smartphone such as Openmoko GTA02. In such environments the AP will have | 34 of a smartphone such as Openmoko GTA02. In such environments the AP will have |
27 special ad hoc control signals (typically GPIOs) to the modem, at the minimum | 35 special ad hoc control signals (typically GPIOs) to the modem, at the minimum |
28 controlling the modem's PWON line. OM GTA02 added an overriding control of | 36 controlling the modem's PWON line. OM GTA02 added an overriding control of |
47 command that replaces the manual button press. Very cumbersome, hence the | 55 command that replaces the manual button press. Very cumbersome, hence the |
48 desire for a better way. | 56 desire for a better way. |
49 | 57 |
50 Support for target boot control in FC host tools consists of a new -P option | 58 Support for target boot control in FC host tools consists of a new -P option |
51 implemented in all of loadtools programs and in rvinterf, as well as a special | 59 implemented in all of loadtools programs and in rvinterf, as well as a special |
52 configuration file which needs to be manually created. The working model is as | 60 configuration file which needs to be manually created if external boot control |
53 follows: | 61 commands are to be used. There are two target boot control models, built-in |
62 and external: | |
54 | 63 |
55 * There exist one or more "magic commands": a magic command is any shell command | 64 * Built-in target boot control integrated into FC host tools themselves is |
56 (anything that can be passed to /bin/sh -c) whose execution causes a connected | 65 currently available only for the DTR/RTS pulsing method implemented on our |
57 Calypso target device to power on and boot. Naturally these commands will be | 66 DUART28 adapter: -Pdtr means pulse DTR and -Prts means pulse RTS. Please |
58 very specific to your custom system; they are NOT part of FC host tools! | 67 refer to the DUART28-boot-control article for the details. |
68 | |
69 * In the other case of external boot control commands, there exist one or more | |
70 "magic commands": a magic command is any shell command (anything that can be | |
71 passed to /bin/sh -c) whose execution causes a connected Calypso target device | |
72 to power on and boot. Naturally these commands will be very specific to your | |
73 custom system; they are NOT part of FC host tools! | |
59 | 74 |
60 * These magic commands may be long, and requiring the user to include each magic | 75 * These magic commands may be long, and requiring the user to include each magic |
61 command in full on fc-loadtool, rvinterf etc invokation lines is undesirable. | 76 command in full on fc-loadtool, rvinterf etc invokation lines is undesirable. |
62 To save typing, we associate a short name (which you choose yourself as you | 77 To save typing, we associate a short name (which you choose yourself as you |
63 see fit) with each magic command, and we have a configuration file (which you | 78 see fit) with each magic command, and we have a configuration file (which you |
64 need to create) that defines the mapping. | 79 need to create) that defines the mapping. |
65 | 80 |
66 * The argument to the new -P option is the short name to be looked up in the | 81 * The argument to the new -P option is the short name to be looked up in the |
67 configuration file. | 82 configuration file. (Built-in boot control names 'dtr' and 'rts' are reserved |
83 and cannot be used for external boot control commands.) | |
68 | 84 |
69 The configuration file needs to be created in /opt/freecalypso/bootctrl.conf; | 85 The configuration file needs to be created in /opt/freecalypso/bootctrl.conf; |
70 let us illustrate it with some examples. | 86 let us illustrate it with some examples. |
71 | 87 |
72 Example 1: FC-UJA | 88 Example 1: FC-UJA |