Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added bootloader code - USBasploader by Objective Development (http:/…

  • Loading branch information...
commit 9e599e4383bb7bb6c5b856f52e6685b3112e599a 1 parent 578a166
Nephirus authored September 17, 2012

Showing 45 changed files with 10,994 additions and 0 deletions. Show diff stats Hide diff stats

  1. 24  firmware/bootloader/Changelog.txt
  2. 361  firmware/bootloader/License.txt
  3. 181  firmware/bootloader/Makefile
  4. 113  firmware/bootloader/Readme.txt
  5. 160  firmware/bootloader/bootloaderconfig.h
  6. 123  firmware/bootloader/hexfiles/mega168_12mhz.hex
  7. 126  firmware/bootloader/hexfiles/mega168_15mhz.hex
  8. 128  firmware/bootloader/hexfiles/mega168_16mhz.hex
  9. 127  firmware/bootloader/hexfiles/mega168_20mhz.hex
  10. 123  firmware/bootloader/hexfiles/mega328p_12mhz.hex
  11. 126  firmware/bootloader/hexfiles/mega328p_15mhz.hex
  12. 128  firmware/bootloader/hexfiles/mega328p_16mhz.hex
  13. 127  firmware/bootloader/hexfiles/mega328p_20mhz.hex
  14. 120  firmware/bootloader/hexfiles/mega88_12mhz.hex
  15. 123  firmware/bootloader/hexfiles/mega88_15mhz.hex
  16. 124  firmware/bootloader/hexfiles/mega88_16mhz.hex
  17. 123  firmware/bootloader/hexfiles/mega88_20mhz.hex
  18. 118  firmware/bootloader/hexfiles/mega8_12mhz.hex
  19. 122  firmware/bootloader/hexfiles/mega8_15mhz.hex
  20. 123  firmware/bootloader/hexfiles/mega8_16mhz.hex
  21. 326  firmware/bootloader/main.c
  22. 256  firmware/bootloader/read.hex
  23. 321  firmware/bootloader/usbconfig.h
  24. 308  firmware/bootloader/usbdrv/Changelog.txt
  25. 166  firmware/bootloader/usbdrv/CommercialLicense.txt
  26. 361  firmware/bootloader/usbdrv/License.txt
  27. 172  firmware/bootloader/usbdrv/Readme.txt
  28. 149  firmware/bootloader/usbdrv/USB-ID-FAQ.txt
  29. 148  firmware/bootloader/usbdrv/USB-IDs-for-free.txt
  30. 188  firmware/bootloader/usbdrv/asmcommon.inc
  31. 50  firmware/bootloader/usbdrv/oddebug.c
  32. 123  firmware/bootloader/usbdrv/oddebug.h
  33. 376  firmware/bootloader/usbdrv/usbconfig-prototype.h
  34. 625  firmware/bootloader/usbdrv/usbdrv.c
  35. 735  firmware/bootloader/usbdrv/usbdrv.h
  36. 393  firmware/bootloader/usbdrv/usbdrvasm.S
  37. 21  firmware/bootloader/usbdrv/usbdrvasm.asm
  38. 393  firmware/bootloader/usbdrv/usbdrvasm12.inc
  39. 750  firmware/bootloader/usbdrv/usbdrvasm128.inc
  40. 423  firmware/bootloader/usbdrv/usbdrvasm15.inc
  41. 346  firmware/bootloader/usbdrv/usbdrvasm16.inc
  42. 453  firmware/bootloader/usbdrv/usbdrvasm165.inc
  43. 707  firmware/bootloader/usbdrv/usbdrvasm18-crc.inc
  44. 360  firmware/bootloader/usbdrv/usbdrvasm20.inc
  45. 144  firmware/bootloader/usbdrv/usbportability.h
24  firmware/bootloader/Changelog.txt
... ...
@@ -0,0 +1,24 @@
  1
+This file documents changes in the firmware of USBaspLoader.
  2
+New entries are always appended to the end of the file. Scroll down to the
  3
+bottom to see the most recent changes.
  4
+
  5
+
  6
+* Release 2008-01-21
  7
+
  8
+- Use most recent driver.
  9
+
  10
+* Release 2008-02-05
  11
+
  12
+- Disable USB interrupt before we jump to loaded application. Applications
  13
+  which don't use INT0 would otherwise crash when they perform sei().
  14
+- Revert all config changes to RESET condition before we jump to application.
  15
+- Code size optimizations suggested by Alexander Neumann.
  16
+
  17
+* Release 2009-03-20
  18
+
  19
+- Added some optimizations so that the boot loader can be used with gcc 4.3.
  20
+- Added fuse options (as comments) for ATMega328p to Makefile and include in
  21
+  precompiled hex files.
  22
+- Updated usbconfig.h to the latest template (mostly new comments).
  23
+
  24
+* Release 2010-07-27
361  firmware/bootloader/License.txt
... ...
@@ -0,0 +1,361 @@
  1
+OBJECTIVE DEVELOPMENT GmbH's V-USB driver software is distributed under the
  2
+terms and conditions of the GNU GPL version 2 or the GNU GPL version 3. It is
  3
+your choice whether you apply the terms of version 2 or version 3. The full
  4
+text of GPLv2 is included below. In addition to the requirements in the GPL,
  5
+we STRONGLY ENCOURAGE you to do the following:
  6
+
  7
+(1) Publish your entire project on a web site and drop us a note with the URL.
  8
+Use the form at http://www.obdev.at/vusb/feedback.html for your submission.
  9
+
  10
+(2) Adhere to minimum publication standards. Please include AT LEAST:
  11
+    - a circuit diagram in PDF, PNG or GIF format
  12
+    - full source code for the host software
  13
+    - a Readme.txt file in ASCII format which describes the purpose of the
  14
+      project and what can be found in which directories and which files
  15
+    - a reference to http://www.obdev.at/vusb/
  16
+
  17
+(3) If you improve the driver firmware itself, please give us a free license
  18
+to your modifications for our commercial license offerings.
  19
+
  20
+
  21
+
  22
+                    GNU GENERAL PUBLIC LICENSE
  23
+                       Version 2, June 1991
  24
+
  25
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  26
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  27
+ Everyone is permitted to copy and distribute verbatim copies
  28
+ of this license document, but changing it is not allowed.
  29
+
  30
+                            Preamble
  31
+
  32
+  The licenses for most software are designed to take away your
  33
+freedom to share and change it.  By contrast, the GNU General Public
  34
+License is intended to guarantee your freedom to share and change free
  35
+software--to make sure the software is free for all its users.  This
  36
+General Public License applies to most of the Free Software
  37
+Foundation's software and to any other program whose authors commit to
  38
+using it.  (Some other Free Software Foundation software is covered by
  39
+the GNU Library General Public License instead.)  You can apply it to
  40
+your programs, too.
  41
+
  42
+  When we speak of free software, we are referring to freedom, not
  43
+price.  Our General Public Licenses are designed to make sure that you
  44
+have the freedom to distribute copies of free software (and charge for
  45
+this service if you wish), that you receive source code or can get it
  46
+if you want it, that you can change the software or use pieces of it
  47
+in new free programs; and that you know you can do these things.
  48
+
  49
+  To protect your rights, we need to make restrictions that forbid
  50
+anyone to deny you these rights or to ask you to surrender the rights.
  51
+These restrictions translate to certain responsibilities for you if you
  52
+distribute copies of the software, or if you modify it.
  53
+
  54
+  For example, if you distribute copies of such a program, whether
  55
+gratis or for a fee, you must give the recipients all the rights that
  56
+you have.  You must make sure that they, too, receive or can get the
  57
+source code.  And you must show them these terms so they know their
  58
+rights.
  59
+
  60
+  We protect your rights with two steps: (1) copyright the software, and
  61
+(2) offer you this license which gives you legal permission to copy,
  62
+distribute and/or modify the software.
  63
+
  64
+  Also, for each author's protection and ours, we want to make certain
  65
+that everyone understands that there is no warranty for this free
  66
+software.  If the software is modified by someone else and passed on, we
  67
+want its recipients to know that what they have is not the original, so
  68
+that any problems introduced by others will not reflect on the original
  69
+authors' reputations.
  70
+
  71
+  Finally, any free program is threatened constantly by software
  72
+patents.  We wish to avoid the danger that redistributors of a free
  73
+program will individually obtain patent licenses, in effect making the
  74
+program proprietary.  To prevent this, we have made it clear that any
  75
+patent must be licensed for everyone's free use or not licensed at all.
  76
+
  77
+  The precise terms and conditions for copying, distribution and
  78
+modification follow.
  79
+
  80
+                    GNU GENERAL PUBLIC LICENSE
  81
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  82
+
  83
+  0. This License applies to any program or other work which contains
  84
+a notice placed by the copyright holder saying it may be distributed
  85
+under the terms of this General Public License.  The "Program", below,
  86
+refers to any such program or work, and a "work based on the Program"
  87
+means either the Program or any derivative work under copyright law:
  88
+that is to say, a work containing the Program or a portion of it,
  89
+either verbatim or with modifications and/or translated into another
  90
+language.  (Hereinafter, translation is included without limitation in
  91
+the term "modification".)  Each licensee is addressed as "you".
  92
+
  93
+Activities other than copying, distribution and modification are not
  94
+covered by this License; they are outside its scope.  The act of
  95
+running the Program is not restricted, and the output from the Program
  96
+is covered only if its contents constitute a work based on the
  97
+Program (independent of having been made by running the Program).
  98
+Whether that is true depends on what the Program does.
  99
+
  100
+  1. You may copy and distribute verbatim copies of the Program's
  101
+source code as you receive it, in any medium, provided that you
  102
+conspicuously and appropriately publish on each copy an appropriate
  103
+copyright notice and disclaimer of warranty; keep intact all the
  104
+notices that refer to this License and to the absence of any warranty;
  105
+and give any other recipients of the Program a copy of this License
  106
+along with the Program.
  107
+
  108
+You may charge a fee for the physical act of transferring a copy, and
  109
+you may at your option offer warranty protection in exchange for a fee.
  110
+
  111
+  2. You may modify your copy or copies of the Program or any portion
  112
+of it, thus forming a work based on the Program, and copy and
  113
+distribute such modifications or work under the terms of Section 1
  114
+above, provided that you also meet all of these conditions:
  115
+
  116
+    a) You must cause the modified files to carry prominent notices
  117
