-
Notifications
You must be signed in to change notification settings - Fork 16
/
FirmwareUpdater.readme.fulldetails.txt
230 lines (186 loc) · 20.4 KB
/
FirmwareUpdater.readme.fulldetails.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# Full details of use of FirmwareUpdater
---------------------------------------------------------------------------------------------------------------------------
FirmwareUpdater
---------------------------------------------------------------------------------------------------------------------------
FirmwareUpdater allows to manage the firmware of ETH and CAN boards: to see them, to update their firmware and to do extra
operations of strain boards.
It has both GUI and command line mode and it adds some extra features such as detection of the type of boards and hence
more controls over accidental operations on heterogeneous boards. These new features need a recent version of eLoader and
eUpdater. The programs however still runs with all legacy FW versions.
Refer to https://github.com/robotology/QA/issues/221 for details about what benefits the new eLoader and eUpdater give.
To use FirmwareUpdater you must have any master release of icub-main dated June 2017 or newer. Also, you must install the
configuration files of your robot from repository robots-configuration. For this operation, please refer to documentation
of the repository. The effect of installation is that the file firmwareupdater.ini is placed in the system where the yarp
resource finder can find it.
This .ini file contains a number of drivers under which the program must search for ETH and CAN boards. On our robots
there are two main types of drivers: ETH<> and CFW2<>.
CAN-based robots have only CFW2 devices, first generation of ETH-based robots have one ETH and two CFW2 devices, most
recent ETH-robots have only one ETH device.
However, other CAN drivers are also supported: PCAN, SOCKET and ECAN. This latter can be used windows with the ESD
CAN-USB dongle.
For more details of use on ETH robots, read file ETH/FirmwareUpdater.readme.maintenance.of.eth.robots.txt.
---------------------------------------------------------------------------------------------------------------------------
(1) GUI mode
---------------------------------------------------------------------------------------------------------------------------
When FirmwareUpdater starts, it shows the drivers inside its .ini file. One must at first perform a discovery under these
devices by highlighting the device and pressing the button `Discover` placed on the bottom right of the GUI in section
`Controls`. This procedure will populate the panel on the left of the GUI with the found board. They will be CAN boards
for CFW2<> drivers and ETH boards for teh ETH<> driver. When selecting a board, extra information will be displayed on the
panel on the right on top.
The CFW2<> drivers hosts only CAN boards, whereas the ETH<> driver surely hosts ETH boards at first level but may also
host CAN boards beneath one ETH board. To find the CAN boards under ETH you must first send the ETH board in maintenance
status and then perform a new discovery underneath.
It is possible to launch the FirmwareUpdater program with the "--admin" option. The effect is that the GUI shows an extra
set of advanced features which cna be used to perform advanced operations.
Here are some Figures which show the layout of the GUI in several situations: when launched and after some discoveries.
titlebar
--- board area | toolbar -------------------------------|
| v |
| ---------------------------------------------------------------------------------------------------------------- |
| | x-[] FirmwareUpdater | |
| |---------------------------------------------------------------------------------------------------------------- |
| | [v] [ ] | <---|
| ----------------------------------------------------------------------------------------------------------------
| | Selected | Device | Board | Address | Process | Version | Info | Board Properties |
| |-----------------------------------------------------------------------| ----------------------------------- |
| | > ETH<eth> | | Name Value | |
| | > CFW2<9> | |-----------------------------------| |
| | | | | |
| | | | | |
->| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | ----------------------------------- |
| | |
| | Controls |
| | [Discover] [Force ETH Maintenance] |
| | [Force ETH Application] [Change Info] |
| | [Upload Application] |
----------------------------------------------------------------------------------------------------------------
| (--------) |
----------------------------------------------------------------------------------------------------------------
Figure 1. The FirmwareUpdater GUI as it appears when just launched. The .ini file has two devices: one is ETH<> and
the other is CFW2<> on bus 9. They are shown on the board area on the left. Under these two devices the
discovery procedure will place the found boards and will print basic information such as: board type,
address, running process, version, and an info string. If one highligths a board the panel Board Properties
on the right fills with extra details. One board can be selected / deselected with the mouse or with the aid
of the two icons in toolbar: [v] which completes the selection to all the boards of the same type, and [ ]
which deselects all the boards which are selected. When one or more boards of the same type are selected the
buttons under Control activate and allow to operate on them.
titlebar
--- board area | toolbar -------------------------------|
| v |
| ---------------------------------------------------------------------------------------------------------------- |
| | x-[] FirmwareUpdater | |
| |---------------------------------------------------------------------------------------------------------------- |
| | [v] [ ] | <---|
| ----------------------------------------------------------------------------------------------------------------
| | Selected | Device | Board | Address | Process | Version | Info | Board Properties |
| |-----------------------------------------------------------------------| ----------------------------------- |
| | > ETH<eth> | | Name Value | |
| | > CFW2<9> | |-----------------------------------| |
| | | | | |
| | | | | |
->| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | ----------------------------------- |
| | |
| | Controls |
| | [Discover] [Force ETH Maintenance] |
| | [Force ETH Application] [Change Info] |
| | [Upload Application] |
| | |
| | Advanced Controls |
| | [Change IP Address] [Restart ETH b..] |
| | [Blink ETH Board] [Upload eLoader] |
| | [Upload eUpdater] [Jump to eUpdater] |
| | [Set Def Boot eApplication] |
| | [Set Def Boot eUpdater] [Erase ETH..] |
| | [Change CAN address] |
| | |
| | Strain Operations |
| | [Acquire] [Calibrate] [] Erase EEPROM |
| | |
----------------------------------------------------------------------------------------------------------------
| (--------) |
----------------------------------------------------------------------------------------------------------------
Figure 2. The FirmwareUpdater GUI as it appears when launched with "--admin". The Advanced Controls buttons which
are now made visible allow for expert operations.
----------------------------------------------------------------------------------------------------------------
| x-[] FirmwareUpdater |
|----------------------------------------------------------------------------------------------------------------
| [v] [ ] |
----------------------------------------------------------------------------------------------------------------
| Selected | Device | Board | Address | Process | Version | Info | Board Properties |
|-----------------------------------------------------------------------| ----------------------------------- |
| v ETH<eth> | | Name Value | |
| >[ ] mc4plus 10.0.1.20 eApplication 3.0 head | |-----------------------------------| |
| >[ ] ems4 10.0.1.1 eApplication 3.1 left-arm | | ETH board | |
| v[ ] ems4 10.0.1.3 eUpdater 2.3 right-arm| | Type ems | |
| foc CAN1:1 canApplicat.. 2.2.0 | | MAC 02-00-00-6D-38-4F | |
| foc CAN1:2 canApplicat.. 2.2.0 | | IP 10.0.1.3 | |
| foc CAN1:3 canApplicat.. 2.2.0 | | status maintenance | |
| foc CAN1:4 canApplicat.. 2.2.0 | | Bootstrap Processes | |
| strain CAN2:1 canApplicat.. 1.5.1 | | ... | |
| v[ ] mc4plus 10.0.1.21 eUpdater 2.3 face | ----------------------------------- |
| ? | |
| >[ ] unknown 10.0.1.7 eUpdater 1.0 N/A | |
| v CFW2<9> | |
| mtb CAN9:1 canApplicat.. 1.16.0 on chest | Controls |
| mtb CAN9:2 canApplicat.. 1.16.0 on chest | [Discover] [Force ETH Maintenance] |
| | [Force ETH Application] [Change Info] |
| | [Upload Application] |
----------------------------------------------------------------------------------------------------------------
| (--------) Operation Done |
----------------------------------------------------------------------------------------------------------------
Figure 3. The FirmwareUpdater GUI as it appears after some discoveries. On ETH<> there are 5 ETH boards. One of
them, and ems4 with address 10.0.1.3 is highlighted and shows further details in Board Properties.
A previous discovery under it found some CAN boards. A discovery under the mc4plus at 10.0.1.21 instead
did not find any CAN board. One ETH board, the 10.0.1.7 is labeled unknown and with N/A Info because it
has an old version of the eUpdater which does not transmit the Board and Info fields. Finally, the
discovery under CFW2>9> has found two CAN boards.
---------------------------------------------------------------------------------------------------------------------------
(2) Command line mode
---------------------------------------------------------------------------------------------------------------------------
This mode can be used inside a bash script to perform automatic and not-interactive FW update of the complete robot.
In the following we just report some example of command line usage. These commands shall soon be grouped inside
a script which will be able to perform automatic update of your robot. The creation and test of those scripts is WIP.
Example of programming the application FW of the EMS board @ 10.0.1.1:
> FirmwareUpdater --nogui --verbosity 0 –-force-eth-maintenance --device ETH --id eth0 --eth_board 10.0.1.1
> FirmwareUpdater --nogui --verbosity 0 --program --device ETH --id eth0 --eth_board 10.0.1.1 --file ems.hex
> FirmwareUpdater --nogui --verbosity 0 –-force-eth-application --device ETH --id eth0 --eth_board 10.0.1.1
Example of programming the application FW of a 2FOC board w/ CAN1:3 beneath the EMS board @ 10.0.1.1:
> FirmwareUpdater --nogui --verbosity 0 –-force-eth-maintenance --device ETH --id eth0 --eth_board 10.0.1.1
> FirmwareUpdater --nogui --verbosity 0 --program --device ETH --id eth0 --eth_board 10.0.1.1 --can_line 1 --can_id 3 --file 2FOC.hex
> FirmwareUpdater --nogui --verbosity 0 –-force-eth-application --device ETH --id eth0 --eth_board 10.0.1.1
Example of programming the application FW of a MTB board on CFW2<9> and ID 3:
> FirmwareUpdater --nogui --verbosity 0 --program --device CFW2_CAN --id 9 --can_line 9 --can_id 3 --file skin.hex
---------------------------------------------------------------------------------------------------------------------------
(3) Scripts for automatic management of the robot
---------------------------------------------------------------------------------------------------------------------------
The use of command line mode of FirmwareUpdater for management of the robot can be quite complex. The reason is that
one must specify the correct sequence of commands, correct addresses and location of binary files for many board,
of each different robot.
For this reason, we have prepared a python program, manageFWrobot.py, which:
- Loads a network.$ICUB_ROBOTNAME.xml file with the description of the boards required by a specific robot.
These files are stored in the robots-configuration repository.
- Loads the most recent info/firmware.info.xml file from current icub-firmware-build repository to allow
finding version and location of the binary files.
- Provides options to select a subset of boards (by bodypart, board name) from network.$ICUB_ROBOTNAME.xml.
- Calls FirmwareUpdater in non GUI mode to perform a number of different operations:
- info: prints properties of firmware of the selected boards on a given robot plus estimated programming time
- query: asks the selected boards on a given robot about their firmware versions.
- verify: query the selected boards on the robot about their firmware versions and checks them vs those
specified on file firmware.info.xml
- program: programs all the selected boards on a given robot with the binaries specified by file firmware.info.xml.
- update: program only the selected boards on a given robot which do have a firmware version different from that in
file firmware.info.xml.
- forcemaintenance: force the maintenance mode of the selected boards on a given robot
- forceapplication: force the application mode of the selected boards on a given robot.
Examples of bash scripts which wraps the python programs are given in folder /scripts.
Read the document FirmwareUpdater.readme.scripts.txt for more details.