upgrading firmware linux

Upgrading Firmware – Linux

Preparation

  • Download the firmware of your choice from Yujin’s fileserver onto your PC.
  • Download the flashing tool for Linux into the same directory.
  • Turn off the robot (switch on the side).
  • Switch from normal runtime mode to firmware download mode.

This simply changes the type of data that is sent back and forth along the usb connection. You can do this by moving the switch illustrated below into the ‘download’ (up) position. Note that this switch is embedded into the robot cover so it isn’t easily thrown by accident – you may need thin plyers or some similar tool.
mode.JPG

  • Connect the robot to your PC using the USB cable.
  • Turn on the robot, give it time to boot up.

Flashing

The downloaded flasher, stm32flash, is used via command-line, so get a terminal ready and proceed with the instructions below.

  • First, download the stm32files, extract them and compile them:

~/kobuki_firmware/$ wget http://stm32flash.googlecode.com/files/stm32flash.tar.gz

~/kobuki_firmware/$ tar -xvf stm32flash.tar.gz

~/kobuki_firmware/$ cd stm32flash

~/kobuki_firmware/stm32flash/$ make

  • If you haven’t done this already, download the newest Kobuki firmware, e.g.

~/kobuki_firmware/$ wget http://files.yujinrobot.com/kobuki/firmware/kobuki_firmware-latest.hex

  • Now, find out the port number of your Kobuki. It will usually show up as /dev/kobuki, but if not, you can typically find it under one of the ttyUSB ports, e.g. /dev/ttyUSB0. If you are not sure, type dmesg into a terminal, unplug and replug the robot and type dmesg again. You should now be able to see which port is assigned to the robot (more precisely the FTDI USB to serial converter).
  • Here is the syntax of the command for flashing the Kobuki:

stm32flash -b 115200 -w

  • Now comes the tricky part:
    • To get the flash tool connecting correctly to the robot, you need to execute the flash command IMMEDIATELY after turning on the robot in flashing mode!
  • So, turn off the robot and make sure it’s set to flashing mode. Now, turn it on and execute the flash tool, e.g.

~/kobuki_firmware/stm32flash/$ ./stm32flash -b 115200 -w ../kobuki_firmware_0.0.1.hex /dev/ttyUSB0

Rebooting

  • Turn off the robot power
  • Flick the firmware switch back to ‘Operation’ mode.
  • Turn on the robot power
  • Be happy!

Troubleshooting

In case you run into problems during the flashing process, please notify us using the Kobuki mailing list. In this way other users can benefit from the problems & solutions found.
If you’re curious, or just really stuck…

0


Leave a Reply

This post was last modified by leechangyong on 2016년 3월 11일.

This article has not been revised since publication.

This post was created by leechangyong on 2016년 2월 25일.

Do NOT follow this link or you will be banned from the site!