+    stating that you changed the files and the date of any change.
  118
+
  119
+    b) You must cause any work that you distribute or publish, that in
  120
+    whole or in part contains or is derived from the Program or any
  121
+    part thereof, to be licensed as a whole at no charge to all third
  122
+    parties under the terms of this License.
  123
+
  124
+    c) If the modified program normally reads commands interactively
  125
+    when run, you must cause it, when started running for such
  126
+    interactive use in the most ordinary way, to print or display an
  127
+    announcement including an appropriate copyright notice and a
  128
+    notice that there is no warranty (or else, saying that you provide
  129
+    a warranty) and that users may redistribute the program under
  130
+    these conditions, and telling the user how to view a copy of this
  131
+    License.  (Exception: if the Program itself is interactive but
  132
+    does not normally print such an announcement, your work based on
  133
+    the Program is not required to print an announcement.)
  134
+
  135
+These requirements apply to the modified work as a whole.  If
  136
+identifiable sections of that work are not derived from the Program,
  137
+and can be reasonably considered independent and separate works in
  138
+themselves, then this License, and its terms, do not apply to those
  139
+sections when you distribute them as separate works.  But when you
  140
+distribute the same sections as part of a whole which is a work based
  141
+on the Program, the distribution of the whole must be on the terms of
  142
+this License, whose permissions for other licensees extend to the
  143
+entire whole, and thus to each and every part regardless of who wrote it.
  144
+
  145
+Thus, it is not the intent of this section to claim rights or contest
  146
+your rights to work written entirely by you; rather, the intent is to
  147
+exercise the right to control the distribution of derivative or
  148
+collective works based on the Program.
  149
+
  150
+In addition, mere aggregation of another work not based on the Program
  151
+with the Program (or with a work based on the Program) on a volume of
  152
+a storage or distribution medium does not bring the other work under
  153
+the scope of this License.
  154
+
  155
+  3. You may copy and distribute the Program (or a work based on it,
  156
+under Section 2) in object code or executable form under the terms of
  157
+Sections 1 and 2 above provided that you also do one of the following:
  158
+
  159
+    a) Accompany it with the complete corresponding machine-readable
  160
+    source code, which must be distributed under the terms of Sections
  161
+    1 and 2 above on a medium customarily used for software interchange; or,
  162
+
  163
+    b) Accompany it with a written offer, valid for at least three
  164
+    years, to give any third party, for a charge no more than your
  165
+    cost of physically performing source distribution, a complete
  166
+    machine-readable copy of the corresponding source code, to be
  167
+    distributed under the terms of Sections 1 and 2 above on a medium
  168
+    customarily used for software interchange; or,
  169
+
  170
+    c) Accompany it with the information you received as to the offer
  171
+    to distribute corresponding source code.  (This alternative is
  172
+    allowed only for noncommercial distribution and only if you
  173
+    received the program in object code or executable form with such
  174
+    an offer, in accord with Subsection b above.)
  175
+
  176
+The source code for a work means the preferred form of the work for
  177
+making modifications to it.  For an executable work, complete source
  178
+code means all the source code for all modules it contains, plus any
  179
+associated interface definition files, plus the scripts used to
  180
+control compilation and installation of the executable.  However, as a
  181
+special exception, the source code distributed need not include
  182
+anything that is normally distributed (in either source or binary
  183
+form) with the major components (compiler, kernel, and so on) of the
  184
+operating system on which the executable runs, unless that component
  185
+itself accompanies the executable.
  186
+
  187
+If distribution of executable or object code is made by offering
  188
+access to copy from a designated place, then offering equivalent
  189
+access to copy the source code from the same place counts as
  190
+distribution of the source code, even though third parties are not
  191
+compelled to copy the source along with the object code.
  192
+
  193
+  4. You may not copy, modify, sublicense, or distribute the Program
  194
+except as expressly provided under this License.  Any attempt
  195
+otherwise to copy, modify, sublicense or distribute the Program is
  196
+void, and will automatically terminate your rights under this License.
  197
+However, parties who have received copies, or rights, from you under
  198
+this License will not have their licenses terminated so long as such
  199
+parties remain in full compliance.
  200
+
  201
+  5. You are not required to accept this License, since you have not
  202
+signed it.  However, nothing else grants you permission to modify or
  203
+distribute the Program or its derivative works.  These actions are
  204
+prohibited by law if you do not accept this License.  Therefore, by
  205
+modifying or distributing the Program (or any work based on the
  206
+Program), you indicate your acceptance of this License to do so, and
  207
+all its terms and conditions for copying, distributing or modifying
  208
+the Program or works based on it.
  209
+
  210
+  6. Each time you redistribute the Program (or any work based on the
  211
+Program), the recipient automatically receives a license from the
  212
+original licensor to copy, distribute or modify the Program subject to
  213
+these terms and conditions.  You may not impose any further
  214
+restrictions on the recipients' exercise of the rights granted herein.
  215
+You are not responsible for enforcing compliance by third parties to
  216
+this License.
  217
+
  218
+  7. If, as a consequence of a court judgment or allegation of patent
  219
+infringement or for any other reason (not limited to patent issues),
  220
+conditions are imposed on you (whether by court order, agreement or
  221
+otherwise) that contradict the conditions of this License, they do not
  222
+excuse you from the conditions of this License.  If you cannot
  223
+distribute so as to satisfy simultaneously your obligations under this
  224
+License and any other pertinent obligations, then as a consequence you
  225
+may not distribute the Program at all.  For example, if a patent
  226
