Firmware

From Wiki for RobotCub and Friends

Jump to: navigation, search

Contents

Bootloader update


To update the bootloader you must have a programmer for Freescale DSP56F807 (USBTAP or a ParallelToJTAG programmer), CodeWarrior IDE that you can download from the http://www.freescale.com (the code of the bootloader is small then it is not required any license) and the CanLoader module. In order to see the bootloader version of the boards you must run the CanLoader module in gui mode and press the connect button within five seconds after switching on the boards. Information on where and what to buy from Freescale (Metrowerks CodeWarrior) can be found in here.

There is also a document describing the firmware versions available from here


How to upload the bootloader step by step.

  • Connect the JTAG to the connector P1 of the BLL or MC4 board. If you have to remove screws to do it, you have to put them in the same place after installing the bootloader. The pinout of the connector is the following

JTAG pinout in BLL and 4DC

Connector P1 Label
1 TDI
2 TDO
3 GND
4 TCK
5 ~RESET
6 TMS
7 3.3V
8 ~DE
9 ~TRST
10 ~RSTO
  • Run CodeWarrior IDE and open the project $ICUB_ROOT$/src/firmware/loader56f807/RM-DownLoaderCAN.mcp
  • Go to Edit -> 56807 BootLoader Setting and set the programmer you are using. In the case of the USBTAP this is the setting:

bootloader

  • Switch on the board
  • Press the play button on the project tab and wait until the download is completed. It will take less then one minute.
  • Now you must restart the board and download the right firmware using the CanLoader application in gui mode. Note: You must download the firmware immediately after (from one to 5 seconds) the board is switched on . So, you have to switch on the board and then press the connect button in the canLoader gui.

Firmware update

Note: the firmware upgrade is based on a command line version of the CanLoader module. Before you try to use this script please check that this module is compiled. You should also make sure that the hardware modules it needs (controlboard, canmotioncontrol, ecan/pcan) are compiled and liked correctly (this is usually the case on the robot pc104).

We here describe the procedure for updating the firmware (bugs should be reported on the mailing list robotcub-hackers@lists.sourceforge.net). Please notice that the firmware upgrade is delicate procedure which changes one of the core parts of the iCub robot software (and therefore requires a corresponding update of the yarp and iCub modules). If you decide to perform a firmware upgrade, be aware that this might change the robot motor behaviour quite a lot. Nevertheless, a firmware upgrade is always recommended because it usually correspond to improvements of the control board performances. Here are the steps for performing the firmware update:

  • Connect to the PC104.
  • Go the $YARP_ROOT directory and update the entire yarp module:
icub@pc104:YARP_ROOT$ svn update
  • Recompile Yarp:
icub@pc104:YARP_ROOT$ make
  • Go the $ICUB_ROOT directory and update the entire iCub module:
icub@pc104:ICUB_ROOT$ svn update.
  • Recompile iCub:
icub@pc104:ICUB_ROOT$ make
  • Go to the firmware directory:
icub@pc104:ICUB_ROOT$ cd $ICUB_ROOT/src/firmware/build
  • Launch the firmware update script ($ICUB_ROOT/src/firmware/build/updateRobot.sh) with a proper configuration file (e.g. $ICUB_ROOT/src/firmware/build/updateRobot.txt if you have a standard iCub, or $ICUB_ROOT/src/firmware/build/updateRobotv1.1.txt if you have a v1.1 iCub).
icub@pc104:ICUB_ROOT/src/firmware/build$ ./updateRobot.sh updateRobot.txt

Or alternatively you can update just a part of the robot:

icub@pc104:ICUB_ROOT/src/firmware/build$ ./updateRobot.sh updateLegs.txt

You can also try to edit the updateRobot script configuration file. This file is simply a list with the following structure:

canModule canDeviceNum boardId firmware

where canModule can be either pcan (if you are using the PLX custom board) or ecan (if you are using the commercial usb to can interface produced by ESD)

Firmware versions

We here give the information for associating the correct firmware versions to the different boards which control the iCub robot. This information applies only to the first version of the robot (i.e. v1.0). Further and more complete information can be fond here.

Head

boardLabel canDeviceNum boardId firmware
0B0 -> 0 1 4DC.1.11.out.S
0B1 -> 0 3 4DC.1.15.out.S

Torso

boardLabel canDeviceNum boardId firmware
0B3 -> 0 5 2BLL.1.54.out.S
0B4 -> 0 6 2BLL.1.52.out.S

Left arm

boardLabel canDeviceNum boardId firmware
1B0 -> 1 1 2BLL.1.50.out.S
1B1 -> 1 2 2BLL.1.53.out.S
1B2 -> 1 3 4DC.1.19.out.S
1B3 -> 1 5 4DC.1.18.out.S
1B4 -> 1 7 4DC.1.20.out.S

Right arm

boardLabel canDeviceNum boardId firmware
2B0 -> 2 1 2BLL.1.50.out.S
2B1 -> 2 2 2BLL.1.53.out.S
2B2 -> 2 3 4DC.1.19.out.S
2B3 -> 2 5 4DC.1.18.out.S
2B4 -> 2 7 4DC.1.20.out.S

legs

boardLabel canDeviceNum boardId firmware
3B5 -> 3 5 2BLL.1.51.out.S
3B6 -> 3 6 2BLL.1.51.out.S
3B7 -> 3 7 2BLL.1.51.out.S
3B8 -> 3 8 2BLL.1.51.out.S
3B9 -> 3 9 2BLL.1.51.out.S
3B10 -> 3 10 2BLL.1.51.out.S
Personal tools