[[Softwareentwicklung|German]]

= Software development, Compiling of the code =
Here you can read how to compile the AVR-Code of the FlightControl.

== Compiler under Windows ==

1. Download and install the 20060421 - Version of the WinAVR-Compiler (please do NOT use newer versions of the compiler - they will create much slower code!). See also [[http://forum.mikrokopter.de/topic-post124526.html|Forum]]

 * [[http://downloads.sourceforge.net/winavr/WinAVR-20060421-install.exe?use_mirror=mesh|WinAVR-20060421 Compiler]] 
 * [[http://www.mikrocontroller.com/files/WinAVR-20060421-patch_MikroKopter.zip|Special Patch from H&I]]. The patch will overwrite some files.
 * The Patch integrates the AT1284 into the Compiler 

2. Download a [[Subversion]]-Client and use the MikroKopterRepository

See also in the Forum: [[http://forum.mikrokopter.de/topic-post368406.html#post368406|Link]]

3. Start the Programmers Notepad and open the the project "File"  -> "Open Project(s)..."

4. Under '''Tools''' you will find "Make Clean" and "Make All" 

Normally wou will get an output like this:

{{{
Errors: none
kore-------- end --------
}}}

The Compiler creates the Hex-File - You can download the HEx-File via the Mikrokopter-Tool into the FlightControl

In case that there are some errors under Windows 7 (path not found), you must run the Compiler once with Admin rights. 

== No communication to FC after insatlling new Hex-File ==
In case you made some Bugs in your code and you lost connection to the FC:

In that case the FC might not listen to the reset command during update attempt.

 * connect the update cable directly to the FC
 * start Updating process (KopterTool)
 * switch on the FC in the moment when the PC prints "trying to connect..."

== Lib not compatible ==
In case you get that error-message, the Lib.a is not compatible to your sources.

 * make sure that the LIBFC_Init() is called with LIBFC_Init(LIB_FC_COMPATIBLE) 

== Installing the new Firmware ==
The new Hex-File must be installed via the KopterTool (like every normal version)

/!\ Do never connect a ATMEL-ISP-Programmer, that would delete the Bootloader and further updates will be impossible.

== Projekt Samples ==

[[http://www.mikrokopter.de/ucwiki/Firmware-0.88e-Telemetrie%2B-V1.01|Telemetrie+ Version v0.88e]]

[[http://forum.mikrokopter.de/topic-29470.html|Jeti+ Version v0.86d]]

[[http://forum.mikrokopter.de/topic-30377.html|HOTT+ Testversion, FC v0.86d]]

[[http://forum.mikrokopter.de/topic-24157.html|Spektrum DX8 Channel Expander for 12 Channels!]]

[[http://forum.mikrokopter.de/topic-30863.html|ACC-HH Version: V0.86d_ACC-HH_HR_MartinR]]

[[http://forum.mikrokopter.de/topic-3581.html|Code Redesign by killagreg]]

[[http://forum.mikrokopter.de/topic-23651.html|Support für Mode 1 und 4 in FC V0.84a]]

[[http://forum.mikrokopter.de/topic-15536.html|dongfang FC Rewrite]]