+license would not permit royalty-free redistribution of the Program by
  227
+all those who receive copies directly or indirectly through you, then
  228
+the only way you could satisfy both it and this License would be to
  229
+refrain entirely from distribution of the Program.
  230
+
  231
+If any portion of this section is held invalid or unenforceable under
  232
+any particular circumstance, the balance of the section is intended to
  233
+apply and the section as a whole is intended to apply in other
  234
+circumstances.
  235
+
  236
+It is not the purpose of this section to induce you to infringe any
  237
+patents or other property right claims or to contest validity of any
  238
+such claims; this section has the sole purpose of protecting the
  239
+integrity of the free software distribution system, which is
  240
+implemented by public license practices.  Many people have made
  241
+generous contributions to the wide range of software distributed
  242
+through that system in reliance on consistent application of that
  243
+system; it is up to the author/donor to decide if he or she is willing
  244
+to distribute software through any other system and a licensee cannot
  245
+impose that choice.
  246
+
  247
+This section is intended to make thoroughly clear what is believed to
  248
+be a consequence of the rest of this License.
  249
+
  250
+  8. If the distribution and/or use of the Program is restricted in
  251
+certain countries either by patents or by copyrighted interfaces, the
  252
+original copyright holder who places the Program under this License
  253
+may add an explicit geographical distribution limitation excluding
  254
+those countries, so that distribution is permitted only in or among
  255
+countries not thus excluded.  In such case, this License incorporates
  256
+the limitation as if written in the body of this License.
  257
+
  258
+  9. The Free Software Foundation may publish revised and/or new versions
  259
+of the General Public License from time to time.  Such new versions will
  260
+be similar in spirit to the present version, but may differ in detail to
  261
+address new problems or concerns.
  262
+
  263
+Each version is given a distinguishing version number.  If the Program
  264
+specifies a version number of this License which applies to it and "any
  265
+later version", you have the option of following the terms and conditions
  266
+either of that version or of any later version published by the Free
  267
+Software Foundation.  If the Program does not specify a version number of
  268
+this License, you may choose any version ever published by the Free Software
  269
+Foundation.
  270
+
  271
+  10. If you wish to incorporate parts of the Program into other free
  272
+programs whose distribution conditions are different, write to the author
  273
+to ask for permission.  For software which is copyrighted by the Free
  274
+Software Foundation, write to the Free Software Foundation; we sometimes
  275
+make exceptions for this.  Our decision will be guided by the two goals
  276
+of preserving the free status of all derivatives of our free software and
  277
+of promoting the sharing and reuse of software generally.
  278
+
  279
+                            NO WARRANTY
  280
+
  281
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  282
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  283
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  284
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  285
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  286
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  287
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  288
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  289
+REPAIR OR CORRECTION.
  290
+
  291
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  292
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  293
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  294
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  295
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  296
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  297
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  298
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  299
+POSSIBILITY OF SUCH DAMAGES.
  300
+
  301
+                     END OF TERMS AND CONDITIONS
  302
+
  303
+            How to Apply These Terms to Your New Programs
  304
+
  305
+  If you develop a new program, and you want it to be of the greatest
  306
+possible use to the public, the best way to achieve this is to make it
  307
+free software which everyone can redistribute and change under these terms.
  308
+
  309
+  To do so, attach the following notices to the program.  It is safest
  310
+to attach them to the start of each source file to most effectively
  311
+convey the exclusion of warranty; and each file should have at least
  312
+the "copyright" line and a pointer to where the full notice is found.
  313
+
  314
+    <one line to give the program's name and a brief idea of what it does.>
  315
+    Copyright (C) <year>  <name of author>
  316
+
  317
+    This program is free software; you can redistribute it and/or modify
  318
+    it under the terms of the GNU General Public License as published by
  319
+    the Free Software Foundation; either version 2 of the License, or
  320
+    (at your option) any later version.
  321
+
  322
+    This program is distributed in the hope that it will be useful,
  323
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
  324
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  325
+    GNU General Public License for more details.
  326
+
  327
+    You should have received a copy of the GNU General Public License
  328
+    along with this program; if not, write to the Free Software
  329
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  330
+
  331
+
  332
+Also add information on how to contact you by electronic and paper mail.
  333
+
  334
+If the program is interactive, make it output a short notice like this
  335
+when it starts in an interactive mode:
  336
+
  337
+    Gnomovision version 69, Copyright (C) year name of author
  338
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  339
+    This is free software, and you are welcome to redistribute it
  340
+    under certain conditions; type `show c' for details.
  341
+
  342
+The hypothetical commands `show w' and `show c' should show the appropriate
  343
+parts of the General Public License.  Of course, the commands you use may
  344
+be called something other than `show w' and `show c'; they could even be
  345
+mouse-clicks or menu items--whatever suits your program.
  346
+
  347
+You should also get your employer (if you work as a programmer) or your
  348
+school, if any, to sign a "copyright disclaimer" for the program, if
  349
+necessary.  Here is a sample; alter the names:
  350
+
  351
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  352
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  353
+
  354
+  <signature of Ty Coon>, 1 April 1989
  355
+  Ty Coon, President of Vice
  356
+
  357
+This General Public License does not permit incorporating your program into
  358
+proprietary programs.  If your program is a subroutine library, you may
  359
+consider it more useful to permit linking proprietary applications with the
  360
+library.  If this is what you want to do, use the GNU Library General
  361
+Public License instead of this License.
181  firmware/bootloader/Makefile
... ...
@@ -0,0 +1,181 @@
  1
+# Name: Makefile
  2
+# Project: USBaspLoader
  3
+# Author: Christian Starkjohann
  4
+# Creation Date: 2007-12-10
  5
+# Tabsize: 4
  6
+# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
  7
+# License: GNU GPL v2 (see License.txt)
  8
+# This Revision: $Id: Makefile 798 2010-07-27 17:29:28Z cs $
  9
+
  10
+###############################################################################
  11
+# Configure the following variables according to your AVR.
  12
+# Program the device with
  13
+#     make fuse    # to set the clock generator, boot section size etc.
  14
+#     make flash   # to load the boot loader into flash
  15
+#     make lock    # to protect the boot loader from overwriting
  16
+
  17
+F_CPU = 12000000
  18
+DEVICE = atmega8
  19
+# BOOTLOADER_ADDRESS is 1800 for 8k devices, 3800 for 16k and 7800 for 32k.
  20
+BOOTLOADER_ADDRESS = 1800
  21
+FUSEOPT = $(FUSEOPT_8)
  22
+LOCKOPT = -U lock:w:0x2f:m
  23
+
  24
+PROGRAMMER = -c dragon_isp -P usb
  25
+# PROGRAMMER contains AVRDUDE options to address your programmer
  26
+
  27
+FUSEOPT_8 = -U hfuse:w:0xc0:m -U lfuse:w:0x9f:m
  28
+FUSEOPT_88 = -U hfuse:w:0xd6:m -U lfuse:w:0xdf:m -U efuse:w:0x00:m
  29
+FUSEOPT_168 = -U hfuse:w:0xd6:m -U lfuse:w:0xdf:m -U efuse:w:0x00:m
  30
+FUSEOPT_328 = -U lfuse:w:0xf7:m -U hfuse:w:0xda:m -U efuse:w:0x03:m
  31
+# You may have to change the order of these -U commands.
  32
+
  33
+#---------------------------------------------------------------------
  34
+# ATMega8
  35
+#---------------------------------------------------------------------
  36
+# Fuse high byte:
  37
+# 0xc0 = 1 1 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
  38
+#        ^ ^ ^ ^   ^ ^ ^------ BOOTSZ0
  39
+#        | | | |   | +-------- BOOTSZ1
  40
+#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
  41
+#        | | | +-------------- CKOPT (full output swing)
  42
+#        | | +---------------- SPIEN (allow serial programming)
  43
+#        | +------------------ WDTON (WDT not always on)
  44
+#        +-------------------- RSTDISBL (reset pin is enabled)
  45
