Hexakopter
(→WinAVR) |
(→Install new software) |
||
Line 35: | Line 35: | ||
The copter has a bootloader installed, and the kopter-tool can switch to the bootloader while running. | The copter has a bootloader installed, and the kopter-tool can switch to the bootloader while running. | ||
− | Install Kopter-tool. Download the kopter tool zip package from http://svn.mikrokopter.de/listing.php?repname=FlightCtrl&path=/MikroKopter-Tool/#_MikroKopter-Tool_ - take the newest zip-packed version. | + | * Install Kopter-tool. Download the kopter tool zip package from http://svn.mikrokopter.de/listing.php?repname=FlightCtrl&path=/MikroKopter-Tool/#_MikroKopter-Tool_ - take the newest zip-packed version. |
Unpack the zip file, and the Kopter-tool is ready. It may be an idea to make a shortcut on the desktop. | Unpack the zip file, and the Kopter-tool is ready. It may be an idea to make a shortcut on the desktop. | ||
− | Connect the helicopter to the PC (Flight-ctrl 5V rs232 port using the USB to 5v-RS232 | + | * Connect the helicopter to the PC (Flight-ctrl 5V rs232 port using the USB to 5v-RS232 |
device from Microkopter. | device from Microkopter. | ||
Leave the helocopter battery off. And power the Flight-ctrl processor by connecting the two patch pins on the USB to 5v-RS232 board. | Leave the helocopter battery off. And power the Flight-ctrl processor by connecting the two patch pins on the USB to 5v-RS232 board. | ||
Line 45: | Line 45: | ||
Assuming the USB-to-serial device is known to the PC. The PC now has a new com-port. Make sure this has a number less than com10, as it seems than Kopter-tool will only allow one-digit numbers. | Assuming the USB-to-serial device is known to the PC. The PC now has a new com-port. Make sure this has a number less than com10, as it seems than Kopter-tool will only allow one-digit numbers. | ||
− | Start the Kopter-tool. It will probably say "no connection". | + | * Start the Kopter-tool. It will probably say "no connection". |
Click on the "Firmware update and Terminal" buttom. From here change the com-port as appropriate. | Click on the "Firmware update and Terminal" buttom. From here change the com-port as appropriate. | ||
Now a few messages should arrive from the helicopter. | Now a few messages should arrive from the helicopter. | ||
− | Press the "Software Update" and find the compiled *.hex-file. | + | * Press the "Software Update" and find the compiled *.hex-file. |
The newly compiled software should now load. | The newly compiled software should now load. | ||
Revision as of 17:15, 14 May 2011
How to compile and install software in hexacopter The modifications work best under windows, but some support exist for linux too.
This description is for windows (XP)
Contents |
Get software
The supplier URL is http://www.mikrokopter.de/ucwiki/en/MikroKopter?action=show&redirect=FrontPage
To replace the software the following is needed:
- the source code - using SVN
- WinAvr with GCC compiler version 3.xx (newer compiles produce to slow code)
- kopter-tool to install the software
SVN checkout
Install TortoiseSVN from http://sourceforge.net/projects/tortoisesvn/ if you do not have an SVN client already.
Do a SVN checkout from http://mikrokopter.de/mikrosvn/FlightCtrl/ to get the sourcevode for the flight controler (for other software - e.g. motor controller, the SVN URL is at http://www.mikrokopter.de/ucwiki/MikroKopterRepository)
WinAVR
WinAvr version WinAVR-20060421 comes with gcc version 3.4.6 - wich is OK. gcc version 4.x until at least 4.5.1 will not work (CPU will get overloaded and will - at least - no longer talk to kopter-tool.
- Install WinAVR version WinAVR-20060421 from http://sourceforge.net/projects/winavr/files/WinAVR/
- Open programmers notepad and open a project for the newest branch in the flight controller repository. It already has a project file for programmers notepad. And a makefile for avr-gcc.
- Compile the project (Tools->make_All) and it should make a *.hex file for one of the Flight-ctrl boards (currently default is version 2.0 with an atMEGA644 processor (Flight-ctrl 2.1 has an atMEGA1284p processor, and one of the first lines in the makefile needs to be changed)
Install new software
To install the newly compiled software use Kopter-tool. The copter has a bootloader installed, and the kopter-tool can switch to the bootloader while running.
- Install Kopter-tool. Download the kopter tool zip package from http://svn.mikrokopter.de/listing.php?repname=FlightCtrl&path=/MikroKopter-Tool/#_MikroKopter-Tool_ - take the newest zip-packed version.
Unpack the zip file, and the Kopter-tool is ready. It may be an idea to make a shortcut on the desktop.
- Connect the helicopter to the PC (Flight-ctrl 5V rs232 port using the USB to 5v-RS232
device from Microkopter. Leave the helocopter battery off. And power the Flight-ctrl processor by connecting the two patch pins on the USB to 5v-RS232 board.
Assuming the USB-to-serial device is known to the PC. The PC now has a new com-port. Make sure this has a number less than com10, as it seems than Kopter-tool will only allow one-digit numbers.
- Start the Kopter-tool. It will probably say "no connection".
Click on the "Firmware update and Terminal" buttom. From here change the com-port as appropriate. Now a few messages should arrive from the helicopter.
- Press the "Software Update" and find the compiled *.hex-file.
The newly compiled software should now load.
If the load fails, then try again (at times some data is lost).
If the helicopter fails to run (totally wrong code, or upload-error), then the bootloader (most likely) still works. But the upload needs a special procedure.
Dead kopter bootload: Remove the jumper that powers the Flight-ctrl (on the USB to 5v-RS232 converter), start a new software update, and while it shown dots "...." on the terminal window, replace the jumper, and the boot-loader should be catched before it starts the faulty software. If it fails, retry.