+# Fuse low byte:
  46
+# 0x9f = 1 0 0 1   1 1 1 1
  47
+#        ^ ^ \ /   \--+--/
  48
+#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
  49
+#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
  50
+#        | +------------------ BODEN (BrownOut Detector enabled)
  51
+#        +-------------------- BODLEVEL (2.7V)
  52
+#---------------------------------------------------------------------
  53
+# ATMega88, ATMega168
  54
+#---------------------------------------------------------------------
  55
+# Fuse extended byte:
  56
+# 0x00 = 0 0 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
  57
+#                    \+/
  58
+#                     +------- BOOTSZ (00 = 2k bytes)
  59
+# Fuse high byte:
  60
+# 0xd6 = 1 1 0 1   0 1 1 0
  61
+#        ^ ^ ^ ^   ^ \-+-/
  62
+#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)
  63
+#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
  64
+#        | | | +-------------- WDTON (if 0: watchdog always on)
  65
+#        | | +---------------- SPIEN (allow serial programming)
  66
+#        | +------------------ DWEN (debug wire enable)
  67
+#        +-------------------- RSTDISBL (reset pin is enabled)
  68
+# Fuse low byte:
  69
+# 0xdf = 1 1 0 1   1 1 1 1
  70
+#        ^ ^ \ /   \--+--/
  71
+#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
  72
+#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
  73
+#        | +------------------ CKOUT (if 0: Clock output enabled)
  74
+#        +-------------------- CKDIV8 (if 0: divide by 8)
  75
+#---------------------------------------------------------------------
  76
+# ATMega328P
  77
+#---------------------------------------------------------------------
  78
+# Fuse extended byte:
  79
+# 0x03 = - - - -   - 0 1 1
  80
+#                    \-+-/
  81
+#                      +------ BODLEVEL 0..2 (011 = 4.3V)
  82
+# Fuse high byte:
  83
+# 0xda = 1 1 0 1   1 0 1 0 <-- BOOTRST (0 = jump to bootloader at start)
  84
+#        ^ ^ ^ ^   ^ \+/
  85
+#        | | | |   |  +------- BOOTSZ 0..1 (01 = 2KB starting at 0x7800)
  86
+#        | | | |   + --------- EESAVE (don't preserve EEPROM over chip erase)
  87
+#        | | | +-------------- WDTON (1 = watchdog disabled at start)
  88
+#        | | +---------------- SPIEN (0 = allow serial programming)
  89
+#        | +------------------ DWEN (1 = debug wire disable)
  90
+#        +-------------------- RSTDISBL (1 = reset pin is enabled)
  91
+# Fuse low byte:
  92
+# 0xf7 = 1 1 1 1   0 1 1 1
  93
+#        ^ ^ \ /   \--+--/
  94
+#        | |  |       +------- CKSEL 3..0 (0111 = external full-swing crystal)
  95
+#        | |  +--------------- SUT 1..0 (11 = startup time 16K CK/14K + 65ms)
  96
+#        | +------------------ CKOUT (1 = clock output disabled)
  97
+#        +-------------------- CKDIV8 (1 = do not divide clock by 8)
  98
+
  99
+
  100
+###############################################################################
  101
+
  102
+# Tools:
  103
+AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE)
  104
+CC = avr-gcc
  105
+
  106
+# Options:
  107
+DEFINES = #-DDEBUG_LEVEL=2
  108
+# Remove the -fno-* options when you use gcc 3, it does not understand them
  109
+CFLAGS = -Wall -Os -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-functions -I. -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) $(DEFINES)
  110
+LDFLAGS = -Wl,--relax,--gc-sections -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS)
  111
+
  112
+OBJECTS =  usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
  113
+
  114
+# symbolic targets:
  115
+all: main.hex
  116
+
  117
+.c.o:
  118
+	$(CC) $(CFLAGS) -c $< -o $@
  119
+
  120
+.S.o:
  121
+	$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@
  122
+# "-x assembler-with-cpp" should not be necessary since this is the default
  123
+# file type for the .S (with capital S) extension. However, upper case
  124
+# characters are not always preserved on Windows. To ensure WinAVR
  125
+# compatibility define the file type manually.
  126
+
  127
+.c.s:
  128
+	$(CC) $(CFLAGS) -S $< -o $@
  129
+
  130
+flash:	all
  131
+	$(AVRDUDE) -U flash:w:main.hex:i
  132
+
  133
+readflash:
  134
+	$(AVRDUDE) -U flash:r:read.hex:i
  135
+
  136
+fuse:
  137
+	$(AVRDUDE) $(FUSEOPT)
  138
+
  139
+lock:
  140
+	$(AVRDUDE) $(LOCKOPT)
  141
+
  142
+read_fuses:
  143
+	$(UISP) --rd_fuses
  144
+
  145
+clean:
  146
+	rm -f main.hex main.bin *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
  147
+
  148
+# file targets:
  149
+main.bin:	$(OBJECTS)
  150
+	$(CC) $(CFLAGS) -o main.bin $(OBJECTS) $(LDFLAGS)
  151
+
  152
+main.hex:	main.bin
  153
+	rm -f main.hex main.eep.hex
  154
+	avr-objcopy -j .text -j .data -O ihex main.bin main.hex
  155
+	avr-size main.hex
  156
+
  157
+disasm:	main.bin
  158
+	avr-objdump -d main.bin
  159
+
  160
+cpp:
  161
+	$(CC) $(CFLAGS) -E main.c
  162
+
  163
+# Special rules for generating hex files for various devices and clock speeds
  164
+ALLHEXFILES = hexfiles/mega8_12mhz.hex hexfiles/mega8_15mhz.hex hexfiles/mega8_16mhz.hex \
  165
+	hexfiles/mega88_12mhz.hex hexfiles/mega88_15mhz.hex hexfiles/mega88_16mhz.hex hexfiles/mega88_20mhz.hex\
  166
+	hexfiles/mega168_12mhz.hex hexfiles/mega168_15mhz.hex hexfiles/mega168_16mhz.hex hexfiles/mega168_20mhz.hex\
  167
+	hexfiles/mega328p_12mhz.hex hexfiles/mega328p_15mhz.hex hexfiles/mega328p_16mhz.hex hexfiles/mega328p_20mhz.hex
  168
+
  169
+allhexfiles: $(ALLHEXFILES)
  170
+	$(MAKE) clean
  171
+	avr-size hexfiles/*.hex
  172
+
  173
+$(ALLHEXFILES):
  174
+	@[ -d hexfiles ] || mkdir hexfiles
  175
+	@device=`echo $@ | sed -e 's|.*/mega||g' -e 's|_.*||g'`; \
  176
+	clock=`echo $@ | sed -e 's|.*_||g' -e 's|mhz.*||g'`; \
  177
+	addr=`echo $$device | sed -e 's/\([0-9]\)8/\1/g' | awk '{printf("%x", ($$1 - 2) * 1024)}'`; \
  178
+	echo "### Make with F_CPU=$${clock}000000 DEVICE=atmega$$device BOOTLOADER_ADDRESS=$$addr"; \
  179
+	$(MAKE) clean; \
  180
+	$(MAKE) main.hex F_CPU=$${clock}000000 DEVICE=atmega$$device BOOTLOADER_ADDRESS=$$addr DEFINES=-DUSE_AUTOCONFIG=1
  181
+	mv main.hex $@
113  firmware/bootloader/Readme.txt
... ...
@@ -0,0 +1,113 @@
  1
+This is the README file for USBaspLoader.
  2
+
  3
+USBaspLoader is a USB boot loader for AVR microcontrollers. It can be used on
  4
+all AVRs with at least 2 kB of boot loader section, e.g. the popular ATMega8.
  5
+The firmware is flashed into the upper 2 kB of the flash memory and takes
  6
+control immediately after reset. If a certain hardware condition is met
  7
+(this condition can be configured, e.g. a jumper), the boot loader waits for
  8
+data on the USB interface and loads it into the remaining part of the flash
  9
+memory. If the condition is not met, control is passed to the loaded firmware.
  10
+
  11
+This boot loader is similar to Thomas Fischl's avrusbboot and our own
  12
+bootloadHID, but it requires no separate command line tool to upload the data.
  13
+USBaspLoader emulates Thomas Fischl's USBasp programmer instead. You can thus
  14
+use AVRDUDE to upload flash memory data (and if the option is enabled) EEPROM
  15
+data.
  16
+
  17
+Since USBaspLoader cooperates with AVRDUDE, it can be used in conjunction with
  18
+the Arduino software to upload flash memory data.
  19
+
  20
+
  21
+FILES IN THE DISTRIBUTION
  22
+=========================
  23
+Readme.txt ........ The file you are currently reading.
  24
+firmware .......... Source code of the controller firmware.
  25
+firmware/usbdrv ... USB driver -- See Readme.txt in that directory for info
  26
+License.txt ....... Public license (GPL2) for all contents of this project.
  27
+Changelog.txt ..... Logfile documenting changes in soft-, firm- and hardware.
  28
+
  29
+
  30
+BUILDING AND INSTALLING
  31
+=======================
  32
+This project can be built on Unix (Linux, FreeBSD or Mac OS X) or Windows.
  33
+
  34
+For all platforms, you must first describe your hardware in the file
  35
+"firmware/bootloaderconfig.h". See the documentation in the example provided
  36
+with this distribution for details. Then edit "firmware/Makefile" to reflect
  37
+the target device, the device's boot loader address and fuse bit values.
  38
+
  39
+Building on Windows:
  40
+You need WinAVR for the firmware, see http://winavr.sourceforge.net/.
  41
+To build the firmware with WinAVR, change into the "firmware" directory,
  42
+check whether you need to edit the "Makefile" (e.g. change device settings,
  43
+programmer hardware, clock rate etc.) or bootloaderconfig.h and type "make"
  44
+to compile the source code. Before you upload the code to the device with
  45
+"make flash", you should set the fuses with "make fuse". To protect the boot
  46
+loader from overwriting itself, set the lock bits with "make lock" after
  47
+uploading the firmware.
  48
+
  49
+Building on Unix (Linux, FreeBSD and Mac):
  50
+You need the GNU toolchain and avr-libc for the firmware. See
  51
+    http://www.nongnu.org/avr-libc/user-manual/install_tools.html
  52
+for a good description on how to install the GNU compiler toolchain and
  53
+avr-libc on Unix. For Mac OS X, we provide a read-made package, see
  54
+    http://www.obdev.at/avrmacpack/
  55
+
  56
+To build the firmware, change to the "firmware" directory, edit "Makefile"
  57
+and bootloaderconfig.h as described in the Windows paragraph above and type
  58
+"make" to compile the source code. Before you upload the code to the device
  59
+with "make flash", you should set the fuses with "make fuse". Then protect the
  60
+boot loader firmware with "make lock".
  61
+
  62
+
  63
+WORKING WITH THE BOOT LOADER
  64
+============================
  65
+The boot loader is quite easy to use. Set the jumper (or whatever condition
  66
+you have configured) for boot loading on the target hardware, connect it to
  67
+the host computer and (if not bus powered) issue a Reset on the AVR.
  68
+
  69
+You can now flash the device with AVRDUDE through a "virtual" USBasp
  70
+programmer.
  71
+
  72
+
  73
+USING THE USB DRIVER FOR YOUR OWN PROJECTS
  74
+==========================================
  75
+This project is not intended as a reference implementation. If you want to
  76
+use AVR-USB in your own projects, please see
  77
+   * PowerSwitch for the most basic example,
  78
+   * Automator for an HID example or
  79
+   * AVR-Doper for a very complex example on how to simulate a serial
  80
+     interface (virtual COM port).
  81
+All these projects can be downloaded from http://www.obdev.at/avrusb/
  82
+
  83
+
  84
+ABOUT THE LICENSE
  85
+=================
  86
+It is our intention to make our USB driver and this demo application
  87
+available to everyone. Moreover, we want to make a broad range of USB
  88
+projects and ideas for USB devices available to the general public. We
  89
+therefore want that all projects built with our USB driver are published
  90
+under an Open Source license. Our license for the USB driver and demo code is
  91
+the GNU General Public License Version 2 (GPL2). See the file "License.txt"
  92
+for details.
  93
+
  94
+If you don't want to publish your source code under the GPL2, you can simply
  95
+pay money for AVR-USB. As an additional benefit you get USB PIDs for free,
  96
+licensed exclusively to you. See the file "CommercialLicense.txt" in the usbdrv
  97
+directory for details.
  98
+
  99
+
  100
+MORE INFORMATION
  101
+================
  102
+For more information about Objective Development's firmware-only USB driver
  103
+for Atmel's AVR microcontrollers please visit the URL
  104
+
  105
+    http://www.obdev.at/products/avrusb/
  106
+
  107
+A technical documentation of the driver's interface can be found in the
  108
+file "firmware/usbdrv/usbdrv.h".
  109
+
  110
+
  111
+--
  112
+(c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
  113
+http://www.obdev.at/
160  firmware/bootloader/bootloaderconfig.h
... ...
@@ -0,0 +1,160 @@
  1
+/* Name: bootloaderconfig.h
  2
+ * Project: USBaspLoader
  3
+ * Author: Christian Starkjohann
  4
+ * Creation Date: 2007-12-08
  5
+ * Tabsize: 4
  6
+ * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
  7
+ * License: GNU GPL v2 (see License.txt)
  8
+ * This Revision: $Id: bootloaderconfig.h 729 2009-03-20 09:03:58Z cs $
  9
+ */
  10
+
  11
+#ifndef __bootloaderconfig_h_included__
  12
+#define __bootloaderconfig_h_included__
  13
+
  14
+/*
  15
+General Description:
  16
+This file (together with some settings in Makefile) configures the boot loader
  17
+according to the hardware.
  18
+
  19
+This file contains (besides the hardware configuration normally found in
  20
+usbconfig.h) two functions or macros: bootLoaderInit() and
  21
+bootLoaderCondition(). Whether you implement them as macros or as static
  22
+inline functions is up to you, decide based on code size and convenience.
  23
+
  24
+bootLoaderInit() is called as one of the first actions after reset. It should
  25
+be a minimum initialization of the hardware so that the boot loader condition
  26
+can be read. This will usually consist of activating a pull-up resistor for an
  27
+external jumper which selects boot loader mode.
  28
+
  29
+bootLoaderCondition() is called immediately after initialization and in each
  30
+main loop iteration. If it returns TRUE, the boot loader will be active. If it
  31
+returns FALSE, the boot loader jumps to address 0 (the loaded application)
  32
+immediately.
  33
+
  34
+For compatibility with Thomas Fischl's avrusbboot, we also support the macro
  35
+names BOOTLOADER_INIT and BOOTLOADER_CONDITION for this functionality. If
  36
+these macros are defined, the boot loader usees them.
  37
+*/
  38
+
  39
+/* ---------------------------- Hardware Config ---------------------------- */
  40
+
  41
+#define USB_CFG_IOPORTNAME      C
  42
+/* This is the port where the USB bus is connected. When you configure it to
  43
+ * "B", the registers PORTB, PINB and DDRB will be used.
  44
+ */
  45
+#define USB_CFG_DMINUS_BIT      1
  46
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
  47
+ * This may be any bit in the port.
  48
+ */
  49
+#define USB_CFG_DPLUS_BIT       0
  50
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
  51
+ * This may be any bit in the port. Please note that D+ must also be connected
  52
+ * to interrupt pin INT0!
  53
+ */
  54
+#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
  55
+/* Clock rate of the AVR in MHz. Legal values are 12000, 16000 or 16500.
  56
+ * The 16.5 MHz version of the code requires no crystal, it tolerates +/- 1%
  57
+ * deviation from the nominal frequency. All other rates require a precision
  58
+ * of 2000 ppm and thus a crystal!
  59
+ * Default if not specified: 12 MHz
  60
+ */
  61
+
  62
+/* ----------------------- Optional Hardware Config ------------------------ */
  63
+
  64
+/* #define USB_CFG_PULLUP_IOPORTNAME   D */
  65
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
  66
+ * V+, you can connect and disconnect the device from firmware by calling
  67
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
  68
+ * This constant defines the port on which the pullup resistor is connected.
  69
+ */
  70
+/* #define USB_CFG_PULLUP_BIT          4 */
  71
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
  72
+ * above) where the 1.5k pullup resistor is connected. See description
  73
+ * above for details.
  74
+ */
  75
+
  76
+/* ------------------------------------------------------------------------- */
  77
+/* ---------------------- feature / code size options ---------------------- */
  78
+/* ------------------------------------------------------------------------- */
  79
+
  80
+#define HAVE_EEPROM_PAGED_ACCESS    1
  81
+/* If HAVE_EEPROM_PAGED_ACCESS is defined to 1, page mode access to EEPROM is
  82
+ * compiled in. Whether page mode or byte mode access is used by AVRDUDE
  83
+ * depends on the target device. Page mode is only used if the device supports
  84
+ * it, e.g. for the ATMega88, 168 etc. You can save quite a bit of memory by
  85
+ * disabling page mode EEPROM access. Costs ~ 138 bytes.
  86
+ */
  87
+#define HAVE_EEPROM_BYTE_ACCESS     1
  88
+/* If HAVE_EEPROM_BYTE_ACCESS is defined to 1, byte mode access to EEPROM is
  89
+ * compiled in. Byte mode is only used if the device (as identified by its
  90
+ * signature) does not support page mode for EEPROM. It is required for
  91
+ * accessing the EEPROM on the ATMega8. Costs ~54 bytes.
  92
+ */
  93
+#define BOOTLOADER_CAN_EXIT         1
  94
+/* If this macro is defined to 1, the boot loader will exit shortly after the
  95
+ * programmer closes the connection to the device. Costs ~36 bytes.
  96
+ */
  97
+#define HAVE_CHIP_ERASE             1
  98
+/* If this macro is defined to 1, the boot loader implements the Chip Erase
  99
+ * ISP command. Otherwise pages are erased on demand before they are written.
  100
+ */
  101
+//#define SIGNATURE_BYTES             0x1e, 0x93, 0x07, 0     /* ATMega8 */
  102
+/* This macro defines the signature bytes returned by the emulated USBasp to
  103
+ * the programmer software. They should match the actual device at least in
  104
+ * memory size and features. If you don't define this, values for ATMega8,
  105
+ * ATMega88, ATMega168 and ATMega328 are guessed correctly.
  106
+ */
  107
+
  108
+/* The following block guesses feature options so that the resulting code
  109
+ * should fit into 2k bytes boot block with the given device and clock rate.
  110
+ * Activate by passing "-DUSE_AUTOCONFIG=1" to the compiler.
  111
+ * This requires gcc 3.4.6 for small enough code size!
  112
+ */
  113
+#if USE_AUTOCONFIG
  114
+#   undef HAVE_EEPROM_PAGED_ACCESS
  115
+#   define HAVE_EEPROM_PAGED_ACCESS     (USB_CFG_CLOCK_KHZ >= 16000)
  116
+#   undef HAVE_EEPROM_BYTE_ACCESS
  117
+#   define HAVE_EEPROM_BYTE_ACCESS      1
  118
+#   undef BOOTLOADER_CAN_EXIT
  119
+#   define BOOTLOADER_CAN_EXIT          1
  120
+#   undef SIGNATURE_BYTES
  121
+#endif /* USE_AUTOCONFIG */
  122
+
  123
+/* ------------------------------------------------------------------------- */
  124
+
  125
+/* Example configuration: Port D bit 3 is connected to a jumper which ties
  126
+ * this pin to GND if the boot loader is requested. Initialization allows
  127
+ * several clock cycles for the input voltage to stabilize before
  128
+ * bootLoaderCondition() samples the value.
  129
+ * We use a function for bootLoaderInit() for convenience and a macro for
  130
+ * bootLoaderCondition() for efficiency.
  131
+ */
  132
+
  133
+#ifndef __ASSEMBLER__   /* assembler cannot parse function definitions */
  134
+
  135
+#define JUMPER_BIT  1   /* jumper is connected to this bit in port D, active low */
  136
+
  137
+#ifndef MCUCSR          /* compatibility between ATMega8 and ATMega88 */
  138
+#   define MCUCSR   MCUSR
  139
+#endif
  140
+
  141
+static inline void  bootLoaderInit(void)
  142
+{
  143
+    PORTD |= (1 << JUMPER_BIT);     /* activate pull-up */
  144
+    if(!(MCUCSR & (1 << EXTRF)))    /* If this was not an external reset, ignore */
  145
+        leaveBootloader();
  146
+    MCUCSR = 0;                     /* clear all reset flags for next time */
  147
+}
  148
+
  149
+static inline void  bootLoaderExit(void)
  150
+{
  151
+    PORTD = 0;                      /* undo bootLoaderInit() changes */
  152
+}
  153
+
  154
+#define bootLoaderCondition()   ((PIND & (1 << JUMPER_BIT)) == 0)
  155
+
  156
+#endif /* __ASSEMBLER__ */
  157
+
  158
+/* ------------------------------------------------------------------------- */
  159
+
  160
+#endif /* __bootloader_h_included__ */
123  firmware/bootloader/hexfiles/mega168_12mhz.hex
... ...
@@ -0,0 +1,123 @@
  1
+:103800005CC000008FC0000073C0000071C00000E9
  2
+:103810006FC000006DC000006BC0000069C00000F8
  3
+:1038200067C0000065C0000063C0000061C0000008
  4
+:103830005FC000005DC000005BC0000059C0000018
  5
+:1038400057C0000055C0000053C0000051C0000028
  6
+:103850004FC000004DC000004BC0000049C0000038
  7
+:1038600047C0000045C00000040309041C037700A2
  8
+:10387000770077002E00660069007300630068001F
  9
+:103880006C002E00640065000E03550053004200DA
  10
+:1038900061007300700012011001FF000008C016E3
  11
+:1038A000DC05020101020001090212000101008091
  12
+:1038B0003209040000000000000011241FBECFEFF9
  13
+:1038C000D4E0DEBFCDBF11E0A0E0B1E0E8E7FFE368
  14
+:1038D00002C005900D92A630B107D9F711E0A6E01D
  15
+:1038E000B1E001C01D92AC33B107E1F755D142C33D
  16
+:1038F00087CFA82FB92F80E090E041E050EA609593
  17
+:1039000030E009C02D9182279795879510F0842784
  18
+:103910009527305EC8F36F5FA8F30895EADF8D93B3
  19
+:103920009D930895CF93CFB7CF93C3954C9BE9F761
  20
+:103930004C9B09C04C9B07C04C9B05C04C9B03C0D3
  21
+:103940004C9B01C0A1C0DF93C0911F01DD27CA5D60
  22
+:10395000DE4F4C9B02C0DF91EBCF2F930F931F9351
  23
+:1039600009B12FEF04FB20F94F933F9319B14FEFAB
  24
+:10397000012704FB21F93BE031C04E7F012F19B133
  25
+:10398000216028C0102F4D7F2260000009B129C09E
  26
+:103990004B7F2460012F000019B12BC019B1477F64
  27
+:1039A00028602AC04F7E09B120612CC04F7D19B11B
  28
+:1039B00020622FC04F7B09B1206432C0422709B179
  29
+:1039C00049934FEF0000102714FB20F919B114712F
  30
+:1039D000C9F1297F91F2012704FB21F909B1237F65
  31
+:1039E00089F2315058F1102714FB22F919B1277EC2
  32
+:1039F00079F2012704FB23F92F7C81F209B110270A
  33
+:103A000014FB24F92F7971F200C019B1012704FBCE
  34
+:103A100025F92F7359F200C009B1102714FB26F9BC
  35
+:103A2000223040F200C019B1012704FB27F92430ED
  36
+:103A300028F64F77206819B10000F9CF11E01CBBC0
  37
+:103A4000002717C03B503195C31BD04011E01CBB71
  38
+:103A50000881033CE9F00B34D9F020911D01198154
  39
+:103A6000110F1213EDCF093641F10D3211F0013E65
  40
+:103A700039F7009324013F914F911F910F912F919E
  41
+:103A8000DF91CCB3C0FD51CFCF91CFBFCF9118956F
  42
+:103A900020912401222379F310912201112311F5A1
  43
+:103AA000343012F13093220120931E0110911F0136
  44
+:103AB0003BE0311B30931F0117C000912201013000
  45
+:103AC0008CF40AE53091000134FD10C00093000130
  46
+:103AD000C2E1D1E00FC02795A8F45150A9F4220FFC
  47
+:103AE0000000F9CF4AE503C042ED01C0432FC4E115
  48
+:103AF000D0E032E01AB114615C9A1AB90BB120E43B
  49
+:103B000014E15F93012756E00BB9279520F451503B
  50
+:103B100021F4220FF9CF012756E000003B5A0BB9E0
  51
+:103B2000D0F2279528F4515029F4220F0000F9CF44
  52
+:103B3000012756E027950BB920F4515021F4220FAC
  53
+:103B4000F9CF012756E0299133230BB921F60B7EDB
  54
+:103B500010912301110FC651D0400BB911F01093F1
  55
+:103B60001D0111E01CBB00611AB11B7E402F4B7E72
  56
+:103B70005F9100C000C00BB91AB94BB97CCF1BB81C
  57
+:103B8000F8941DBA1092690081E085BF15BEE091DE
  58
+:103B90001001F0911101099588E10FB6F894809316
  59
+:103BA0006000109260000FBE5F9A04B601FECBC1A8
  60
+:103BB00014BE81E085BF82E085BF4F99C4C180916A
  61
+:103BC0006900826080936900E89A549A20E005C0F9
  62
+:103BD000A89588EB9BE00197F1F72150C9F754981D
  63
+:103BE0007894FF2400E090912201935097FD2EC11C
  64
+:103BF00080911F01CCE0D0E0C81BD109CA5DDE4F27
  65
+:103C000080911E018D3209F0C4C0983009F01CC1AA
  66
+:103C100083EC809312018AE58093000110920A01DF
  67
+:103C20003881832F80762981882309F443C086E078
  68
+:103C300091E090932101809320012330C9F49B816E
  69
+:103C40008C812A81203339F48370E82FF0E0EE5F15
  70
+:103C5000FE4F808109C0203A11F476D105C0203C86
  71
+:103C600011F46D8179D180E08093090194E087C0DF
  72
+:103C7000253011F491E083C0822F8450863098F46F
  73
+:103C80008A819B8190930D0180930C01293081F0F2
  74
+:103C90009E8190930E018D81827080930F0137FD7C
  75
+:103CA00069C02FEF68C0223019F481E080930B01C6
  76
+:103CB00090E065C08A8110921B01222331F410929A
  77
+:103CC0001C012BE131E092E050C0253019F48093C3
  78
+:103CD000230148C02630B1F58B81813019F486E983
  79
+:103CE00098E304C0823041F488EA98E3909321017C
  80
+:103CF0008093200192E122C08330F9F48A818823E5
  81
+:103D000041F488E698E3909321018093200194E0A8
  82
+:103D100015C0813041F48CE698E3909321018093A3
  83
+:103D200020019CE10BC0823041F488E898E3909335
  84
+:103D30002101809320019EE001C090E080E4809307
  85
+:103D40000A011DC0283019F425E231E009C02930EC
  86
+:103D500019F48093250106C02A3021F42BE131E0CB
  87
+:103D600091E003C02BE131E090E0309321012093FA
  88
+:103D7000200105C0292F80E880930A0107C08F81A8
  89
+:103D8000882319F42E81291708F0292F2093010187
  90
+:103D90005BC080910A0187FF57C080910E01592FA7
  91
+:103DA000891708F4582F851B80930E0160E0882343
  92
+:103DB00009F461E070910F01E0910C01F0910D01A7
  93
+:103DC00040E037C0CF018F779070892B49F4F89489
  94
+:103DD00083E080935700E895789407B600FCFDCF08
  95
+:103DE0004E5FF8948991999121E00C01209357003E
  96
+:103DF000E895112478949F012E5F3F4FC9018F777A
  97
+:103E00009070892B31F0662399F0451788F077235D
  98
+:103E100079F0F89485E080935700E895789407B698
  99
+:103E200000FCFDCFF89481E180935700E8957894E9
  100
+:103E3000F901451708F4C6CFF0930D01E0930C018A
  101
+:103E4000662311F01092010110922201809100016D
  102
+:103E500084FF65C0809101018F3F09F460C0182F75
  103
+:103E6000893008F018E0811B8093010180911201D4
  104
+:103E700098E8892780931201112309F43EC08091AC
  105
+:103E80000A0187FF1EC080910E01811708F4182FC8
  106
+:103E9000811B80930E01E0910C01F0910D01A3E1D3
  107
+:103EA000B1E003C084918D933196812F90E08D5EB7
  108
+:103EB0009E4FA817B907B1F7F0930D01E0930C01DD
  109
+:103EC0001AC0E0912001F091210186FF09C0912FD5
  110
+:103ED000A3E1B1E084918D9331969150D9F707C059
  111
+:103EE000912FA3E1B1E081918D939150E1F7F0938F
  112
+:103EF0002101E0932001193060F483E191E0612F0A
  113
+:103F00000DDD612F6C5F6C3041F08FEF809301010C
  114
+:103F100004C08FEF809301016EE16093000194E192
  115
+:103F200089B1847131F49150D9F710922301109224
  116
+:103F30001D0180910B01882321F0FA9411F40150A6
  117
+:103F400011F04F9B50CE1BDEF999FECF92BD81BD83
  118
+:103F5000F89A992780B50895262FF999FECF1FBAB0
  119
+:103F600092BD81BD20BD0FB6F894FA9AF99A0FBEA2
  120
+:083F700001960895F894FFCFBB
  121
+:063F78005AFF1E94060032
  122
+:0400000300003800C1
  123
+:00000001FF
126  firmware/bootloader/hexfiles/mega168_15mhz.hex
... ...
@@ -0,0 +1,126 @@
  1
+:103800005CC000008FC0000073C0000071C00000E9
  2
+:103810006FC000006DC000006BC0000069C00000F8
  3
+:1038200067C0000065C0000063C0000061C0000008
  4
+:103830005FC000005DC000005BC0000059C0000018
  5
+:1038400057C0000055C0000053C0000051C0000028
  6
+:103850004FC000004DC000004BC0000049C0000038
  7
+:1038600047C0000045C00000040309041C037700A2
  8
+:10387000770077002E00660069007300630068001F
  9
+:103880006C002E00640065000E03550053004200DA
  10
+:1038900061007300700012011001FF000008C016E3
  11
+:1038A000DC05020101020001090212000101008091
  12
+:1038B0003209040000000000000011241FBECFEFF9
  13
+:1038C000D4E0DEBFCDBF11E0A0E0B1E0E0EBFFE36C
  14
+:1038D00002C005900D92A630B107D9F711E0A6E01D
  15
+:1038E000B1E001C01D92AC33B107E1F771D15EC305
  16
+:1038F00087CFA82FB92F80E090E041E050EA609593
  17
+:1039000030E009C02D9182279795879510F0842784
  18
+:103910009527305EC8F36F5FA8F30895EADF8D93B3
  19
+:103920009D930895CF93CFB7CF93C3954C9BE9F761
  20
+:103930004C9B0BC04C9B09C04C9B07C04C9B05C0CB
  21
+:103940004C9B03C04C9B01C0C0C0C0911F01DF93C2
  22
+:10395000DD27CA5DDE4F2F932FEF4C9B03C02F91C5
  23
+:10396000DF91E6CF0F931F934F936F9309B104FB41
  24
+:1039700020F93F933BE05F931EC04E7F012F19B1AA
  25
+:103980001471E1F0216000001DC0102F4D7F2260F6
  26
+:10399000000009B1047191F01DC04B7F2460012F1C
  27
+:1039A000000019B1147151F01EC019B1147131F039
  28
+:1039B000477F28601BC019B1147109F462C04FEF32
  29
+:1039C000297FD9F2012704FB21F909B10471B1F370
  30
+:1039D000237FD9F2102714FB22F900C019B114710A
  31
+:1039E00069F3277ED1F2012704FB23F92F7CE9F24A
  32
+:1039F00009B1047119F3102714FB24F92F7929F167
  33
+:103A000000C019B11471E9F1012704FB25F92F73E6
  34
+:103A100011F100C009B10471A1F1102714FB26F9BE
  35
+:103A20002230F8F000C019B1147159F1012704FBDC
  36
+:103A300027F92430E0F04227000009B1499310270C
  37
+:103A400014FB20F93150C8F0B6CF4F7E09B1047194
  38
+:103A5000C1F02061D3CF206219B1147191F04F7D74
  39
+:103A6000D6CF4F7B09B1047161F02064D9CF4F7775
  40
+:103A700019B1147131F02068DCCF11E01CBB0027B4
  41
+:103A800017C03B503195C31BD04011E01CBB0881CF
  42
+:103A9000033CF9F00B34E9F020911D011981110F5D
  43
+:103AA0001213EDCF093651F10D3211F0013E39F705
  44
+:103AB000009324015F913F916F914F911F910F915E
  45
+:103AC0002F91DF91CCB3C0FD30CFCF91CFBFCF913D
  46
+:103AD000189520912401222369F3109122011123CA
  47
+:103AE00031F5343032F13093220120931E011091D0
  48
+:103AF0001F013BE0311B30931F011BC000912201CD
  49
+:103B00000130ACF40AE53091000134FD13C000939C
  50
+:103B10000001C2E1D1E012C005271127000019C041
  51
+:103B2000052711271FC005271127000024C04AE5DB
  52
+:103B300002C032ED432FC4E1D0E032E01AB114618B
  53
+:103B40005C9A0BB11AB954E120E866E020FF052722
  54
+:103B500027950BB917951C3FF8F66A95B9F720FF22
  55
+:103B60000527279500000BB917951C3FC8F620FFC5
  56
+:103B700005272795179566E01C3F0BB9A0F62991FC
  57
+:103B80003A9521F70B7E10912301110F0BB9C65105
  58
+:103B9000D04011F010931D0111E01CBB00611AB15F
  59
+:103BA0001B7E402F4B7E53E05A95F1F700C00BB9B6
  60
+:103BB0001AB94BB97FCF1BB8F8941DBA109269009F
  61
+:103BC00081E085BF15BEE0911001F09111010995CA
  62
+:103BD00088E10FB6F89480936000109260000FBEE9
  63
+:103BE0005F9A04B601FECBC114BE81E085BF82E0BE
  64
+:103BF00085BF4F99C4C1809169008260809369003C
  65
+:103C0000E89A549A20E005C0A89586EA9EE00197BC
  66
+:103C1000F1F72150C9F754987894FF2400E090916F
  67
+:103C20002201935097FD2EC180911F01CCE0D0E07E
  68
+:103C3000C81BD109CA5DDE4F80911E018D3209F08B
  69
+:103C4000C4C0983009F01CC183EC809312018AE54E
  70
+:103C50008093000110920A013881832F8076298198
  71
+:103C6000882309F443C086E091E09093210180937A
  72
+:103C700020012330C9F49B818C812A81203339F4BF
  73
+:103C80008370E82FF0E0EE5FFE4F808109C0203A9C
  74
+:103C900011F476D105C0203C11F46D8179D180E01A
  75
+:103CA0008093090194E087C0253011F491E083C02E
  76
+:103CB000822F8450863098F48A819B8190930D01E5
  77
+:103CC00080930C01293081F09E8190930E018D81AB
  78
+:103CD000827080930F0137FD69C02FEF68C02230DA
  79
+:103CE00019F481E080930B0190E065C08A81109205
  80
+:103CF0001B01222331F410921C012BE131E092E0F0
  81
+:103D000050C0253019F48093230148C02630B1F506
  82
+:103D10008B81813019F486E998E304C0823041F444
  83
+:103D200088EA98E3909321018093200192E122C0D8
  84
+:103D30008330F9F48A81882341F488E698E39093EC
  85
+:103D400021018093200194E015C0813041F48CE67C
  86
+:103D500098E390932101809320019CE10BC0823075
  87
+:103D600041F488E898E390932101809320019EE03C
  88
+:103D700001C090E080E480930A011DC0283019F44E
  89
+:103D800025E231E009C0293019F48093250106C0ED
  90
+:103D90002A3021F42BE131E091E003C02BE131E046
  91
+:103DA00090E0309321012093200105C0292F80E865
  92
+:103DB00080930A0107C08F81882319F42E81291767
  93
+:103DC00008F0292F209301015BC080910A0187FF31
  94
+:103DD00057C080910E01592F891708F4582F851B61
  95
+:103DE00080930E0160E0882309F461E070910F0177
  96
+:103DF000E0910C01F0910D0140E037C0CF018F77C9
  97
+:103E00009070892B49F4F89483E080935700E895EB
  98
+:103E1000789407B600FCFDCF4E5FF8948991999194
  99
+:103E200021E00C0120935700E895112478949F011C
  100
+:103E30002E5F3F4FC9018F779070892B31F0662339
  101
+:103E400099F0451788F0772379F0F89485E080930E
  102
+:103E50005700E895789407B600FCFDCFF89481E10F
  103
+:103E600080935700E8957894F901451708F4C6CF78
  104
+:103E7000F0930D01E0930C01662311F01092010103
  105
+:103E8000109222018091000184FF65C080910101A0
  106
+:103E90008F3F09F460C0182F893008F018E0811BAB
  107
+:103EA000809301018091120198E889278093120183
  108
+:103EB000112309F43EC080910A0187FF1EC0809142
  109
+:103EC0000E01811708F4182F811B80930E01E091D9
  110
+:103ED0000C01F0910D01A3E1B1E003C084918D9339
  111
+:103EE0003196812F90E08D5E9E4FA817B907B1F7EC
  112
+:103EF000F0930D01E0930C011AC0E0912001F091C4
  113
+:103F0000210186FF09C0912FA3E1B1E084918D9337
  114
+:103F100031969150D9F707C0912FA3E1B1E081917B
  115
+:103F20008D939150E1F7F0932101E0932001193036
  116
+:103F300060F483E191E0612FF1DC612F6C5F6C3004
  117
+:103F400041F08FEF8093010104C08FEF8093010156
  118
+:103F50006EE16093000194E189B1847131F4915074
  119
+:103F6000D9F71092230110921D0180910B01882333
  120
+:103F700021F0FA9411F4015011F04F9B50CE1BDE4A
  121
+:103F8000F999FECF92BD81BDF89A992780B5089521
  122
+:103F9000262FF999FECF1FBA92BD81BD20BD0FB665
  123
+:103FA000F894FA9AF99A0FBE01960895F894FFCF03
  124
+:063FB0005AFF1E940600FA
  125
+:0400000300003800C1
  126
+:00000001FF
128  firmware/bootloader/hexfiles/mega168_16mhz.hex
... ...
@@ -0,0 +1,128 @@
  1
+:103800005CC000008FC0000073C0000071C00000E9
  2
+:103810006FC000006DC000006BC0000069C00000F8
  3
+:1038200067C0000065C0000063C0000061C0000008