diff --git a/Button/Button.atsuo b/Button/Button.atsuo index 0a65eab..7e2b065 100644 Binary files a/Button/Button.atsuo and b/Button/Button.atsuo differ diff --git a/Button/Button/Button.cpp b/Button/Button/Button.cpp index 1395f0b..76f1860 100644 --- a/Button/Button/Button.cpp +++ b/Button/Button/Button.cpp @@ -5,32 +5,35 @@ * Author: netz */ -#define F_CPU 16000000 +#include "config.h" +#include "Led.h" +#include "Output.h" +#include "Can.h" -#include #include -#include "Led.h" +Led l; +Output o; +Can c; int main(void) { - Led l; - DDRC |= (1< compile + + compile + + + compile + + + compile + compile compile + + compile + + + compile + + + compile + \ No newline at end of file diff --git a/Button/Button/Can.cpp b/Button/Button/Can.cpp new file mode 100644 index 0000000..337f02f --- /dev/null +++ b/Button/Button/Can.cpp @@ -0,0 +1,336 @@ +/* + * Can.cpp + * + * Created: 03.11.2013 22:09:17 + * Author: netz + */ + +#include "Can.h" + +#define CANDDR_SPI DDRB +#define CANPORT_SPI PORTB +#define CANP_MISO PINB6 +#define CANP_MOSI PINB5 +#define CANP_SCK PINB7 + +#define CANDDR_CS DDRB +#define CANPORT_CS PORTB +#define CANP_CS PINB4 + +Can::Can() { + init_pin(); + init_spi(); + init_can(); +} + +void Can::init_pin() { + //SPI Pins + CANDDR_SPI |= (1< 1 uS) + * + * Sync Seg = 1TQ + * Prop Seg = (PRSEG + 1) * TQ = 1 TQ + * Phase Seg1 = (PHSEG1 + 1) * TQ = 3 TQ + * Phase Seg2 = (PHSEG2 + 1) * TQ = 3 TQ + * + * Bus speed = 1 / (Total # of TQ) * TQ + * = 1 / 8 * TQ = 125 kHz + */ + + // BRP = 7 + mcp2515_write_register( CNF1, (1<id>>3)); + spi_putc((uint8_t) (p_message->id<<5)); + + // Extended ID + spi_putc(0x00); + spi_putc(0x00); + + uint8_t length = p_message->length; + + if (length > 8) { + length = 8; + } + + // Ist die Nachricht ein "Remote Transmit Request" ? + if (p_message->rtr) + { + /* Ein RTR hat zwar eine Laenge, + aber enthaelt keine Daten */ + + // Nachrichten Laenge + RTR einstellen + spi_putc((1<data[i]); + } + } + CANPORT_CS |= (1<id = (uint16_t) spi_putc(0xff) << 3; + p_message->id |= (uint16_t) spi_putc(0xff) >> 5; + + spi_putc(0xff); + spi_putc(0xff); + + // Laenge auslesen + uint8_t length = spi_putc(0xff) & 0x0f; + p_message->length = length; + + // Daten auslesen + for (uint8_t i=0;idata[i] = spi_putc(0xff); + } + + CANPORT_CS |= (1<rtr = 1; + } else { + p_message->rtr = 0; + } + + // Interrupt Flag loeschen + if (bit_is_set(status,6)) { + mcp2515_bit_modify(CANINTF, (1< +#include +#include "mcp2515_defs.h" + +#ifndef CAN_H_ +#define CAN_H_ + +//#define DDR_CS DDRB +//#define PORT_CS PORTB +//#define P_CS 2 + +typedef struct +{ + uint16_t id; + uint8_t rtr; + uint8_t length; + uint8_t data[8]; +} CANMessage; + +class Can { + private: + void init_spi(); + void init_can(); + void init_pin(); + uint8_t spi_putc( uint8_t data ); + void mcp2515_write_register( uint8_t adress, uint8_t data ); + uint8_t mcp2515_read_register(uint8_t adress); + void mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data); + uint8_t mcp2515_read_rx_status(void); + public: + Can(); + uint8_t can_send_message(CANMessage *p_message); + uint8_t can_get_message(CANMessage *p_message); +}; + + +#endif /* CAN_H_ */ \ No newline at end of file diff --git a/Button/Button/Debug/Button.d b/Button/Button/Debug/Button.d index 0439964..9587c47 100644 --- a/Button/Button/Debug/Button.d +++ b/Button/Button/Debug/Button.d @@ -1,4 +1,4 @@ -Button.d Button.o: .././Button.cpp \ +Button.d Button.o: .././Button.cpp .././config.h .././Led.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ @@ -10,10 +10,15 @@ Button.d Button.o: .././Button.cpp \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + .././Output.h .././Can.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ - .././Led.h + .././mcp2515_defs.h + +.././config.h: + +.././Led.h: c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: @@ -37,10 +42,14 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8- c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: +.././Output.h: + +.././Can.h: + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: -.././Led.h: +.././mcp2515_defs.h: diff --git a/Button/Button/Debug/Button.elf b/Button/Button/Debug/Button.elf index 48f1a73..f85a1da 100644 Binary files a/Button/Button/Debug/Button.elf and b/Button/Button/Debug/Button.elf differ diff --git a/Button/Button/Debug/Button.hex b/Button/Button/Debug/Button.hex index e5d994f..ac13162 100644 --- a/Button/Button/Debug/Button.hex +++ b/Button/Button/Debug/Button.hex @@ -1,33 +1,88 @@ -:100000000C942A000C9434000C9434000C943400AA -:100010000C9434000C9434000C9434000C94340090 -:100020000C9434000C9434000C9434000C94340080 -:100030000C9434000C9434000C9434000C94340070 -:100040000C9434000C9434000C9434000C94340060 -:100050000C94340011241FBECFE5D8E0DEBFCDBF25 -:100060000E9436000C94F7000C940000CF93DF93AD -:100070001F92CDB7DEB7CE0101960E944A00A59A25 -:1000800065E0CE0101960E94B600FACF84B3876086 -:1000900084BB08950E944600089585B3887F85BB80 -:1000A00085B3962F9370892B6470682B65BB089578 -:1000B0002F923F924F925F926F927F928F929F9278 -:1000C000AF92BF92CF92DF92EF92FF920F931F9366 -:1000D000CF93DF935C01862E942E690100E010E03F -:1000E000212C312C422C532C2AC0C62DD72D682D03 -:1000F000C5010E944D002196CF3FD105C1F71016D2 -:10010000110654F4C42DD52D692DC5010E944D0052 -:100110002196C017D107C1F78FEFE81AF80AEC143F -:10012000FD0421F407C07101602E712E0F3F1105EF -:10013000E4F2E5CF0F5F1F4F0F3F110521F01C14B4 -:100140001D048CF3F7CFDF91CF911F910F91FF909A -:10015000EF90DF90CF90BF90AF909F908F907F9067 -:100160006F905F904F903F902F900895EC01162F65 -:100170002AE030E044E050E067E070E00E94580080 -:10018000212F30E046E050E064E070E0CE010E94B4 -:100190005800212F30E042E050E066E070E0CE01F0 -:1001A0000E945800212F30E043E050E062E070E010 -:1001B000CE010E945800212F30E041E050E063E082 -:1001C00070E0CE010E945800212F30E045E050E061 -:1001D00061E070E0CE010E945800212F30E044E041 -:1001E00050E065E070E0CE010E945800C9CFF8945D -:0201F000FFCF3F +:100000000C942B000C9448000C9448000C9448006D +:100010000C9448000C9448000C9448000C94480040 +:100020000C9448000C9448000C9448000C94480030 +:100030000C9448000C9448000C9448000C94480020 +:100040000C9448000C9448000C9448000C94480010 +:100050000C944800890011241FBECFE5D8E0DEBF14 +:10006000CDBF20E0A0E6B0E001C01D92A336B207EC +:10007000E1F710E0C6E5D0E004C02297FE010E943F +:10008000B102C435D107C9F70E944A000C94B502E9 +:100090000C940000CF93DF93CDB7DEB72C970FB64B +:1000A000F894DEBF0FBECDBF66E082E690E00E940E +:1000B000000283E291E09A8389831B8282E08C8331 +:1000C0008FEA8D838EEF8E832AE030E044E050E0AB +:1000D00066E070E082E690E00E940B0281E690E02C +:1000E0000E94AD02BE016F5F7F4F80E690E00E94EC +:1000F0005D018FE99FE00197F1F700C0000081E604 +:1001000090E00E94AB0265E082E690E00E94690206 +:10011000E5CF82E690E00E94FD0181E690E00E943A +:10012000A70280E690E00E944F01089587B3806A9D +:1001300087BB88B38F7188BBBC9AC49A089580E549 +:100140008DB981E08EB908956FB9779BFECF8FB1DD +:1001500008950F931F93CF93DF93EC01062F142F75 +:10016000C49862E00E94A400602FCE010E94A40007 +:10017000612FCE010E94A400C49ADF91CF911F91FC +:100180000F910895FF920F931F93CF93DF93EC018C +:10019000F62E042F122FC49865E00E94A4006F2D44 +:1001A000CE010E94A400602FCE010E94A400612F06 +:1001B000CE010E94A400C49ADF91CF911F910F91AC +:1001C000FF900895CF93DF93EC01C49860EC0E94F8 +:1001D000A4008FE99FE00197F1F700C00000C49AE6 +:1001E0008FE39CE90197F1F700C0000047E06AE265 +:1001F000CE010E94A90040E969E2CE010E94A90057 +:1002000042E068E2CE010E94A90043E06BE2CE0129 +:100210000E94A90040E660E6CE010E94A90040E6E7 +:1002200060E7CE010E94A90040E060E2CE010E949A +:10023000A90040E061E2CE010E94A90040E062E234 +:10024000CE010E94A90040E063E2CE010E94A90015 +:1002500040E064E2CE010E94A90040E065E2CE01E8 +:100260000E94A90040E066E2CE010E94A90040E0A1 +:1002700067E2CE010E94A90040E06CE0CE010E943E +:10028000A90040E06DE0CE010E94A90020E040EE10 +:100290006FE0CE010E94C200DF91CF910895CF930D +:1002A000DF93EC010E949600CE010E949F00CE01D8 +:1002B0000E94E200DF91CF910895AF92BF92CF925A +:1002C000DF92EF92FF920F931F93CF93DF931F92D2 +:1002D000CDB7DEB78C016B01C49860EA0E94A40020 +:1002E0006FEFC8010E94A40089836FEFC8010E94CC +:1002F000A400C49A898182FF0AC0898184FF09C051 +:10030000898186FD69C06894BB24B2F805C0B12C10 +:1003100003C06894BB24B1F8C4986B2D6064C80115 +:100320000E94A400F60180819181BC0176956795B9 +:100330007695679576956795C8010E94A400F601A9 +:1003400060816295660F607EC8010E94A40060E033 +:10035000C8010E94A40060E0C8010E94A400F60148 +:10036000A380F8E0FA1518F46894AA24A3F8F6011B +:100370008281882331F06A2D6064C8010E94A40044 +:1003800019C06A2DC8010E94A400AA2099F0760124 +:10039000F4E0EF0EF11CAA948A2D90E00596C80EA9 +:1003A000D91EF70161917F01C8010E94A400EC14DD +:1003B000FD04B9F7C49A0000C498B11005C061E803 +:1003C000C8010E94A40005C06B2D6068C8010E948E +:1003D000A400C49A81E001C080E00F90DF91CF912A +:1003E0001F910F91FF90EF90DF90CF90BF90AF9053 +:1003F000089584B3876084BB08950E94F90108952D +:1004000085B3887F85BB85B3962F9370892B6470E5 +:10041000682B65BB08952F923F924F925F926F9227 +:100420007F928F929F92AF92BF92CF92DF92EF9284 +:10043000FF920F931F93CF93DF935C01862E942E30 +:10044000690100E010E0212C312C422C532C2AC0F1 +:10045000C62DD72D682DC5010E9400022196CF3FE1 +:10046000D105C1F71016110654F4C42DD52D692DF0 +:10047000C5010E9400022196C017D107C1F78FEF76 +:10048000E81AF80AEC14FD0421F407C07101602E8B +:10049000712E0F3F1105E4F2E5CF0F5F1F4F0F3FA5 +:1004A000110521F01C141D048CF3F7CFDF91CF91BF +:1004B0001F910F91FF90EF90DF90CF90BF90AF9082 +:1004C0009F908F907F906F905F904F903F902F9074 +:1004D00008951F93CF93DF93EC01162F262F30E062 +:1004E00046E050E064E070E00E940B02212F30E013 +:1004F00042E050E066E070E0CE010E940B02212F46 +:1005000030E043E050E062E070E0CE010E940B0278 +:10051000212F30E041E050E063E070E0CE010E9426 +:100520000B02212F30E045E050E061E070E0CE01A9 +:100530000E940B02212F30E044E050E065E070E0C3 +:10054000CE010E940B02DF91CF911F91089584B3D9 +:10055000806384BB0895AD980895AD9A0895EE0F19 +:0E056000FF1F0590F491E02D0994F894FFCF51 :00000001FF diff --git a/Button/Button/Debug/Button.lss b/Button/Button/Debug/Button.lss index 5a747e6..2dcf317 100644 --- a/Button/Button/Debug/Button.lss +++ b/Button/Button/Debug/Button.lss @@ -3,380 +3,1103 @@ Button.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000001f2 00000000 00000000 00000074 2**1 + 0 .text 0000056e 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000000 00800060 000001f2 00000266 2**0 + 1 .data 00000000 00800060 0000056e 00000602 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .stab 000006cc 00000000 00000000 00000268 2**2 + 2 .bss 00000003 00800060 00800060 00000602 2**0 + ALLOC + 3 .stab 000006cc 00000000 00000000 00000604 2**2 CONTENTS, READONLY, DEBUGGING - 3 .stabstr 00000082 00000000 00000000 00000934 2**0 + 4 .stabstr 00000082 00000000 00000000 00000cd0 2**0 CONTENTS, READONLY, DEBUGGING - 4 .comment 0000002f 00000000 00000000 000009b6 2**0 + 5 .comment 0000002f 00000000 00000000 00000d52 2**0 CONTENTS, READONLY - 5 .debug_aranges 00000068 00000000 00000000 000009e5 2**0 + 6 .debug_aranges 00000120 00000000 00000000 00000d81 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_info 0000079b 00000000 00000000 00000a4d 2**0 + 7 .debug_info 00001b32 00000000 00000000 00000ea1 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_abbrev 0000034c 00000000 00000000 000011e8 2**0 + 8 .debug_abbrev 000008d3 00000000 00000000 000029d3 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_line 00000262 00000000 00000000 00001534 2**0 + 9 .debug_line 00000686 00000000 00000000 000032a6 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_frame 00000104 00000000 00000000 00001798 2**2 + 10 .debug_frame 00000324 00000000 00000000 0000392c 2**2 CONTENTS, READONLY, DEBUGGING - 10 .debug_str 00000173 00000000 00000000 0000189c 2**0 + 11 .debug_str 000004ae 00000000 00000000 00003c50 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_loc 000003db 00000000 00000000 00001a0f 2**0 + 12 .debug_loc 00000b79 00000000 00000000 000040fe 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_ranges 00000090 00000000 00000000 00001dea 2**0 + 13 .debug_ranges 00000128 00000000 00000000 00004c77 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: - 0: 0c 94 2a 00 jmp 0x54 ; 0x54 <__ctors_end> - 4: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 8: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 10: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 14: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 18: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 1c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 20: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 24: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 28: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 2c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 30: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 34: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 38: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 3c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 40: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 44: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 48: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 4c: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> - 50: 0c 94 34 00 jmp 0x68 ; 0x68 <__bad_interrupt> + 0: 0c 94 2b 00 jmp 0x56 ; 0x56 <__ctors_end> + 4: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 8: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + c: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 10: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 14: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 18: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 1c: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 20: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 24: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 28: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 2c: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 30: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 34: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 38: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 3c: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 40: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 44: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 48: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 4c: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> + 50: 0c 94 48 00 jmp 0x90 ; 0x90 <__bad_interrupt> -00000054 <__ctors_end>: - 54: 11 24 eor r1, r1 - 56: 1f be out 0x3f, r1 ; 63 - 58: cf e5 ldi r28, 0x5F ; 95 - 5a: d8 e0 ldi r29, 0x08 ; 8 - 5c: de bf out 0x3e, r29 ; 62 - 5e: cd bf out 0x3d, r28 ; 61 - 60: 0e 94 36 00 call 0x6c ; 0x6c
- 64: 0c 94 f7 00 jmp 0x1ee ; 0x1ee <_exit> +00000054 <__ctors_start>: + 54: 89 00 .word 0x0089 ; ???? -00000068 <__bad_interrupt>: - 68: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> +00000056 <__ctors_end>: + 56: 11 24 eor r1, r1 + 58: 1f be out 0x3f, r1 ; 63 + 5a: cf e5 ldi r28, 0x5F ; 95 + 5c: d8 e0 ldi r29, 0x08 ; 8 + 5e: de bf out 0x3e, r29 ; 62 + 60: cd bf out 0x3d, r28 ; 61 -0000006c
: -#include +00000062 <__do_clear_bss>: + 62: 20 e0 ldi r18, 0x00 ; 0 + 64: a0 e6 ldi r26, 0x60 ; 96 + 66: b0 e0 ldi r27, 0x00 ; 0 + 68: 01 c0 rjmp .+2 ; 0x6c <.do_clear_bss_start> -#include "Led.h" +0000006a <.do_clear_bss_loop>: + 6a: 1d 92 st X+, r1 + +0000006c <.do_clear_bss_start>: + 6c: a3 36 cpi r26, 0x63 ; 99 + 6e: b2 07 cpc r27, r18 + 70: e1 f7 brne .-8 ; 0x6a <.do_clear_bss_loop> + +00000072 <__do_global_ctors>: + 72: 10 e0 ldi r17, 0x00 ; 0 + 74: c6 e5 ldi r28, 0x56 ; 86 + 76: d0 e0 ldi r29, 0x00 ; 0 + 78: 04 c0 rjmp .+8 ; 0x82 <__do_global_ctors+0x10> + 7a: 22 97 sbiw r28, 0x02 ; 2 + 7c: fe 01 movw r30, r28 + 7e: 0e 94 b1 02 call 0x562 ; 0x562 <__tablejump__> + 82: c4 35 cpi r28, 0x54 ; 84 + 84: d1 07 cpc r29, r17 + 86: c9 f7 brne .-14 ; 0x7a <__do_global_ctors+0x8> + 88: 0e 94 4a 00 call 0x94 ; 0x94
+ 8c: 0c 94 b5 02 jmp 0x56a ; 0x56a <_exit> + +00000090 <__bad_interrupt>: + 90: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +00000094
: +Led l; +Output o; +Can c; int main(void) { - 6c: cf 93 push r28 - 6e: df 93 push r29 - 70: 1f 92 push r1 - 72: cd b7 in r28, 0x3d ; 61 - 74: de b7 in r29, 0x3e ; 62 - Led l; - 76: ce 01 movw r24, r28 - 78: 01 96 adiw r24, 0x01 ; 1 - 7a: 0e 94 4a 00 call 0x94 ; 0x94 <_ZN3LedC1Ev> - DDRC |= (1< + CANMessage m; + m.id = 0x0123; + b2: 83 e2 ldi r24, 0x23 ; 35 + b4: 91 e0 ldi r25, 0x01 ; 1 + b6: 9a 83 std Y+2, r25 ; 0x02 + b8: 89 83 std Y+1, r24 ; 0x01 + m.rtr = 0; + ba: 1b 82 std Y+3, r1 ; 0x03 + m.length = 2; + bc: 82 e0 ldi r24, 0x02 ; 2 + be: 8c 83 std Y+4, r24 ; 0x04 + m.data[0] = 0xAF; + c0: 8f ea ldi r24, 0xAF ; 175 + c2: 8d 83 std Y+5, r24 ; 0x05 + m.data[1] = 0xFE; + c4: 8e ef ldi r24, 0xFE ; 254 + c6: 8e 83 std Y+6, r24 ; 0x06 + l.fade(Led::YELLOW, Led::RED, 10); + c8: 2a e0 ldi r18, 0x0A ; 10 + ca: 30 e0 ldi r19, 0x00 ; 0 + cc: 44 e0 ldi r20, 0x04 ; 4 + ce: 50 e0 ldi r21, 0x00 ; 0 + d0: 66 e0 ldi r22, 0x06 ; 6 + d2: 70 e0 ldi r23, 0x00 ; 0 + d4: 82 e6 ldi r24, 0x62 ; 98 + d6: 90 e0 ldi r25, 0x00 ; 0 + d8: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> while(1) { - l.rainbow(5); - 80: 65 e0 ldi r22, 0x05 ; 5 - 82: ce 01 movw r24, r28 - 84: 01 96 adiw r24, 0x01 ; 1 - 86: 0e 94 b6 00 call 0x16c ; 0x16c <_ZN3Led7rainbowEh> - 8a: fa cf rjmp .-12 ; 0x80 + o.AudioOn(); + dc: 81 e6 ldi r24, 0x61 ; 97 + de: 90 e0 ldi r25, 0x00 ; 0 + e0: 0e 94 ad 02 call 0x55a ; 0x55a <_ZN6Output7AudioOnEv> + c.can_send_message(&m); + e4: be 01 movw r22, r28 + e6: 6f 5f subi r22, 0xFF ; 255 + e8: 7f 4f sbci r23, 0xFF ; 255 + ea: 80 e6 ldi r24, 0x60 ; 96 + ec: 90 e0 ldi r25, 0x00 ; 0 + ee: 0e 94 5d 01 call 0x2ba ; 0x2ba <_ZN3Can16can_send_messageEP10CANMessage> + #else + //round up by default + __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); + #endif -0000008c <_ZN3Led4initEv>: + __builtin_avr_delay_cycles(__ticks_dc); + f2: 8f e9 ldi r24, 0x9F ; 159 + f4: 9f e0 ldi r25, 0x0F ; 15 + f6: 01 97 sbiw r24, 0x01 ; 1 + f8: f1 f7 brne .-4 ; 0xf6 + fa: 00 c0 rjmp .+0 ; 0xfc + fc: 00 00 nop + _delay_ms(1); + o.AudioOff(); + fe: 81 e6 ldi r24, 0x61 ; 97 + 100: 90 e0 ldi r25, 0x00 ; 0 + 102: 0e 94 ab 02 call 0x556 ; 0x556 <_ZN6Output8AudioOffEv> + + l.rainbow(5); + 106: 65 e0 ldi r22, 0x05 ; 5 + 108: 82 e6 ldi r24, 0x62 ; 98 + 10a: 90 e0 ldi r25, 0x00 ; 0 + 10c: 0e 94 69 02 call 0x4d2 ; 0x4d2 <_ZN3Led7rainbowEh> + 110: e5 cf rjmp .-54 ; 0xdc + +00000112 <_GLOBAL__sub_I_l>: +#include "Output.h" +#include "Can.h" + +#include + +Led l; + 112: 82 e6 ldi r24, 0x62 ; 98 + 114: 90 e0 ldi r25, 0x00 ; 0 + 116: 0e 94 fd 01 call 0x3fa ; 0x3fa <_ZN3LedC1Ev> +Output o; + 11a: 81 e6 ldi r24, 0x61 ; 97 + 11c: 90 e0 ldi r25, 0x00 ; 0 + 11e: 0e 94 a7 02 call 0x54e ; 0x54e <_ZN6OutputC1Ev> +Can c; + 122: 80 e6 ldi r24, 0x60 ; 96 + 124: 90 e0 ldi r25, 0x00 ; 0 + 126: 0e 94 4f 01 call 0x29e ; 0x29e <_ZN3CanC1Ev> + 12a: 08 95 ret + +0000012c <_ZN3Can8init_pinEv>: + init_can(); +} + +void Can::init_pin() { + //SPI Pins + CANDDR_SPI |= (1<: +} + +void Can::init_spi() { + SPCR = (1<: + mcp2515_bit_modify( CANCTRL, 0xE0, 0); +} + +uint8_t Can::spi_putc( uint8_t data ) { + // Sendet ein Byte + SPDR = data; + 148: 6f b9 out 0x0f, r22 ; 15 + + // Wartet bis Byte gesendet wurde + while( !( SPSR & (1< + + return SPDR; + 14e: 8f b1 in r24, 0x0f ; 15 +} + 150: 08 95 ret + +00000152 <_ZN3Can22mcp2515_write_registerEhh>: + +void Can::mcp2515_write_register( uint8_t adress, uint8_t data ) +{ + 152: 0f 93 push r16 + 154: 1f 93 push r17 + 156: cf 93 push r28 + 158: df 93 push r29 + 15a: ec 01 movw r28, r24 + 15c: 06 2f mov r16, r22 + 15e: 14 2f mov r17, r20 + // /CS des MCP2515 auf Low ziehen + CANPORT_CS &= ~(1< + spi_putc(adress); + 168: 60 2f mov r22, r16 + 16a: ce 01 movw r24, r28 + 16c: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + spi_putc(data); + 170: 61 2f mov r22, r17 + 172: ce 01 movw r24, r28 + 174: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<: + + return data; +} + +void Can::mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data) +{ + 184: ff 92 push r15 + 186: 0f 93 push r16 + 188: 1f 93 push r17 + 18a: cf 93 push r28 + 18c: df 93 push r29 + 18e: ec 01 movw r28, r24 + 190: f6 2e mov r15, r22 + 192: 04 2f mov r16, r20 + 194: 12 2f mov r17, r18 + // /CS des MCP2515 auf Low ziehen + CANPORT_CS &= ~(1< + spi_putc(adress); + 19e: 6f 2d mov r22, r15 + 1a0: ce 01 movw r24, r28 + 1a2: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + spi_putc(mask); + 1a6: 60 2f mov r22, r16 + 1a8: ce 01 movw r24, r28 + 1aa: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + spi_putc(data); + 1ae: 61 2f mov r22, r17 + 1b0: ce 01 movw r24, r28 + 1b2: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<: +void Can::init_spi() { + SPCR = (1< + 1d2: 8f e9 ldi r24, 0x9F ; 159 + 1d4: 9f e0 ldi r25, 0x0F ; 15 + 1d6: 01 97 sbiw r24, 0x01 ; 1 + 1d8: f1 f7 brne .-4 ; 0x1d6 <_ZN3Can8init_canEv+0x12> + 1da: 00 c0 rjmp .+0 ; 0x1dc <_ZN3Can8init_canEv+0x18> + 1dc: 00 00 nop + _delay_ms(1); + CANPORT_CS |= (1< + 1e8: 00 c0 rjmp .+0 ; 0x1ea <_ZN3Can8init_canEv+0x26> + 1ea: 00 00 nop + * Bus speed = 1 / (Total # of TQ) * TQ + * = 1 / 8 * TQ = 125 kHz + */ + + // BRP = 7 + mcp2515_write_register( CNF1, (1< + + // Prop Seg und Phase Seg1 einstellen + mcp2515_write_register( CNF2, (1< + + // Wake-up Filter deaktivieren, Phase Seg2 einstellen + mcp2515_write_register( CNF3, (1< + + // Aktivieren der Rx Buffer Interrupts + mcp2515_write_register( CANINTE, (1< + /* + * Einstellen der Filter + */ + + // Buffer 0 : Empfangen aller Nachrichten + mcp2515_write_register( RXB0CTRL, (1< + + // Buffer 1 : Empfangen aller Nachrichten + mcp2515_write_register( RXB1CTRL, (1< + + // Alle Bits der Empfangsmaske loeschen, + // damit werden alle Nachrichten empfangen + mcp2515_write_register( RXM0SIDH, 0 ); + 228: 40 e0 ldi r20, 0x00 ; 0 + 22a: 60 e2 ldi r22, 0x20 ; 32 + 22c: ce 01 movw r24, r28 + 22e: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0SIDL, 0 ); + 232: 40 e0 ldi r20, 0x00 ; 0 + 234: 61 e2 ldi r22, 0x21 ; 33 + 236: ce 01 movw r24, r28 + 238: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0EID8, 0 ); + 23c: 40 e0 ldi r20, 0x00 ; 0 + 23e: 62 e2 ldi r22, 0x22 ; 34 + 240: ce 01 movw r24, r28 + 242: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0EID0, 0 ); + 246: 40 e0 ldi r20, 0x00 ; 0 + 248: 63 e2 ldi r22, 0x23 ; 35 + 24a: ce 01 movw r24, r28 + 24c: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + + mcp2515_write_register( RXM1SIDH, 0 ); + 250: 40 e0 ldi r20, 0x00 ; 0 + 252: 64 e2 ldi r22, 0x24 ; 36 + 254: ce 01 movw r24, r28 + 256: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1SIDL, 0 ); + 25a: 40 e0 ldi r20, 0x00 ; 0 + 25c: 65 e2 ldi r22, 0x25 ; 37 + 25e: ce 01 movw r24, r28 + 260: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1EID8, 0 ); + 264: 40 e0 ldi r20, 0x00 ; 0 + 266: 66 e2 ldi r22, 0x26 ; 38 + 268: ce 01 movw r24, r28 + 26a: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1EID0, 0 ); + 26e: 40 e0 ldi r20, 0x00 ; 0 + 270: 67 e2 ldi r22, 0x27 ; 39 + 272: ce 01 movw r24, r28 + 274: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + /* + * Einstellen der Pin Funktionen + */ + + // Deaktivieren der Pins RXnBF Pins (High Impedance State) + mcp2515_write_register( BFPCTRL, 0 ); + 278: 40 e0 ldi r20, 0x00 ; 0 + 27a: 6c e0 ldi r22, 0x0C ; 12 + 27c: ce 01 movw r24, r28 + 27e: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + + // TXnRTS Bits als Inputs schalten + mcp2515_write_register( TXRTSCTRL, 0 ); + 282: 40 e0 ldi r20, 0x00 ; 0 + 284: 6d e0 ldi r22, 0x0D ; 13 + 286: ce 01 movw r24, r28 + 288: 0e 94 a9 00 call 0x152 ; 0x152 <_ZN3Can22mcp2515_write_registerEhh> + + // Device zurueck in den normalen Modus versetzten + mcp2515_bit_modify( CANCTRL, 0xE0, 0); + 28c: 20 e0 ldi r18, 0x00 ; 0 + 28e: 40 ee ldi r20, 0xE0 ; 224 + 290: 6f e0 ldi r22, 0x0F ; 15 + 292: ce 01 movw r24, r28 + 294: 0e 94 c2 00 call 0x184 ; 0x184 <_ZN3Can18mcp2515_bit_modifyEhhh> +} + 298: df 91 pop r29 + 29a: cf 91 pop r28 + 29c: 08 95 ret + +0000029e <_ZN3CanC1Ev>: + +#define CANDDR_CS DDRB +#define CANPORT_CS PORTB +#define CANP_CS PINB4 + +Can::Can() { + 29e: cf 93 push r28 + 2a0: df 93 push r29 + 2a2: ec 01 movw r28, r24 + init_pin(); + 2a4: 0e 94 96 00 call 0x12c ; 0x12c <_ZN3Can8init_pinEv> + init_spi(); + 2a8: ce 01 movw r24, r28 + 2aa: 0e 94 9f 00 call 0x13e ; 0x13e <_ZN3Can8init_spiEv> + init_can(); + 2ae: ce 01 movw r24, r28 + 2b0: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <_ZN3Can8init_canEv> +} + 2b4: df 91 pop r29 + 2b6: cf 91 pop r28 + 2b8: 08 95 ret + +000002ba <_ZN3Can16can_send_messageEP10CANMessage>: + // /CS Leitung wieder freigeben + CANPORT_CS |= (1< + status = spi_putc(0xff); + 2e0: 6f ef ldi r22, 0xFF ; 255 + 2e2: c8 01 movw r24, r16 + 2e4: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + 2e8: 89 83 std Y+1, r24 ; 0x01 + spi_putc(0xff); + 2ea: 6f ef ldi r22, 0xFF ; 255 + 2ec: c8 01 movw r24, r16 + 2ee: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + CANPORT_CS |= (1< + address = 0x00; + } + else if (bit_is_clear(status, 4)) { + 2fa: 89 81 ldd r24, Y+1 ; 0x01 + 2fc: 84 ff sbrs r24, 4 + 2fe: 09 c0 rjmp .+18 ; 0x312 <_ZN3Can16can_send_messageEP10CANMessage+0x58> + address = 0x02; + } + else if (bit_is_clear(status, 6)) { + 300: 89 81 ldd r24, Y+1 ; 0x01 + 302: 86 fd sbrc r24, 6 + 304: 69 c0 rjmp .+210 ; 0x3d8 <_ZN3Can16can_send_messageEP10CANMessage+0x11e> + address = 0x04; + 306: 68 94 set + 308: bb 24 eor r11, r11 + 30a: b2 f8 bld r11, 2 + 30c: 05 c0 rjmp .+10 ; 0x318 <_ZN3Can16can_send_messageEP10CANMessage+0x5e> + * 4 TXB1CNTRL.TXREQ + * 6 TXB2CNTRL.TXREQ + */ + + if (bit_is_clear(status, 2)) { + address = 0x00; + 30e: b1 2c mov r11, r1 + 310: 03 c0 rjmp .+6 ; 0x318 <_ZN3Can16can_send_messageEP10CANMessage+0x5e> + } + else if (bit_is_clear(status, 4)) { + address = 0x02; + 312: 68 94 set + 314: bb 24 eor r11, r11 + 316: b1 f8 bld r11, 1 + /* Alle Puffer sind belegt, + Nachricht kann nicht verschickt werden */ + return 0; + } + + CANPORT_CS &= ~(1< + + // Standard ID einstellen + spi_putc((uint8_t) (p_message->id>>3)); + 324: f6 01 movw r30, r12 + 326: 80 81 ld r24, Z + 328: 91 81 ldd r25, Z+1 ; 0x01 + 32a: bc 01 movw r22, r24 + 32c: 76 95 lsr r23 + 32e: 67 95 ror r22 + 330: 76 95 lsr r23 + 332: 67 95 ror r22 + 334: 76 95 lsr r23 + 336: 67 95 ror r22 + 338: c8 01 movw r24, r16 + 33a: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + spi_putc((uint8_t) (p_message->id<<5)); + 33e: f6 01 movw r30, r12 + 340: 60 81 ld r22, Z + 342: 62 95 swap r22 + 344: 66 0f add r22, r22 + 346: 60 7e andi r22, 0xE0 ; 224 + 348: c8 01 movw r24, r16 + 34a: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + + // Extended ID + spi_putc(0x00); + 34e: 60 e0 ldi r22, 0x00 ; 0 + 350: c8 01 movw r24, r16 + 352: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + spi_putc(0x00); + 356: 60 e0 ldi r22, 0x00 ; 0 + 358: c8 01 movw r24, r16 + 35a: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + + uint8_t length = p_message->length; + 35e: f6 01 movw r30, r12 + 360: a3 80 ldd r10, Z+3 ; 0x03 + 362: f8 e0 ldi r31, 0x08 ; 8 + 364: fa 15 cp r31, r10 + 366: 18 f4 brcc .+6 ; 0x36e <_ZN3Can16can_send_messageEP10CANMessage+0xb4> + 368: 68 94 set + 36a: aa 24 eor r10, r10 + 36c: a3 f8 bld r10, 3 + if (length > 8) { + length = 8; + } + + // Ist die Nachricht ein "Remote Transmit Request" ? + if (p_message->rtr) + 36e: f6 01 movw r30, r12 + 370: 82 81 ldd r24, Z+2 ; 0x02 + 372: 88 23 and r24, r24 + 374: 31 f0 breq .+12 ; 0x382 <_ZN3Can16can_send_messageEP10CANMessage+0xc8> + { + /* Ein RTR hat zwar eine Laenge, + aber enthaelt keine Daten */ + + // Nachrichten Laenge + RTR einstellen + spi_putc((1< + 380: 19 c0 rjmp .+50 ; 0x3b4 <_ZN3Can16can_send_messageEP10CANMessage+0xfa> + } + else + { + // Nachrichten Laenge einstellen + spi_putc(length); + 382: 6a 2d mov r22, r10 + 384: c8 01 movw r24, r16 + 386: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + + // Daten + for (uint8_t i=0;i + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<data[i]); + 3a2: f7 01 movw r30, r14 + 3a4: 61 91 ld r22, Z+ + 3a6: 7f 01 movw r14, r30 + 3a8: c8 01 movw r24, r16 + 3aa: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + { + // Nachrichten Laenge einstellen + spi_putc(length); + + // Daten + for (uint8_t i=0;i + spi_putc(p_message->data[i]); + } + } + CANPORT_CS |= (1< + spi_putc(SPI_RTS | 0x01); + 3be: 61 e8 ldi r22, 0x81 ; 129 + 3c0: c8 01 movw r24, r16 + 3c2: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + 3c6: 05 c0 rjmp .+10 ; 0x3d2 <_ZN3Can16can_send_messageEP10CANMessage+0x118> + } else { + spi_putc(SPI_RTS | address); + 3c8: 6b 2d mov r22, r11 + 3ca: 60 68 ori r22, 0x80 ; 128 + 3cc: c8 01 movw r24, r16 + 3ce: 0e 94 a4 00 call 0x148 ; 0x148 <_ZN3Can8spi_putcEh> + } + CANPORT_CS |= (1< + address = 0x04; + } + else { + /* Alle Puffer sind belegt, + Nachricht kann nicht verschickt werden */ + return 0; + 3d8: 80 e0 ldi r24, 0x00 ; 0 + spi_putc(SPI_RTS | address); + } + CANPORT_CS |= (1<: +Led::Led() { init(); } void Led::init() { - //*Led::DDR |= (1<: - */ - -#include "Led.h" +000003fa <_ZN3LedC1Ev>: +#define LEDPING PINC1 +#define LEDPINB PINC0 +#define LEDPINM PINC0 Led::Led() { init(); - 94: 0e 94 46 00 call 0x8c ; 0x8c <_ZN3Led4initEv> - 98: 08 95 ret + 3fa: 0e 94 f9 01 call 0x3f2 ; 0x3f2 <_ZN3Led4initEv> + 3fe: 08 95 ret -0000009a <_ZN3Led5colorEh>: +00000400 <_ZN3Led5colorEh>: + int rgb = 0; rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); - //*Led::PORT &= ~((1<: - fade(BLUE, MAGENTA, time); - fade(MAGENTA, RED, time); - } +00000416 <_ZN3Led4fadeEiii>: + fade(CYAN, BLUE, time); + fade(BLUE, MAGENTA, time); + fade(MAGENTA, RED, time); } void Led::fade(int from, int to, int dur) { - b0: 2f 92 push r2 - b2: 3f 92 push r3 - b4: 4f 92 push r4 - b6: 5f 92 push r5 - b8: 6f 92 push r6 - ba: 7f 92 push r7 - bc: 8f 92 push r8 - be: 9f 92 push r9 - c0: af 92 push r10 - c2: bf 92 push r11 - c4: cf 92 push r12 - c6: df 92 push r13 - c8: ef 92 push r14 - ca: ff 92 push r15 - cc: 0f 93 push r16 - ce: 1f 93 push r17 - d0: cf 93 push r28 - d2: df 93 push r29 - d4: 5c 01 movw r10, r24 - d6: 86 2e mov r8, r22 - d8: 94 2e mov r9, r20 - da: 69 01 movw r12, r18 + 416: 2f 92 push r2 + 418: 3f 92 push r3 + 41a: 4f 92 push r4 + 41c: 5f 92 push r5 + 41e: 6f 92 push r6 + 420: 7f 92 push r7 + 422: 8f 92 push r8 + 424: 9f 92 push r9 + 426: af 92 push r10 + 428: bf 92 push r11 + 42a: cf 92 push r12 + 42c: df 92 push r13 + 42e: ef 92 push r14 + 430: ff 92 push r15 + 432: 0f 93 push r16 + 434: 1f 93 push r17 + 436: cf 93 push r28 + 438: df 93 push r29 + 43a: 5c 01 movw r10, r24 + 43c: 86 2e mov r8, r22 + 43e: 94 2e mov r9, r20 + 440: 69 01 movw r12, r18 for (int i=0;i<0xFF;i++) { - dc: 00 e0 ldi r16, 0x00 ; 0 - de: 10 e0 ldi r17, 0x00 ; 0 + 442: 00 e0 ldi r16, 0x00 ; 0 + 444: 10 e0 ldi r17, 0x00 ; 0 for(int k=0;k + 44a: 42 2c mov r4, r2 + 44c: 53 2c mov r5, r3 + 44e: 2a c0 rjmp .+84 ; 0x4a4 <_ZN3Led4fadeEiii+0x8e> } void Led::fade(int from, int to, int dur) { for (int i=0;i<0xFF;i++) { for(int k=0;k + 454: 68 2d mov r22, r8 + 456: c5 01 movw r24, r10 + 458: 0e 94 00 02 call 0x400 ; 0x400 <_ZN3Led5colorEh> } void Led::fade(int from, int to, int dur) { for (int i=0;i<0xFF;i++) { for(int k=0;k + 45c: 21 96 adiw r28, 0x01 ; 1 + 45e: cf 3f cpi r28, 0xFF ; 255 + 460: d1 05 cpc r29, r1 + 462: c1 f7 brne .-16 ; 0x454 <_ZN3Led4fadeEiii+0x3e> color(from); } for (int j=0;j - 104: c4 2d mov r28, r4 - 106: d5 2d mov r29, r5 + 464: 10 16 cp r1, r16 + 466: 11 06 cpc r1, r17 + 468: 54 f4 brge .+20 ; 0x47e <_ZN3Led4fadeEiii+0x68> + 46a: c4 2d mov r28, r4 + 46c: d5 2d mov r29, r5 color(to); - 108: 69 2d mov r22, r9 - 10a: c5 01 movw r24, r10 - 10c: 0e 94 4d 00 call 0x9a ; 0x9a <_ZN3Led5colorEh> + 46e: 69 2d mov r22, r9 + 470: c5 01 movw r24, r10 + 472: 0e 94 00 02 call 0x400 ; 0x400 <_ZN3Led5colorEh> for (int i=0;i<0xFF;i++) { for(int k=0;k - } + 476: 21 96 adiw r28, 0x01 ; 1 + 478: c0 17 cp r28, r16 + 47a: d1 07 cpc r29, r17 + 47c: c1 f7 brne .-16 ; 0x46e <_ZN3Led4fadeEiii+0x58> + fade(MAGENTA, RED, time); } void Led::fade(int from, int to, int dur) { for (int i=0;i<0xFF;i++) { for(int k=0;k - 124: 07 c0 rjmp .+14 ; 0x134 <_ZN3Led4fadeEiii+0x84> - 126: 71 01 movw r14, r2 + 47e: 8f ef ldi r24, 0xFF ; 255 + 480: e8 1a sub r14, r24 + 482: f8 0a sbc r15, r24 + 484: ec 14 cp r14, r12 + 486: fd 04 cpc r15, r13 + 488: 21 f4 brne .+8 ; 0x492 <_ZN3Led4fadeEiii+0x7c> + 48a: 07 c0 rjmp .+14 ; 0x49a <_ZN3Led4fadeEiii+0x84> + 48c: 71 01 movw r14, r2 for (int j=i;j<0xFF;j++) { - 128: 60 2e mov r6, r16 - 12a: 71 2e mov r7, r17 - 12c: 0f 3f cpi r16, 0xFF ; 255 - 12e: 11 05 cpc r17, r1 - 130: e4 f2 brlt .-72 ; 0xea <_ZN3Led4fadeEiii+0x3a> - 132: e5 cf rjmp .-54 ; 0xfe <_ZN3Led4fadeEiii+0x4e> - fade(MAGENTA, RED, time); - } + 48e: 60 2e mov r6, r16 + 490: 71 2e mov r7, r17 + 492: 0f 3f cpi r16, 0xFF ; 255 + 494: 11 05 cpc r17, r1 + 496: e4 f2 brlt .-72 ; 0x450 <_ZN3Led4fadeEiii+0x3a> + 498: e5 cf rjmp .-54 ; 0x464 <_ZN3Led4fadeEiii+0x4e> + fade(BLUE, MAGENTA, time); + fade(MAGENTA, RED, time); } void Led::fade(int from, int to, int dur) { for (int i=0;i<0xFF;i++) { - 134: 0f 5f subi r16, 0xFF ; 255 - 136: 1f 4f sbci r17, 0xFF ; 255 - 138: 0f 3f cpi r16, 0xFF ; 255 - 13a: 11 05 cpc r17, r1 - 13c: 21 f0 breq .+8 ; 0x146 <_ZN3Led4fadeEiii+0x96> + 49a: 0f 5f subi r16, 0xFF ; 255 + 49c: 1f 4f sbci r17, 0xFF ; 255 + 49e: 0f 3f cpi r16, 0xFF ; 255 + 4a0: 11 05 cpc r17, r1 + 4a2: 21 f0 breq .+8 ; 0x4ac <_ZN3Led4fadeEiii+0x96> for(int k=0;k - 144: f7 cf rjmp .-18 ; 0x134 <_ZN3Led4fadeEiii+0x84> + 4a4: 1c 14 cp r1, r12 + 4a6: 1d 04 cpc r1, r13 + 4a8: 8c f3 brlt .-30 ; 0x48c <_ZN3Led4fadeEiii+0x76> + 4aa: f7 cf rjmp .-18 ; 0x49a <_ZN3Led4fadeEiii+0x84> for (int j=0;j: - //*Led::PORT |= (rgb<: + + LEDPORT &= ~((1< - while(1) { - fade(RED, YELLOW, time); - 180: 21 2f mov r18, r17 - 182: 30 e0 ldi r19, 0x00 ; 0 - 184: 46 e0 ldi r20, 0x06 ; 6 - 186: 50 e0 ldi r21, 0x00 ; 0 - 188: 64 e0 ldi r22, 0x04 ; 4 - 18a: 70 e0 ldi r23, 0x00 ; 0 - 18c: ce 01 movw r24, r28 - 18e: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - fade(YELLOW, GREEN, time); - 192: 21 2f mov r18, r17 - 194: 30 e0 ldi r19, 0x00 ; 0 - 196: 42 e0 ldi r20, 0x02 ; 2 - 198: 50 e0 ldi r21, 0x00 ; 0 - 19a: 66 e0 ldi r22, 0x06 ; 6 - 19c: 70 e0 ldi r23, 0x00 ; 0 - 19e: ce 01 movw r24, r28 - 1a0: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - fade(GREEN, CYAN, time); - 1a4: 21 2f mov r18, r17 - 1a6: 30 e0 ldi r19, 0x00 ; 0 - 1a8: 43 e0 ldi r20, 0x03 ; 3 - 1aa: 50 e0 ldi r21, 0x00 ; 0 - 1ac: 62 e0 ldi r22, 0x02 ; 2 - 1ae: 70 e0 ldi r23, 0x00 ; 0 - 1b0: ce 01 movw r24, r28 - 1b2: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - fade(CYAN, BLUE, time); - 1b6: 21 2f mov r18, r17 - 1b8: 30 e0 ldi r19, 0x00 ; 0 - 1ba: 41 e0 ldi r20, 0x01 ; 1 - 1bc: 50 e0 ldi r21, 0x00 ; 0 - 1be: 63 e0 ldi r22, 0x03 ; 3 - 1c0: 70 e0 ldi r23, 0x00 ; 0 - 1c2: ce 01 movw r24, r28 - 1c4: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - fade(BLUE, MAGENTA, time); - 1c8: 21 2f mov r18, r17 - 1ca: 30 e0 ldi r19, 0x00 ; 0 - 1cc: 45 e0 ldi r20, 0x05 ; 5 - 1ce: 50 e0 ldi r21, 0x00 ; 0 - 1d0: 61 e0 ldi r22, 0x01 ; 1 - 1d2: 70 e0 ldi r23, 0x00 ; 0 - 1d4: ce 01 movw r24, r28 - 1d6: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - fade(MAGENTA, RED, time); - 1da: 21 2f mov r18, r17 - 1dc: 30 e0 ldi r19, 0x00 ; 0 - 1de: 44 e0 ldi r20, 0x04 ; 4 - 1e0: 50 e0 ldi r21, 0x00 ; 0 - 1e2: 65 e0 ldi r22, 0x05 ; 5 - 1e4: 70 e0 ldi r23, 0x00 ; 0 - 1e6: ce 01 movw r24, r28 - 1e8: 0e 94 58 00 call 0xb0 ; 0xb0 <_ZN3Led4fadeEiii> - 1ec: c9 cf rjmp .-110 ; 0x180 <_ZN3Led7rainbowEh+0x14> + 4d2: 1f 93 push r17 + 4d4: cf 93 push r28 + 4d6: df 93 push r29 + 4d8: ec 01 movw r28, r24 + 4da: 16 2f mov r17, r22 + fade(RED, YELLOW, time); + 4dc: 26 2f mov r18, r22 + 4de: 30 e0 ldi r19, 0x00 ; 0 + 4e0: 46 e0 ldi r20, 0x06 ; 6 + 4e2: 50 e0 ldi r21, 0x00 ; 0 + 4e4: 64 e0 ldi r22, 0x04 ; 4 + 4e6: 70 e0 ldi r23, 0x00 ; 0 + 4e8: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> + fade(YELLOW, GREEN, time); + 4ec: 21 2f mov r18, r17 + 4ee: 30 e0 ldi r19, 0x00 ; 0 + 4f0: 42 e0 ldi r20, 0x02 ; 2 + 4f2: 50 e0 ldi r21, 0x00 ; 0 + 4f4: 66 e0 ldi r22, 0x06 ; 6 + 4f6: 70 e0 ldi r23, 0x00 ; 0 + 4f8: ce 01 movw r24, r28 + 4fa: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> + fade(GREEN, CYAN, time); + 4fe: 21 2f mov r18, r17 + 500: 30 e0 ldi r19, 0x00 ; 0 + 502: 43 e0 ldi r20, 0x03 ; 3 + 504: 50 e0 ldi r21, 0x00 ; 0 + 506: 62 e0 ldi r22, 0x02 ; 2 + 508: 70 e0 ldi r23, 0x00 ; 0 + 50a: ce 01 movw r24, r28 + 50c: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> + fade(CYAN, BLUE, time); + 510: 21 2f mov r18, r17 + 512: 30 e0 ldi r19, 0x00 ; 0 + 514: 41 e0 ldi r20, 0x01 ; 1 + 516: 50 e0 ldi r21, 0x00 ; 0 + 518: 63 e0 ldi r22, 0x03 ; 3 + 51a: 70 e0 ldi r23, 0x00 ; 0 + 51c: ce 01 movw r24, r28 + 51e: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> + fade(BLUE, MAGENTA, time); + 522: 21 2f mov r18, r17 + 524: 30 e0 ldi r19, 0x00 ; 0 + 526: 45 e0 ldi r20, 0x05 ; 5 + 528: 50 e0 ldi r21, 0x00 ; 0 + 52a: 61 e0 ldi r22, 0x01 ; 1 + 52c: 70 e0 ldi r23, 0x00 ; 0 + 52e: ce 01 movw r24, r28 + 530: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> + fade(MAGENTA, RED, time); + 534: 21 2f mov r18, r17 + 536: 30 e0 ldi r19, 0x00 ; 0 + 538: 44 e0 ldi r20, 0x04 ; 4 + 53a: 50 e0 ldi r21, 0x00 ; 0 + 53c: 65 e0 ldi r22, 0x05 ; 5 + 53e: 70 e0 ldi r23, 0x00 ; 0 + 540: ce 01 movw r24, r28 + 542: 0e 94 0b 02 call 0x416 ; 0x416 <_ZN3Led4fadeEiii> +} + 546: df 91 pop r29 + 548: cf 91 pop r28 + 54a: 1f 91 pop r17 + 54c: 08 95 ret -000001ee <_exit>: - 1ee: f8 94 cli +0000054e <_ZN6OutputC1Ev>: +#define OUTPUTDDR DDRC +#define OUTPUTM PINC4 +#define OUTPUTA PINC5 -000001f0 <__stop_program>: - 1f0: ff cf rjmp .-2 ; 0x1f0 <__stop_program> +Output::Output() { + OUTPUTDDR |= (1<: +} + +void Output::AudioOff() { + OUTPUTPORT &= ~(1<: +} + +void Output::AudioOn() { + OUTPUTPORT |= (1<: + 55e: ee 0f add r30, r30 + 560: ff 1f adc r31, r31 + +00000562 <__tablejump__>: + 562: 05 90 lpm r0, Z+ + 564: f4 91 lpm r31, Z + 566: e0 2d mov r30, r0 + 568: 09 94 ijmp + +0000056a <_exit>: + 56a: f8 94 cli + +0000056c <__stop_program>: + 56c: ff cf rjmp .-2 ; 0x56c <__stop_program> diff --git a/Button/Button/Debug/Button.map b/Button/Button/Debug/Button.map index 0442deb..3fd62ab 100644 --- a/Button/Button/Debug/Button.map +++ b/Button/Button/Debug/Button.map @@ -2,16 +2,35 @@ Archive member included because of file (symbol) c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o (exit) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + Button.o (__do_clear_bss) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + Button.o (__do_global_ctors) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) (__tablejump__) Discarded input sections .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o .text 0x00000000 0x0 Button.o - .bss 0x00000000 0x0 Button.o + .text 0x00000000 0x0 Can.o + .bss 0x00000000 0x0 Can.o + .text._ZN3Can21mcp2515_read_registerEh + 0x00000000 0x2c Can.o + .text._ZN3Can22mcp2515_read_rx_statusEv + 0x00000000 0x2e Can.o + .text._ZN3Can15can_get_messageEP10CANMessage + 0x00000000 0x124 Can.o .text 0x00000000 0x0 Led.o .bss 0x00000000 0x0 Led.o .text._ZN3Led6uninitEv 0x00000000 0x2 Led.o + .text 0x00000000 0x0 Output.o + .bss 0x00000000 0x0 Output.o + .text._ZN6Output8MotorOffEv + 0x00000000 0x4 Output.o + .text._ZN6Output7MotorOnEv + 0x00000000 0x4 Output.o .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) .text.libgcc.mul @@ -25,6 +44,44 @@ Discarded input sections 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) .text.libgcc.fmul 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) Memory Configuration @@ -42,7 +99,9 @@ Linker script and memory map LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o LOAD Button.o +LOAD Can.o LOAD Led.o +LOAD Output.o START GROUP LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libm.a END GROUP @@ -142,7 +201,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .rela.plt *(.rela.plt) -.text 0x00000000 0x1f2 +.text 0x00000000 0x56e *(.vectors) .vectors 0x00000000 0x54 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o 0x00000000 __vector_default @@ -162,84 +221,129 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.lowtext*) 0x00000054 __ctors_start = . *(.ctors) - 0x00000054 __ctors_end = . - 0x00000054 __dtors_start = . + .ctors 0x00000054 0x2 Button.o + 0x00000056 __ctors_end = . + 0x00000056 __dtors_start = . *(.dtors) - 0x00000054 __dtors_end = . + 0x00000056 __dtors_end = . SORT(*)(.ctors) SORT(*)(.dtors) *(.init0) - .init0 0x00000054 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o - 0x00000054 __init + .init0 0x00000056 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o + 0x00000056 __init *(.init0) *(.init1) *(.init1) *(.init2) - .init2 0x00000054 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o + .init2 0x00000056 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o *(.init2) *(.init3) *(.init3) *(.init4) + .init4 0x00000062 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + 0x00000062 __do_clear_bss *(.init4) *(.init5) *(.init5) *(.init6) + .init6 0x00000072 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + 0x00000072 __do_global_ctors *(.init6) *(.init7) *(.init7) *(.init8) *(.init8) *(.init9) - .init9 0x00000060 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o + .init9 0x00000088 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o *(.init9) *(.text) - .text 0x00000068 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o - 0x00000068 __vector_1 - 0x00000068 __vector_12 - 0x00000068 __bad_interrupt - 0x00000068 __vector_6 - 0x00000068 __vector_3 - 0x00000068 __vector_11 - 0x00000068 __vector_13 - 0x00000068 __vector_17 - 0x00000068 __vector_19 - 0x00000068 __vector_7 - 0x00000068 __vector_5 - 0x00000068 __vector_4 - 0x00000068 __vector_9 - 0x00000068 __vector_2 - 0x00000068 __vector_15 - 0x00000068 __vector_8 - 0x00000068 __vector_14 - 0x00000068 __vector_10 - 0x00000068 __vector_16 - 0x00000068 __vector_18 - 0x00000068 __vector_20 - 0x0000006c . = ALIGN (0x2) + .text 0x00000090 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o + 0x00000090 __vector_1 + 0x00000090 __vector_12 + 0x00000090 __bad_interrupt + 0x00000090 __vector_6 + 0x00000090 __vector_3 + 0x00000090 __vector_11 + 0x00000090 __vector_13 + 0x00000090 __vector_17 + 0x00000090 __vector_19 + 0x00000090 __vector_7 + 0x00000090 __vector_5 + 0x00000090 __vector_4 + 0x00000090 __vector_9 + 0x00000090 __vector_2 + 0x00000090 __vector_15 + 0x00000090 __vector_8 + 0x00000090 __vector_14 + 0x00000090 __vector_10 + 0x00000090 __vector_16 + 0x00000090 __vector_18 + 0x00000090 __vector_20 + 0x00000094 . = ALIGN (0x2) *(.text.*) - .text.main 0x0000006c 0x20 Button.o - 0x0000006c main + .text.main 0x00000094 0x7e Button.o + 0x00000094 main + .text._GLOBAL__sub_I_l + 0x00000112 0x1a Button.o + .text._ZN3Can8init_pinEv + 0x0000012c 0x12 Can.o + 0x0000012c _ZN3Can8init_pinEv + .text._ZN3Can8init_spiEv + 0x0000013e 0xa Can.o + 0x0000013e _ZN3Can8init_spiEv + .text._ZN3Can8spi_putcEh + 0x00000148 0xa Can.o + 0x00000148 _ZN3Can8spi_putcEh + .text._ZN3Can22mcp2515_write_registerEhh + 0x00000152 0x32 Can.o + 0x00000152 _ZN3Can22mcp2515_write_registerEhh + .text._ZN3Can18mcp2515_bit_modifyEhhh + 0x00000184 0x40 Can.o + 0x00000184 _ZN3Can18mcp2515_bit_modifyEhhh + .text._ZN3Can8init_canEv + 0x000001c4 0xda Can.o + 0x000001c4 _ZN3Can8init_canEv + .text._ZN3CanC2Ev + 0x0000029e 0x1c Can.o + 0x0000029e _ZN3CanC2Ev + 0x0000029e _ZN3CanC1Ev + .text._ZN3Can16can_send_messageEP10CANMessage + 0x000002ba 0x138 Can.o + 0x000002ba _ZN3Can16can_send_messageEP10CANMessage .text._ZN3Led4initEv - 0x0000008c 0x8 Led.o - 0x0000008c _ZN3Led4initEv + 0x000003f2 0x8 Led.o + 0x000003f2 _ZN3Led4initEv .text._ZN3LedC2Ev - 0x00000094 0x6 Led.o - 0x00000094 _ZN3LedC1Ev - 0x00000094 _ZN3LedC2Ev + 0x000003fa 0x6 Led.o + 0x000003fa _ZN3LedC1Ev + 0x000003fa _ZN3LedC2Ev .text._ZN3Led5colorEh - 0x0000009a 0x16 Led.o - 0x0000009a _ZN3Led5colorEh + 0x00000400 0x16 Led.o + 0x00000400 _ZN3Led5colorEh .text._ZN3Led4fadeEiii - 0x000000b0 0xbc Led.o - 0x000000b0 _ZN3Led4fadeEiii + 0x00000416 0xbc Led.o + 0x00000416 _ZN3Led4fadeEiii .text._ZN3Led7rainbowEh - 0x0000016c 0x82 Led.o - 0x0000016c _ZN3Led7rainbowEh - 0x000001ee . = ALIGN (0x2) + 0x000004d2 0x7c Led.o + 0x000004d2 _ZN3Led7rainbowEh + .text._ZN6OutputC2Ev + 0x0000054e 0x8 Output.o + 0x0000054e _ZN6OutputC2Ev + 0x0000054e _ZN6OutputC1Ev + .text._ZN6Output8AudioOffEv + 0x00000556 0x4 Output.o + 0x00000556 _ZN6Output8AudioOffEv + .text._ZN6Output7AudioOnEv + 0x0000055a 0x4 Output.o + 0x0000055a _ZN6Output7AudioOnEv + .text.libgcc 0x0000055e 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + 0x0000055e __tablejump2__ + 0x00000562 __tablejump__ + 0x0000056a . = ALIGN (0x2) *(.fini9) - .fini9 0x000001ee 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) - 0x000001ee _exit - 0x000001ee exit + .fini9 0x0000056a 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + 0x0000056a _exit + 0x0000056a exit *(.fini9) *(.fini8) *(.fini8) @@ -258,17 +362,22 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.fini1) *(.fini1) *(.fini0) - .fini0 0x000001ee 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .fini0 0x0000056a 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) *(.fini0) - 0x000001f2 _etext = . + 0x0000056e _etext = . -.data 0x00800060 0x0 load address 0x000001f2 +.data 0x00800060 0x0 load address 0x0000056e 0x00800060 PROVIDE (__data_start, .) *(.data) .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm32a.o .data 0x00800060 0x0 Button.o + .data 0x00800060 0x0 Can.o .data 0x00800060 0x0 Led.o + .data 0x00800060 0x0 Output.o .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) *(.data*) *(.rodata) *(.rodata*) @@ -277,21 +386,25 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 0x00800060 _edata = . 0x00800060 PROVIDE (__data_end, .) -.bss 0x00800060 0x0 +.bss 0x00800060 0x3 0x00800060 PROVIDE (__bss_start, .) *(.bss) + .bss 0x00800060 0x3 Button.o + 0x00800060 c + 0x00800061 o + 0x00800062 l *(.bss*) *(COMMON) - 0x00800060 PROVIDE (__bss_end, .) - 0x000001f2 __data_load_start = LOADADDR (.data) - 0x000001f2 __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x00800063 PROVIDE (__bss_end, .) + 0x0000056e __data_load_start = LOADADDR (.data) + 0x0000056e __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x00800060 0x0 - 0x00800060 PROVIDE (__noinit_start, .) +.noinit 0x00800063 0x0 + 0x00800063 PROVIDE (__noinit_start, .) *(.noinit*) - 0x00800060 PROVIDE (__noinit_end, .) - 0x00800060 _end = . - 0x00800060 PROVIDE (__heap_start, .) + 0x00800063 PROVIDE (__noinit_end, .) + 0x00800063 _end = . + 0x00800063 PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 *(.eeprom*) @@ -336,7 +449,9 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.comment) .comment 0x00000000 0x2f Button.o 0x30 (size before relaxing) + .comment 0x00000000 0x30 Can.o .comment 0x00000000 0x30 Led.o + .comment 0x00000000 0x30 Output.o .debug *(.debug) @@ -350,48 +465,66 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_sfnames *(.debug_sfnames) -.debug_aranges 0x00000000 0x68 +.debug_aranges 0x00000000 0x120 *(.debug_aranges) .debug_aranges - 0x00000000 0x20 Button.o + 0x00000000 0x28 Button.o .debug_aranges - 0x00000020 0x48 Led.o + 0x00000028 0x70 Can.o + .debug_aranges + 0x00000098 0x48 Led.o + .debug_aranges + 0x000000e0 0x40 Output.o .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x79b +.debug_info 0x00000000 0x1b32 *(.debug_info) - .debug_info 0x00000000 0x24c Button.o - .debug_info 0x0000024c 0x54f Led.o + .debug_info 0x00000000 0x6b5 Button.o + .debug_info 0x000006b5 0xdae Can.o + .debug_info 0x00001463 0x4db Led.o + .debug_info 0x0000193e 0x1f4 Output.o *(.gnu.linkonce.wi.*) -.debug_abbrev 0x00000000 0x34c +.debug_abbrev 0x00000000 0x8d3 *(.debug_abbrev) - .debug_abbrev 0x00000000 0x14c Button.o - .debug_abbrev 0x0000014c 0x200 Led.o + .debug_abbrev 0x00000000 0x2d0 Button.o + .debug_abbrev 0x000002d0 0x2fa Can.o + .debug_abbrev 0x000005ca 0x1eb Led.o + .debug_abbrev 0x000007b5 0x11e Output.o -.debug_line 0x00000000 0x262 +.debug_line 0x00000000 0x686 *(.debug_line) - .debug_line 0x00000000 0xe3 Button.o - .debug_line 0x000000e3 0x17f Led.o + .debug_line 0x00000000 0x1ca Button.o + .debug_line 0x000001ca 0x2ce Can.o + .debug_line 0x00000498 0x165 Led.o + .debug_line 0x000005fd 0x89 Output.o -.debug_frame 0x00000000 0x104 +.debug_frame 0x00000000 0x324 *(.debug_frame) - .debug_frame 0x00000000 0x34 Button.o - .debug_frame 0x00000034 0xd0 Led.o + .debug_frame 0x00000000 0x44 Button.o + .debug_frame 0x00000044 0x19c Can.o + .debug_frame 0x000001e0 0xe0 Led.o + .debug_frame 0x000002c0 0x64 Output.o -.debug_str 0x00000000 0x173 +.debug_str 0x00000000 0x4ae *(.debug_str) - .debug_str 0x00000000 0x146 Button.o + .debug_str 0x00000000 0x430 Button.o + 0x481 (size before relaxing) + .debug_str 0x00000430 0x3c Can.o + 0x33e (size before relaxing) + .debug_str 0x0000046c 0x23 Led.o 0x17f (size before relaxing) - .debug_str 0x00000146 0x2d Led.o - 0x197 (size before relaxing) + .debug_str 0x0000048f 0x1f Output.o + 0x150 (size before relaxing) -.debug_loc 0x00000000 0x3db +.debug_loc 0x00000000 0xb79 *(.debug_loc) - .debug_loc 0x00000000 0x48 Button.o - .debug_loc 0x00000048 0x393 Led.o + .debug_loc 0x00000000 0x47 Button.o + .debug_loc 0x00000047 0x721 Can.o + .debug_loc 0x00000768 0x3eb Led.o + .debug_loc 0x00000b53 0x26 Output.o .debug_macinfo *(.debug_macinfo) @@ -399,10 +532,12 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubtypes *(.debug_pubtypes) -.debug_ranges 0x00000000 0x90 +.debug_ranges 0x00000000 0x128 *(.debug_ranges) - .debug_ranges 0x00000000 0x10 Button.o - .debug_ranges 0x00000010 0x80 Led.o + .debug_ranges 0x00000000 0x18 Button.o + .debug_ranges 0x00000018 0x60 Can.o + .debug_ranges 0x00000078 0x80 Led.o + .debug_ranges 0x000000f8 0x30 Output.o .debug_macro *(.debug_macro) diff --git a/Button/Button/Debug/Button.srec b/Button/Button/Debug/Button.srec index 0b283fd..5c3f508 100644 --- a/Button/Button/Debug/Button.srec +++ b/Button/Button/Debug/Button.srec @@ -1,34 +1,89 @@ S00E0000427574746F6E2E737265639A -S11300000C942A000C9434000C9434000C943400A6 -S11300100C9434000C9434000C9434000C9434008C -S11300200C9434000C9434000C9434000C9434007C -S11300300C9434000C9434000C9434000C9434006C -S11300400C9434000C9434000C9434000C9434005C -S11300500C94340011241FBECFE5D8E0DEBFCDBF21 -S11300600E9436000C94F7000C940000CF93DF93A9 -S11300701F92CDB7DEB7CE0101960E944A00A59A21 -S113008065E0CE0101960E94B600FACF84B3876082 -S113009084BB08950E944600089585B3887F85BB7C -S11300A085B3962F9370892B6470682B65BB089574 -S11300B02F923F924F925F926F927F928F929F9274 -S11300C0AF92BF92CF92DF92EF92FF920F931F9362 -S11300D0CF93DF935C01862E942E690100E010E03B -S11300E0212C312C422C532C2AC0C62DD72D682DFF -S11300F0C5010E944D002196CF3FD105C1F71016CE -S1130100110654F4C42DD52D692DC5010E944D004E -S11301102196C017D107C1F78FEFE81AF80AEC143B -S1130120FD0421F407C07101602E712E0F3F1105EB -S1130130E4F2E5CF0F5F1F4F0F3F110521F01C14B0 -S11301401D048CF3F7CFDF91CF911F910F91FF9096 -S1130150EF90DF90CF90BF90AF909F908F907F9063 -S11301606F905F904F903F902F900895EC01162F61 -S11301702AE030E044E050E067E070E00E9458007C -S1130180212F30E046E050E064E070E0CE010E94B0 -S11301905800212F30E042E050E066E070E0CE01EC -S11301A00E945800212F30E043E050E062E070E00C -S11301B0CE010E945800212F30E041E050E063E07E -S11301C070E0CE010E945800212F30E045E050E05D -S11301D061E070E0CE010E945800212F30E044E03D -S11301E050E065E070E0CE010E945800C9CFF89459 -S10501F0FFCF3B +S11300000C942B000C9448000C9448000C94480069 +S11300100C9448000C9448000C9448000C9448003C +S11300200C9448000C9448000C9448000C9448002C +S11300300C9448000C9448000C9448000C9448001C +S11300400C9448000C9448000C9448000C9448000C +S11300500C944800890011241FBECFE5D8E0DEBF10 +S1130060CDBF20E0A0E6B0E001C01D92A336B207E8 +S1130070E1F710E0C6E5D0E004C02297FE010E943B +S1130080B102C435D107C9F70E944A000C94B502E5 +S11300900C940000CF93DF93CDB7DEB72C970FB647 +S11300A0F894DEBF0FBECDBF66E082E690E00E940A +S11300B0000283E291E09A8389831B8282E08C832D +S11300C08FEA8D838EEF8E832AE030E044E050E0A7 +S11300D066E070E082E690E00E940B0281E690E028 +S11300E00E94AD02BE016F5F7F4F80E690E00E94E8 +S11300F05D018FE99FE00197F1F700C0000081E600 +S113010090E00E94AB0265E082E690E00E94690202 +S1130110E5CF82E690E00E94FD0181E690E00E9436 +S1130120A70280E690E00E944F01089587B3806A99 +S113013087BB88B38F7188BBBC9AC49A089580E545 +S11301408DB981E08EB908956FB9779BFECF8FB1D9 +S113015008950F931F93CF93DF93EC01062F142F71 +S1130160C49862E00E94A400602FCE010E94A40003 +S1130170612FCE010E94A400C49ADF91CF911F91F8 +S11301800F910895FF920F931F93CF93DF93EC0188 +S1130190F62E042F122FC49865E00E94A4006F2D40 +S11301A0CE010E94A400602FCE010E94A400612F02 +S11301B0CE010E94A400C49ADF91CF911F910F91A8 +S11301C0FF900895CF93DF93EC01C49860EC0E94F4 +S11301D0A4008FE99FE00197F1F700C00000C49AE2 +S11301E08FE39CE90197F1F700C0000047E06AE261 +S11301F0CE010E94A90040E969E2CE010E94A90053 +S113020042E068E2CE010E94A90043E06BE2CE0125 +S11302100E94A90040E660E6CE010E94A90040E6E3 +S113022060E7CE010E94A90040E060E2CE010E9496 +S1130230A90040E061E2CE010E94A90040E062E230 +S1130240CE010E94A90040E063E2CE010E94A90011 +S113025040E064E2CE010E94A90040E065E2CE01E4 +S11302600E94A90040E066E2CE010E94A90040E09D +S113027067E2CE010E94A90040E06CE0CE010E943A +S1130280A90040E06DE0CE010E94A90020E040EE0C +S11302906FE0CE010E94C200DF91CF910895CF9309 +S11302A0DF93EC010E949600CE010E949F00CE01D4 +S11302B00E94E200DF91CF910895AF92BF92CF9256 +S11302C0DF92EF92FF920F931F93CF93DF931F92CE +S11302D0CDB7DEB78C016B01C49860EA0E94A4001C +S11302E06FEFC8010E94A40089836FEFC8010E94C8 +S11302F0A400C49A898182FF0AC0898184FF09C04D +S1130300898186FD69C06894BB24B2F805C0B12C0C +S113031003C06894BB24B1F8C4986B2D6064C80111 +S11303200E94A400F60180819181BC0176956795B5 +S11303307695679576956795C8010E94A400F601A5 +S113034060816295660F607EC8010E94A40060E02F +S1130350C8010E94A40060E0C8010E94A400F60144 +S1130360A380F8E0FA1518F46894AA24A3F8F60117 +S11303708281882331F06A2D6064C8010E94A40040 +S113038019C06A2DC8010E94A400AA2099F0760120 +S1130390F4E0EF0EF11CAA948A2D90E00596C80EA5 +S11303A0D91EF70161917F01C8010E94A400EC14D9 +S11303B0FD04B9F7C49A0000C498B11005C061E8FF +S11303C0C8010E94A40005C06B2D6068C8010E948A +S11303D0A400C49A81E001C080E00F90DF91CF9126 +S11303E01F910F91FF90EF90DF90CF90BF90AF904F +S11303F0089584B3876084BB08950E94F901089529 +S113040085B3887F85BB85B3962F9370892B6470E1 +S1130410682B65BB08952F923F924F925F926F9223 +S11304207F928F929F92AF92BF92CF92DF92EF9280 +S1130430FF920F931F93CF93DF935C01862E942E2C +S1130440690100E010E0212C312C422C532C2AC0ED +S1130450C62DD72D682DC5010E9400022196CF3FDD +S1130460D105C1F71016110654F4C42DD52D692DEC +S1130470C5010E9400022196C017D107C1F78FEF72 +S1130480E81AF80AEC14FD0421F407C07101602E87 +S1130490712E0F3F1105E4F2E5CF0F5F1F4F0F3FA1 +S11304A0110521F01C141D048CF3F7CFDF91CF91BB +S11304B01F910F91FF90EF90DF90CF90BF90AF907E +S11304C09F908F907F906F905F904F903F902F9070 +S11304D008951F93CF93DF93EC01162F262F30E05E +S11304E046E050E064E070E00E940B02212F30E00F +S11304F042E050E066E070E0CE010E940B02212F42 +S113050030E043E050E062E070E0CE010E940B0274 +S1130510212F30E041E050E063E070E0CE010E9422 +S11305200B02212F30E045E050E061E070E0CE01A5 +S11305300E940B02212F30E044E050E065E070E0BF +S1130540CE010E940B02DF91CF911F91089584B3D5 +S1130550806384BB0895AD980895AD9A0895EE0F15 +S1110560FF1F0590F491E02D0994F894FFCF4D S9030000FC diff --git a/Button/Button/Debug/Can.d b/Button/Button/Debug/Can.d new file mode 100644 index 0000000..97375be --- /dev/null +++ b/Button/Button/Debug/Can.d @@ -0,0 +1,50 @@ +Can.d Can.o: .././Can.cpp .././Can.h .././config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32a.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + .././mcp2515_defs.h + +.././Can.h: + +.././config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32a.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +.././mcp2515_defs.h: diff --git a/Button/Button/Debug/Makefile b/Button/Button/Debug/Makefile index 76217dd..20a8e33 100644 --- a/Button/Button/Debug/Makefile +++ b/Button/Button/Debug/Makefile @@ -37,7 +37,9 @@ SUBDIRS := # Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Button.cpp \ -../Led.cpp +../Can.cpp \ +../Led.cpp \ +../Output.cpp PREPROCESSING_SRCS += @@ -48,22 +50,30 @@ ASM_SRCS += OBJS += \ Button.o \ -Led.o +Can.o \ +Led.o \ +Output.o OBJS_AS_ARGS += \ Button.o \ -Led.o +Can.o \ +Led.o \ +Output.o C_DEPS += \ Button.d \ -Led.d +Can.d \ +Led.d \ +Output.d C_DEPS_AS_ARGS += \ Button.d \ -Led.d +Can.d \ +Led.d \ +Output.d OUTPUT_FILE_PATH +=Button.elf @@ -82,6 +92,10 @@ LIB_DEP+= + + + + ./%.o: .././%.cpp @echo Building file: $< @echo Invoking: AVR8/GNU C++ Compiler : diff --git a/Button/Button/Debug/Output.d b/Button/Button/Debug/Output.d new file mode 100644 index 0000000..9a33bfa --- /dev/null +++ b/Button/Button/Debug/Output.d @@ -0,0 +1,36 @@ +Output.d Output.o: .././Output.cpp .././Output.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32a.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h + +.././Output.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32a.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: diff --git a/Button/Button/Debug/makedep.mk b/Button/Button/Debug/makedep.mk index 941943e..a7378d0 100644 --- a/Button/Button/Debug/makedep.mk +++ b/Button/Button/Debug/makedep.mk @@ -4,5 +4,9 @@ Button.cpp +Can.cpp + Led.cpp +Output.cpp + diff --git a/Button/Button/Led.cpp b/Button/Button/Led.cpp index a37dd87..24c9132 100644 --- a/Button/Button/Led.cpp +++ b/Button/Button/Led.cpp @@ -6,18 +6,22 @@ */ #include "Led.h" +#define LEDPORT PORTC +#define LEDDDR DDRC +#define LEDPINR PINC2 +#define LEDPING PINC1 +#define LEDPINB PINC0 +#define LEDPINM PINC0 Led::Led() { init(); } void Led::init() { - //*Led::DDR |= (1< + +#ifndef OUTPUT_H_ +#define OUTPUT_H_ + + +class Output { + public: + Output(); + void AudioOn(); + void AudioOff(); + void MotorOn(); + void MotorOff(); +}; + + +#endif /* OUTPUT_H_ */ \ No newline at end of file diff --git a/Button/Button/config.h b/Button/Button/config.h new file mode 100644 index 0000000..be6c658 --- /dev/null +++ b/Button/Button/config.h @@ -0,0 +1,16 @@ +/* + * config.h + * + * Created: 03.11.2013 22:39:54 + * Author: netz + */ + + +#ifndef CONFIG_H_ +#define CONFIG_H_ + +#define F_CPU 16000000 + + + +#endif /* CONFIG_H_ */ \ No newline at end of file diff --git a/Button/Button/mcp2515_defs.h b/Button/Button/mcp2515_defs.h new file mode 100644 index 0000000..5212576 --- /dev/null +++ b/Button/Button/mcp2515_defs.h @@ -0,0 +1,280 @@ + +#ifndef MCP2515_DEFS_H +#define MCP2515_DEFS_H + +/** \name SPI Kommandos */ +/*@{*/ +#define SPI_RESET 0xC0 +#define SPI_READ 0x03 +#define SPI_READ_RX 0x90 +#define SPI_WRITE 0x02 +#define SPI_WRITE_TX 0x40 +#define SPI_RTS 0x80 +#define SPI_READ_STATUS 0xA0 +#define SPI_RX_STATUS 0xB0 +#define SPI_BIT_MODIFY 0x05 +/*@}*/ + +/** \name Adressen der Register des MCP2515 + * + * Die Redundanten Adressen von z.B. dem Register CANSTAT + * (0x0E, 0x1E, 0x2E, ...) wurden dabei nicht mit aufgelistet. + */ +/*@{*/ +#define RXF0SIDH 0x00 +#define RXF0SIDL 0x01 +#define RXF0EID8 0x02 +#define RXF0EID0 0x03 +#define RXF1SIDH 0x04 +#define RXF1SIDL 0x05 +#define RXF1EID8 0x06 +#define RXF1EID0 0x07 +#define RXF2SIDH 0x08 +#define RXF2SIDL 0x09 +#define RXF2EID8 0x0A +#define RXF2EID0 0x0B +#define BFPCTRL 0x0C +#define TXRTSCTRL 0x0D +#define CANSTAT 0x0E +#define CANCTRL 0x0F + +#define RXF3SIDH 0x10 +#define RXF3SIDL 0x11 +#define RXF3EID8 0x12 +#define RXF3EID0 0x13 +#define RXF4SIDH 0x14 +#define RXF4SIDL 0x15 +#define RXF4EID8 0x16 +#define RXF4EID0 0x17 +#define RXF5SIDH 0x18 +#define RXF5SIDL 0x19 +#define RXF5EID8 0x1A +#define RXF5EID0 0x1B +#define TEC 0x1C +#define REC 0x1D + +#define RXM0SIDH 0x20 +#define RXM0SIDL 0x21 +#define RXM0EID8 0x22 +#define RXM0EID0 0x23 +#define RXM1SIDH 0x24 +#define RXM1SIDL 0x25 +#define RXM1EID8 0x26 +#define RXM1EID0 0x27 +#define CNF3 0x28 +#define CNF2 0x29 +#define CNF1 0x2A +#define CANINTE 0x2B +#define CANINTF 0x2C +#define EFLG 0x2D + +#define TXB0CTRL 0x30 +#define TXB0SIDH 0x31 +#define TXB0SIDL 0x32 +#define TXB0EID8 0x33 +#define TXB0EID0 0x34 +#define TXB0DLC 0x35 +#define TXB0D0 0x36 +#define TXB0D1 0x37 +#define TXB0D2 0x38 +#define TXB0D3 0x39 +#define TXB0D4 0x3A +#define TXB0D5 0x3B +#define TXB0D6 0x3C +#define TXB0D7 0x3D + +#define TXB1CTRL 0x40 +#define TXB1SIDH 0x41 +#define TXB1SIDL 0x42 +#define TXB1EID8 0x43 +#define TXB1EID0 0x44 +#define TXB1DLC 0x45 +#define TXB1D0 0x46 +#define TXB1D1 0x47 +#define TXB1D2 0x48 +#define TXB1D3 0x49 +#define TXB1D4 0x4A +#define TXB1D5 0x4B +#define TXB1D6 0x4C +#define TXB1D7 0x4D + +#define TXB2CTRL 0x50 +#define TXB2SIDH 0x51 +#define TXB2SIDL 0x52 +#define TXB2EID8 0x53 +#define TXB2EID0 0x54 +#define TXB2DLC 0x55 +#define TXB2D0 0x56 +#define TXB2D1 0x57 +#define TXB2D2 0x58 +#define TXB2D3 0x59 +#define TXB2D4 0x5A +#define TXB2D5 0x5B +#define TXB2D6 0x5C +#define TXB2D7 0x5D + +#define RXB0CTRL 0x60 +#define RXB0SIDH 0x61 +#define RXB0SIDL 0x62 +#define RXB0EID8 0x63 +#define RXB0EID0 0x64 +#define RXB0DLC 0x65 +#define RXB0D0 0x66 +#define RXB0D1 0x67 +#define RXB0D2 0x68 +#define RXB0D3 0x69 +#define RXB0D4 0x6A +#define RXB0D5 0x6B +#define RXB0D6 0x6C +#define RXB0D7 0x6D + +#define RXB1CTRL 0x70 +#define RXB1SIDH 0x71 +#define RXB1SIDL 0x72 +#define RXB1EID8 0x73 +#define RXB1EID0 0x74 +#define RXB1DLC 0x75 +#define RXB1D0 0x76 +#define RXB1D1 0x77 +#define RXB1D2 0x78 +#define RXB1D3 0x79 +#define RXB1D4 0x7A +#define RXB1D5 0x7B +#define RXB1D6 0x7C +#define RXB1D7 0x7D +/*@}*/ + +/** \name Bitdefinition der verschiedenen Register */ +/*@{*/ + +/** \brief Bitdefinition von BFPCTRL */ +#define B1BFS 5 +#define B0BFS 4 +#define B1BFE 3 +#define B0BFE 2 +#define B1BFM 1 +#define B0BFM 0 + +/** \brief Bitdefinition von TXRTSCTRL */ +#define B2RTS 5 +#define B1RTS 4 +#define B0RTS 3 +#define B2RTSM 2 +#define B1RTSM 1 +#define B0RTSM 0 + +/** \brief Bitdefinition von CANSTAT */ +#define OPMOD2 7 +#define OPMOD1 6 +#define OPMOD0 5 +#define ICOD2 3 +#define ICOD1 2 +#define ICOD0 1 + +/** \brief Bitdefinition von CANCTRL */ +#define REQOP2 7 +#define REQOP1 6 +#define REQOP0 5 +#define ABAT 4 +#define CLKEN 2 +#define CLKPRE1 1 +#define CLKPRE0 0 + +/** \brief Bitdefinition von CNF3 */ +#define WAKFIL 6 +#define PHSEG22 2 +#define PHSEG21 1 +#define PHSEG20 0 + +/** \brief Bitdefinition von CNF2 */ +#define BTLMODE 7 +#define SAM 6 +#define PHSEG12 5 +#define PHSEG11 4 +#define PHSEG10 3 +#define PHSEG2 2 +#define PHSEG1 1 +#define PHSEG0 0 + +/** \brief Bitdefinition von CNF1 */ +#define SJW1 7 +#define SJW0 6 +#define BRP5 5 +#define BRP4 4 +#define BRP3 3 +#define BRP2 2 +#define BRP1 1 +#define BRP0 0 + +/** \brief Bitdefinition von CANINTE */ +#define MERRE 7 +#define WAKIE 6 +#define ERRIE 5 +#define TX2IE 4 +#define TX1IE 3 +#define TX0IE 2 +#define RX1IE 1 +#define RX0IE 0 + +/** \brief Bitdefinition von CANINTF */ +#define MERRF 7 +#define WAKIF 6 +#define ERRIF 5 +#define TX2IF 4 +#define TX1IF 3 +#define TX0IF 2 +#define RX1IF 1 +#define RX0IF 0 + +/** \brief Bitdefinition von EFLG */ +#define RX1OVR 7 +#define RX0OVR 6 +#define TXB0 5 +#define TXEP 4 +#define RXEP 3 +#define TXWAR 2 +#define RXWAR 1 +#define EWARN 0 + +/** \brief Bitdefinition von TXBnCTRL (n = 0, 1, 2) */ +#define ABTF 6 +#define MLOA 5 +#define TXERR 4 +#define TXREQ 3 +#define TXP1 1 +#define TXP0 0 + +/** \brief Bitdefinition von RXB0CTRL */ +#define RXM1 6 +#define RXM0 5 +#define RXRTR 3 +#define BUKT 2 +#define BUKT1 1 +#define FILHIT0 0 + +/** \brief Bitdefinition von TXBnSIDL (n = 0, 1) */ +#define EXIDE 3 + +/** + * \brief Bitdefinition von RXB1CTRL + * \see RXM1, RXM0, RXRTR und FILHIT0 sind schon fuer RXB0CTRL definiert + */ +#define FILHIT2 2 +#define FILHIT1 1 + +/** \brief Bitdefinition von RXBnSIDL (n = 0, 1) */ +#define SRR 4 +#define IDE 3 + +/** + * \brief Bitdefinition von RXBnDLC (n = 0, 1) + * \see TXBnDLC (gleiche Bits) + */ +#define RTR 6 +#define DLC3 3 +#define DLC2 2 +#define DLC1 1 +#define DLC0 0 + +/*@}*/ +#endif // MCP2515_DEFS_H diff --git a/Hardware/BackupFiles/Button.T3000A b/Hardware/BackupFiles/Button.T3000A index 43ac77d..8fa3dd2 100644 Binary files a/Hardware/BackupFiles/Button.T3000A and b/Hardware/BackupFiles/Button.T3000A differ diff --git a/Hardware/BackupFiles/Mainboad.T3000A b/Hardware/BackupFiles/Mainboad.T3000A index 278c62c..605ff82 100644 Binary files a/Hardware/BackupFiles/Mainboad.T3000A and b/Hardware/BackupFiles/Mainboad.T3000A differ diff --git a/Hardware/BackupFiles/Mainboad.T3000B b/Hardware/BackupFiles/Mainboad.T3000B index 5aae68e..605ff82 100644 Binary files a/Hardware/BackupFiles/Mainboad.T3000B and b/Hardware/BackupFiles/Mainboad.T3000B differ diff --git a/Hardware/BackupFiles/Mainboad.T3000C b/Hardware/BackupFiles/Mainboad.T3000C index 3d95dcc..605ff82 100644 Binary files a/Hardware/BackupFiles/Mainboad.T3000C and b/Hardware/BackupFiles/Mainboad.T3000C differ diff --git a/Mainboard/Mainboard.atsln b/Mainboard/Mainboard.atsln index f299e7f..51c3106 100644 --- a/Mainboard/Mainboard.atsln +++ b/Mainboard/Mainboard.atsln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Atmel Studio Solution File, Format Version 11.00 -Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Mainboard", "Mainboard\Mainboard.cproj", "{839C4697-AB18-4132-8E80-F57DDB26ADEB}" +Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "Mainboard", "Mainboard\Mainboard.cppproj", "{5CB60FA6-7C7B-4EC4-8B17-FC387A0E899B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Global Release|AVR = Release|AVR EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Debug|AVR.ActiveCfg = Debug|AVR - {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Debug|AVR.Build.0 = Debug|AVR - {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Release|AVR.ActiveCfg = Release|AVR - {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Release|AVR.Build.0 = Release|AVR + {5CB60FA6-7C7B-4EC4-8B17-FC387A0E899B}.Debug|AVR.ActiveCfg = Debug|AVR + {5CB60FA6-7C7B-4EC4-8B17-FC387A0E899B}.Debug|AVR.Build.0 = Debug|AVR + {5CB60FA6-7C7B-4EC4-8B17-FC387A0E899B}.Release|AVR.ActiveCfg = Release|AVR + {5CB60FA6-7C7B-4EC4-8B17-FC387A0E899B}.Release|AVR.Build.0 = Release|AVR EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mainboard/Mainboard.atsuo b/Mainboard/Mainboard.atsuo index eb3ab9b..b7d3e5d 100644 Binary files a/Mainboard/Mainboard.atsuo and b/Mainboard/Mainboard.atsuo differ diff --git a/Mainboard/Mainboard/Can.cpp b/Mainboard/Mainboard/Can.cpp new file mode 100644 index 0000000..dbb32a1 --- /dev/null +++ b/Mainboard/Mainboard/Can.cpp @@ -0,0 +1,366 @@ +/* + * Can.cpp + * + * Created: 03.11.2013 22:09:17 + * Author: netz + */ + +#include "Can.h" + +#define CANDDR_SPI DDRB +#define CANPORT_SPI PORTB +#define CANP_MISO PINB3 +#define CANP_MOSI PINB2 +#define CANP_SCK PINB1 + +#define CANDDR_CS DDRB +#define CANPORT_CS PORTB +#define CANP_CS PINB4 + +#define CANDDR_RST DDRD +#define CANPORT_RST PORTD +#define CANP_RST PIND6 + +Can::Can() { + Led(0).color(Led::GREEN); + _delay_ms(100); + Led(0).color(Led::BLACK); + _delay_ms(100); + init_pin(); + init_spi(); + init_can(); +} + +void Can::init_pin() { + //SPI Pins + CANDDR_SPI |= (1< 1 uS) + * + * Sync Seg = 1TQ + * Prop Seg = (PRSEG + 1) * TQ = 1 TQ + * Phase Seg1 = (PHSEG1 + 1) * TQ = 3 TQ + * Phase Seg2 = (PHSEG2 + 1) * TQ = 3 TQ + * + * Bus speed = 1 / (Total # of TQ) * TQ + * = 1 / 8 * TQ = 125 kHz + */ + //return; + // BRP = 7 + mcp2515_write_register( CNF1, (1<id>>3)); + spi_putc((uint8_t) (p_message->id<<5)); + + // Extended ID + spi_putc(0x00); + spi_putc(0x00); + + uint8_t length = p_message->length; + + if (length > 8) { + length = 8; + } + + // Ist die Nachricht ein "Remote Transmit Request" ? + if (p_message->rtr) + { + /* Ein RTR hat zwar eine Laenge, + aber enthaelt keine Daten */ + + // Nachrichten Laenge + RTR einstellen + spi_putc((1<data[i]); + } + } + CANPORT_CS |= (1<id = (uint16_t) spi_putc(0xff) << 3; + p_message->id |= (uint16_t) spi_putc(0xff) >> 5; + + spi_putc(0xff); + spi_putc(0xff); + + // Laenge auslesen + uint8_t length = spi_putc(0xff) & 0x0f; + p_message->length = length; + + // Daten auslesen + for (uint8_t i=0;idata[i] = spi_putc(0xff); + } + + CANPORT_CS |= (1<rtr = 1; + } else { + p_message->rtr = 0; + } + + // Interrupt Flag loeschen + if (bit_is_set(status,6)) { + mcp2515_bit_modify(CANINTF, (1< +#include +#include "mcp2515_defs.h" +#include "Led.h" + +#ifndef CAN_H_ +#define CAN_H_ + +//#define DDR_CS DDRB +//#define PORT_CS PORTB +//#define P_CS 2 + +typedef struct +{ + uint16_t id; + uint8_t rtr; + uint8_t length; + uint8_t data[8]; +} CANMessage; + +class Can { + private: + void init_spi(); + void init_can(); + void init_pin(); + uint8_t spi_putc( uint8_t data ); + void mcp2515_write_register( uint8_t adress, uint8_t data ); + uint8_t mcp2515_read_register(uint8_t adress); + void mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data); + uint8_t mcp2515_read_rx_status(void); + public: + Can(); + uint8_t can_send_message(CANMessage *p_message); + uint8_t can_get_message(CANMessage *p_message); +}; + + +#endif /* CAN_H_ */ \ No newline at end of file diff --git a/Mainboard/Mainboard/Debug/Can.d b/Mainboard/Mainboard/Debug/Can.d new file mode 100644 index 0000000..13640cd --- /dev/null +++ b/Mainboard/Mainboard/Debug/Can.d @@ -0,0 +1,52 @@ +Can.d Can.o: .././Can.cpp .././Can.h .././config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + .././mcp2515_defs.h .././Led.h + +.././Can.h: + +.././config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +.././mcp2515_defs.h: + +.././Led.h: diff --git a/Mainboard/Mainboard/Debug/Led.d b/Mainboard/Mainboard/Debug/Led.d new file mode 100644 index 0000000..ff93166 --- /dev/null +++ b/Mainboard/Mainboard/Debug/Led.d @@ -0,0 +1,36 @@ +Led.d Led.o: .././Led.cpp .././Led.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h + +.././Led.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: diff --git a/Mainboard/Mainboard/Debug/Mainboard.d b/Mainboard/Mainboard/Debug/Mainboard.d index 2a4f5bd..826db40 100644 --- a/Mainboard/Mainboard/Debug/Mainboard.d +++ b/Mainboard/Mainboard/Debug/Mainboard.d @@ -1,32 +1,28 @@ -Mainboard.d Mainboard.o: .././Mainboard.c .././config.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ +Mainboard.d Mainboard.o: .././Mainboard.cpp .././config.h .././Led.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h \ - .././led.h .././rs232.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h \ - .././usb.h .././usb_user.h \ - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h \ - .././usb_user_config.h + .././Can.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + .././mcp2515_defs.h .././config.h: -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: +.././Led.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: @@ -34,18 +30,6 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8- c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: - c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: @@ -58,22 +42,12 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8- c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h: +.././Can.h: -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: -.././led.h: +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: -.././rs232.h: +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h: - -.././usb.h: - -.././usb_user.h: - -c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h: - -.././usb_user_config.h: +.././mcp2515_defs.h: diff --git a/Mainboard/Mainboard/Debug/Mainboard.elf b/Mainboard/Mainboard/Debug/Mainboard.elf index 5fdb43d..be5ffc8 100644 Binary files a/Mainboard/Mainboard/Debug/Mainboard.elf and b/Mainboard/Mainboard/Debug/Mainboard.elf differ diff --git a/Mainboard/Mainboard/Debug/Mainboard.hex b/Mainboard/Mainboard/Debug/Mainboard.hex index 823aed5..49d356c 100644 --- a/Mainboard/Mainboard/Debug/Mainboard.hex +++ b/Mainboard/Mainboard/Debug/Mainboard.hex @@ -1,244 +1,62 @@ -:100000000C9469000C9486000C9486000C94860075 -:100010000C9486000C9486000C9486000C94860048 -:100020000C9486000C9486000C9486000C94230398 -:100030000C944B030C9486000C9486000C94860060 -:100040000C9486000C9486000C9486000C94860018 -:100050000C9486000C9486000C9486000C94860008 -:100060000C9486000C9486000C9486000C948600F8 -:100070000C94860012010002FF000010ADDEEEBEFF -:1000800000010102030104030904140342006C008F -:10009000750062006200460069007300680000009D -:1000A00020034800610063006B00650072002D00B2 -:1000B0004A0065006F007000610072006400790002 -:1000C00000000E03300030003000300030003100FE -:1000D000000011241FBECFEFD4E0DEBFCDBF11E082 -:1000E000A0E0B1E0ECEEFEE002C005900D92AE3370 -:1000F000B107D9F721E0AEE3B1E001C01D92AA3407 -:10010000B207E1F70E943B010C9474070C940000C5 -:1001100095B19F7195B995B18295880F807E982B86 -:1001200095B9089584B1806E84B908952F923F9255 -:100130004F925F926F927F928F929F92AF92BF92F7 -:10014000CF92DF92EF92FF920F931F93CF93DF93A3 -:100150007C018B015A01C0E0D0E0212C312C422CD3 -:10016000532C2CC0862C972CC7010E9488008FEF3F -:10017000881A980A8FEF88169104B1F71C161D068D -:100180005CF4842C952CC8010E9488008FEF881A9B -:10019000980A8C169D06B9F78FEFC81AD80ACA14A8 -:1001A000DB0421F407C061016C2E7D2ECF3FD10509 -:1001B000CCF2E4CF2196CF3FD10521F01A141B04D5 -:1001C00094F3F8CFDF91CF911F910F91FF90EF90B3 -:1001D000DF90CF90BF90AF909F908F907F906F9067 -:1001E0005F904F903F902F900895C82F4AE050E0C5 -:1001F00064E070E087E090E00E9496004C2F50E0B1 -:1002000066E070E084E090E00E9496004C2F50E0A1 -:1002100062E070E086E090E00E9496004C2F50E093 -:1002200063E070E082E090E00E9496004C2F50E086 -:1002300061E070E083E090E00E9496004C2F50E077 -:1002400065E070E081E090E00E9496004C2F50E065 -:1002500064E070E085E090E00E949600CFCF86E0F9 -:1002600090E00E94880078940E9492000E945701BA -:100270003F98479A08950E942F0182E090E00E94E3 -:10028000880085E00E94F500FCCFCF93C82F8A300C -:1002900019F48DE00E944501E8ECF0E0908195FFB3 -:1002A000FDCFC093CE0080E090E0CF91089586E02E -:1002B0008093CA00E9ECF0E080818860808387E663 -:1002C0008093CC0080E091E09093470180934601B9 -:1002D0000895CF93DF93CDB7DEB760970FB6F8944C -:1002E000DEBF0FBECDBF2CE0E5E1F1E0DE011196EF -:1002F00001900D922A95E1F71D861E861F86188AA9 -:10030000FC012081233C51F48181813049F460E17A -:10031000CE0101960E94D10281E003C080E001C0BD -:1003200080E060960FB6F894DEBF0FBECDBFDF91C0 -:10033000CF910895CF93DF93CDB7DEB7A0970FB6D7 -:10034000F894DEBF0FBECDBF8130A1F440E2BE0104 -:100350006F5F7F4F0E94AC02882361F018A2CE012C -:1003600001960E944F0740E2BE016F5F7F4F82E817 -:100370000E94F402A0960FB6F894DEBF0FBECDBF68 -:10038000DF91CF9108952F923F924F925F927F928B -:100390008F929F92AF92CF92DF92EF92FF920F9344 -:1003A0001F93CF93DF93282F90E06CE070E00E94C2 -:1003B0000506FC01EB5DFE4F822F90E06CE070E0E3 -:1003C0000E940506895D9E4F41E00F2EF9EECF2E6B -:1003D000D12CF02D0F2EFBEEEF2EF12CF02DAA24B8 -:1003E000A3940CEE10E06DEE70E00F2EF0EF4F2EA8 -:1003F000512CF02D6894992492F8812C68947724DC -:1004000074F8DF0120812F3F59F1E6014883E701AD -:10041000A8822081E80128831C019C012150310918 -:10042000E9012881203841F0203441F0203241F0A8 -:10043000203141F4372D07C030E405C030E303C05C -:1004400030E201C0382DE1012881232BEB01288304 -:100450002C9120FF03C0D2011C9202C0E2019882BD -:100460004F5F33960396453061F6EAEEF0E08EE199 -:1004700080831082DF91CF911F910F91FF90EF90B9 -:10048000DF90CF90AF909F908F907F905F904F9034 -:100490003F902F900895E8EEF0E080818570E9F3B9 -:1004A0000895AF92BF92CF92DF92EF92FF920F9397 -:1004B0001F93CF93DF93D82ED62FC72FE42FF0E0D2 -:1004C0002E173F0710F4C22E01C0C42E0E944B020B -:1004D0000D2F1C2F6894AA24A4F80F2EF8EEEF2EEF -:1004E000F12CF02D0F2EFEEFBF2EF02DC1EFD0E03E -:1004F0002C2D80E18C1508F42A2D2223D9F0F80147 -:10050000922FDD2011F0808101C084918883915069 -:1005100031969111F6CF622F615070E06F5F7F4F7F -:10052000060F171FC21AF701B082C11007C0203191 -:1005300029F007C0F701B082CC2019F00E944B02CD -:10054000D7CFDF91CF911F910F91FF90EF90DF9068 -:10055000CF90BF90AF9008958093E9009091F20002 -:10056000941708F4492F4423D1F0362FE62FF72FA4 -:10057000A1EFB0E09C9191939E2F931B9417D0F321 -:100580009091F20091110BC021E030E002C0220FE7 -:10059000331F8A95E2F7EAEEF0E020831082842F81 -:1005A00008956623E9F01092E900E8EEF0E020817A -:1005B00020FFFDCF2091F200211114C0282FE82F39 -:1005C000F92FA1EFB0E081918C938E2F821B8617BB -:1005D000D0F3E8EEF0E080818E7F808381E00895A3 -:1005E00080E0089580E00895CF93DF93442329F1BC -:1005F0008093E900E8EEF0E0808180FFFDCF8091FC -:10060000F20081111CC0962FE62FF72FA8EEB0E064 -:10061000C1EFD0E08C9185FF02C080818883319644 -:100620008E2F891B8417B0F3E8EEF0E080818E7F77 -:1006300080838FE7808381E003C080E001C080E099 -:10064000DF91CF9108951F920F920FB60F92112450 -:100650008F93EF93FF93E1EEF0E08081108283FFB0 -:1006600012C01092E90081E08093EB001092EC0040 -:1006700082E18093ED0088E08093F00010923E01CB -:100680008FEF80930E01FF91EF918F910F900FBE2E -:100690000F901F9018951F920F920FB60F92112472 -:1006A0003F924F925F926F927F928F929F92AF9202 -:1006B000BF92CF92DF92EF92FF920F931F932F93EF -:1006C0003F934F935F936F937F938F939F93AF93DA -:1006D000BF93EF93FF93CF93DF93CDB7DEB72A9706 -:1006E000DEBFCDBF8091F40080FF58C21092E900B8 -:1006F0008091E80083FF1FC2E1EFF0E080818983F1 -:1007000080818A83208130E03C832B834081942F39 -:1007100080E0822B932B9C838B83208130E03E836F -:100720002D834081942F80E0822B932B9E838D8399 -:10073000208130E038872F834081942F80E0822B06 -:10074000932B98878F8382EF8093E8008A8186308D -:1007500009F030C18B819C81811523E0920709F457 -:10076000FDC048F4811551E0950789F0811592404C -:1007700009F01CC126C08230B3E09B0709F402C116 -:1007800008F4F6C08330934009F010C105C1E4E7D6 -:10079000F0E044912F813885BF0180E00E94510232 -:1007A0000CC29A2F50815F3F09F49B2F490F815053 -:1007B00033968111F6CF2F5F3F4F2230310539F448 -:1007C00010C020E030E040E014E0A1E0B0E0C9015A -:1007D0006CE070E00E940506FC01EB5DFE4F812F8E -:1007E000E0CF842F880F880F880F841B0F2EFBE12A -:1007F000EF2EF02DE80E8E2D90E00E941706082FA8 -:10080000192F89E0D8018C9382E011968C9311976F -:100810001296EC92129713961C92139714968C933F -:10082000149781E015968C93159716961C9216973F -:1008300080EC17968C9317978AEF18968C93F80193 -:1008400039961A86198644E0A12C88248394F82CC2 -:100850009A2C0F2EF9E07F2EF02DBB24BA940F2E88 -:10086000F7E0CF2EF02D0F2EF5E0DF2EF02D68945F -:10087000662461F80F2EF3E05F2EF02D56C07F2D19 -:10088000DC012C912F3F09F4792D670F515003960D -:100890005111F5CF70824183428213826483B58205 -:1008A0001682B782108639966623C1F1832F932D65 -:1008B0006CE070E00E9405069C012A5D3E4F482CCA -:1008C000C901B90161507109DB015C915F3F01F120 -:1008D000C082D182652F67956627679564296283F8 -:1008E000513441F0503441F0513841F0503841F426 -:1008F000562D07C05F2D05C05F2D03C0562D01C0CA -:10090000552D5383DC018C91848315821682379692 -:1009100043942D5F3F4FB5E04B12D2CFA985BA85E6 -:100920001196BA87A987129771F04984342D3A84B9 -:10093000842D932D6CE070E00E9405068B5D9E4F28 -:10094000542F6A2D9CCF2F8138854E2DB80181E020 -:100950000E945102C8010E94B2062FC1E6E8F0E0F1 -:1009600044912F813885BF0180E00E94510225C14A -:10097000EAE8F0E044912F813885BF0180E00E94D1 -:1009800051021BC1E0EAF0E044912F813885BF019C -:1009900080E00E94510211C1E2ECF0E044912F810D -:1009A0003885BF0180E00E94510207C181E2809337 -:1009B000EB0003C1853071F48EEF8093E800E8EE20 -:1009C000F0E0808180FFFDCF8B819C8180688093E7 -:1009D000E300F3C08930C1F49981911160C08B812B -:1009E0009C81019769F481E080933E018EEF8093B2 -:1009F000E80010920E0180910E010E94C301DDC03B -:100A000081E28093EB00D9C0883089F499819038D5 -:100A100009F057C0E8EEF0E0808180FFFDCF8091C3 -:100A20003E018093F1008EEF8093E800C6C08111F3 -:100A30001CC0E8EEF0E0808180FFFDCF8981823824 -:100A400059F48D81E9EEF0E080838091EB0085FB25 -:100A5000882780F9108201C080E0E1EFF0E0808318 -:100A600010828EEF8093E800A8C08B30C1F489819A -:100A7000803211F0811155C08D819E8182309105A7 -:100A800050F480930E018EEF8093E80080910E0168 -:100A90000E94C30192C081E28093EB008EC08A3035 -:100AA00081F489818038E9F5E8EEF0E0808180FF0B -:100AB000FDCF80910E018093F1008EEF8093E800CE -:100AC0007CC0813011F0833061F58981823049F535 -:100AD0008B819C81892B29F58D819E818F77992728 -:100AE000382F31503430E8F43EEF3093E8008093F3 -:100AF000E9002A81233021F481E28093EB005DC07C -:100B000099E19093EB0021E030E0F90102C0EE0F93 -:100B1000FF1F8A95E2F7CF01EAEEF0E080831082B2 -:100B20004CC0CE0101960E946901811146C081E24C -:100B30008093EB0042C081E28093EB002FC0F22E45 -:100B4000408150E0022E02C0559547950A94E2F785 -:100B500040FF1BC0DB012C93D6018C9182FF13C098 -:100B60008091F200882341F06091F20070E0822FC2 -:100B70000E949A01F092E900E8EEF0E089EF8083AC -:100B80008FE780831AC0D8019C932F5F3F4F253099 -:100B90003105A9F681E28093EB000FC021E030E03F -:100BA000E4EFF0E069EE70E00F2EF8EECF2ED12CDE -:100BB000F02D0BEE10E091E2C2CF2A960FB6F8941A -:100BC000DEBF0FBECDBFDF91CF91FF91EF91BF91FF -:100BD000AF919F918F917F916F915F914F913F91D5 -:100BE0002F911F910F91FF90EF90DF90CF90BF90CA -:100BF000AF909F908F907F906F905F904F903F90BD -:100C00000F900FBE0F901F9018955527002480FF5E -:100C100002C0060E571F660F771F6115710521F080 -:100C200096958795009799F7952F802D08950F93A6 -:100C30001F93CF93DF938230910510F482E090E010 -:100C4000E0914201F091430120E030E0C0E0D0E0CB -:100C500023C04081518148175907A8F04817590708 -:100C600061F482819381209719F09B838A832EC03F -:100C7000909343018093420129C02115310529F049 -:100C80004217530710F0A90102C0BE01DF01028123 -:100C90001381EF019A01F8013097D9F6211531053A -:100CA00009F1281B390B2430310590F412968D91EF -:100CB0009C9113976115710521F0FB019383828349 -:100CC00004C09093430180934201FD01329644C0D9 -:100CD000FD01E20FF31F81939193225031092D936F -:100CE0003C933AC02091400130914101232B41F4C3 -:100CF0002091110130911201309341012093400164 -:100D000020910F01309110012115310541F42DB7CB -:100D10003EB74091130150911401241B350BE09113 -:100D20004001F0914101E217F307A0F42E1B3F0BA5 -:100D30002817390778F0AC014E5F5F4F241735074D -:100D400048F04E0F5F1F5093410140934001819343 -:100D5000919302C0E0E0F0E0CF01DF91CF911F91CD -:100D60000F910895EF92FF920F931F93CF93DF930C -:100D7000009709F48FC0DC01129713961C921E9203 -:100D80001297E0904201F0904301E114F10489F4DC -:100D90002D913C911197280F391F8091400190911E -:100DA00041018217930789F5B0934101A093400157 -:100DB00071C0E70120E030E001C0EA01CA17DB079B -:100DC00038F44A815B819E0141155105B1F722C07B -:100DD000BC0162507109FB01D383C2830081118180 -:100DE000AC01400F511F4C175D0761F448815981D8 -:100DF000400F511F4E5F5F4F518340834A815B819B -:100E0000538342832115310529F4B0934301A09304 -:100E1000420140C0F901B383A283E901699179914C -:100E2000C60FD71FAC17BD0779F4DC015E914E9158 -:100E3000460F571F4E5F5F4F5183408312968D912F -:100E40009C91139793838283A0E0B0E002C0D70106 -:100E50007C01F701828193810097C9F7C70102964F -:100E600020813181820F931F2091400130914101F7 -:100E70002817390779F4109729F41092430110923A -:100E8000420104C013961C921E921297F0924101E7 -:100E9000E0924001CDB7DEB7E6E00C946507DC01D7 -:100EA0006C9161566A3108F0605E6F5B6D93C1F7BB -:100EB00008952A88398848885F846E847D848C846C -:100EC0009B84AA84B984C884DF80EE80FD800C8175 -:100ED0001B81AA81B981CE0FD11D0FB6F894DEBF58 -:0C0EE0000FBECDBFED010895F894FFCFC8 -:100EEC000000000200000000450100000000FF00AF -:100EFC00004A01200056657273696F6E20312E30E6 -:100F0C000000000000802002812002FF2002FF2050 -:0E0F1C0002C12002FF2002FF2002FF2002007F +:100000000C943B000C9458000C9458000C9458002D +:100010000C9458000C9458000C9458000C94580000 +:100020000C9458000C9458000C9458000C945800F0 +:100030000C9458000C9458000C9458000C945800E0 +:100040000C9458000C9458000C9458000C945800D0 +:100050000C9458000C9458000C9458000C945800C0 +:100060000C9458000C9458000C9458000C945800B0 +:100070000C945800D40111241FBECFEFD4E0DEBF92 +:10008000CDBF21E0A0E0B1E001C01D92A230B207D7 +:10009000E1F710E0C6E7D0E004C02297FE010E941D +:1000A000DF01C437D107C9F70E94CE010C94E301E8 +:1000B0000C94000084B1866084B985B1817F85B9D4 +:1000C000249A2C9A569A5E988FE39CE90197F1F74F +:1000D00000C000005E9A8FE39CE90197F1F700C031 +:1000E000000008951CBC2FEF81EE94E02150804069 +:1000F0009040E1F700C0000083E58CBD08951F9398 +:10010000CF93DF9300D000D01F92CDB7DEB7162F6C +:1001100061E0CE0105960E94C4011EBD2FEF33ECB5 +:1001200089E0215030408040E1F700C0000060E0ED +:10013000CE0104960E94C4019FEF23EC39E0915058 +:1001400020403040E1F700C000000DB407FC31C092 +:100150000DB406FE0FC067E0CE0103960E94C401F5 +:100160008AEA96EE26E931E0815090402040304006 +:10017000D9F7000065E0CE0102960E94C4018FEF1E +:1001800091EE24E0815090402040E1F700C0000053 +:1001900060E0CE0101960E94C4013FEF81EE94E041 +:1001A000315080409040E1F700C000000DB407FEE0 +:1001B000CFCF8EB50F900F900F900F900F90DF91D3 +:1001C000CF911F9108950F931F93CF93DF93EC016D +:1001D000062F142F2C9862E00E947F00602FCE0122 +:1001E0000E947F00612FCE010E947F002C9ADF9138 +:1001F000CF911F910F910895FF920F931F93CF936B +:10020000DF93EC01F62E042F122F2C9865E00E944C +:100210007F006F2DCE010E947F00602FCE010E94D3 +:100220007F00612FCE010E947F002C9ADF91CF9139 +:100230001F910F91FF900895CF93DF93EC012C98BD +:1002400060EC0E947F008FE99FE00197F1F700C00A +:1002500000002C9A8FE39CE90197F1F700C00000A1 +:1002600047E06AE2CE010E94E30040E969E2CE0184 +:100270000E94E30042E068E2CE010E94E30043E016 +:100280006BE2CE010E94E30040E660E6CE010E94F0 +:10029000E30040E660E7CE010E94E30040E060E258 +:1002A000CE010E94E30040E061E2CE010E94E30043 +:1002B00040E062E2CE010E94E30040E063E2CE0152 +:1002C0000E94E30040E064E2CE010E94E30040E0CF +:1002D00065E2CE010E94E30040E066E2CE010E94AA +:1002E000E30040E067E2CE010E94E30040E06CE002 +:1002F000CE010E94E30040E06DE0CE010E94E300E9 +:1003000020E040EE6FE0CE010E94FC00DF91CF9133 +:1003100008950F931F93CF93DF9300D0CDB7DEB72F +:100320008C0162E0CE0102960E94C4012FEF81EEA3 +:1003300094E0215080409040E1F700C0000060E070 +:10034000CE0101960E94C4012FEF81EE94E021506E +:1003500080409040E1F700C00000C8010E945A00B0 +:10036000C8010E947200C8010E941C010F900F90EA +:10037000DF91CF911F910F91089584B1806E84B960 +:1003800008950E94BD01089585B18F7185B985B129 +:100390006295660F607E682B65B9089566E081E01E +:1003A00091E00E94C401FFCF81E091E00E94C10171 +:1003B00080E091E00E9489010895EE0FFF1F0590F3 +:0A03C000F491E02D0994F894FFCFAA :00000001FF diff --git a/Mainboard/Mainboard/Debug/Mainboard.lss b/Mainboard/Mainboard/Debug/Mainboard.lss index 3d627c9..62e30b2 100644 --- a/Mainboard/Mainboard/Debug/Mainboard.lss +++ b/Mainboard/Mainboard/Debug/Mainboard.lss @@ -3,2494 +3,733 @@ Mainboard.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .data 0000003e 00800100 00000eec 00000f80 2**0 + 0 .data 00000000 00800100 000003ca 0000045e 2**0 CONTENTS, ALLOC, LOAD, DATA - 1 .text 00000eec 00000000 00000000 00000094 2**1 + 1 .text 000003ca 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 2 .bss 0000000c 0080013e 0080013e 00000fbe 2**0 + 2 .bss 00000002 00800100 00800100 0000045e 2**0 ALLOC - 3 .stab 00000d2c 00000000 00000000 00000fc0 2**2 + 3 .stab 000006cc 00000000 00000000 00000460 2**2 CONTENTS, READONLY, DEBUGGING - 4 .stabstr 00000209 00000000 00000000 00001cec 2**0 + 4 .stabstr 00000082 00000000 00000000 00000b2c 2**0 CONTENTS, READONLY, DEBUGGING - 5 .comment 0000002f 00000000 00000000 00001ef5 2**0 + 5 .comment 0000002f 00000000 00000000 00000bae 2**0 CONTENTS, READONLY - 6 .debug_aranges 00000220 00000000 00000000 00001f24 2**0 + 6 .debug_aranges 000000e0 00000000 00000000 00000bdd 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_info 00002563 00000000 00000000 00002144 2**0 + 7 .debug_info 00001c15 00000000 00000000 00000cbd 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_abbrev 00000f2d 00000000 00000000 000046a7 2**0 + 8 .debug_abbrev 00000750 00000000 00000000 000028d2 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_line 00001227 00000000 00000000 000055d4 2**0 + 9 .debug_line 0000059e 00000000 00000000 00003022 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_frame 0000057c 00000000 00000000 000067fc 2**2 + 10 .debug_frame 000002d8 00000000 00000000 000035c0 2**2 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 000007dc 00000000 00000000 00006d78 2**0 + 11 .debug_str 00000419 00000000 00000000 00003898 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_loc 00001a4c 00000000 00000000 00007554 2**0 + 12 .debug_loc 00000c98 00000000 00000000 00003cb1 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_ranges 000001c0 00000000 00000000 00008fa0 2**0 + 13 .debug_ranges 000000f8 00000000 00000000 00004949 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: - 0: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__ctors_end> - 4: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 8: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 10: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 14: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 18: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 1c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 20: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 24: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 28: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 2c: 0c 94 23 03 jmp 0x646 ; 0x646 <__vector_11> - 30: 0c 94 4b 03 jmp 0x696 ; 0x696 <__vector_12> - 34: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 38: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 3c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 40: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 44: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 48: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 4c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 50: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 54: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 58: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 5c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 60: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 64: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 68: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 6c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> - 70: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 0: 0c 94 3b 00 jmp 0x76 ; 0x76 <__ctors_end> + 4: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 8: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 10: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 14: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 18: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 1c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 20: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 24: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 28: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 2c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 30: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 34: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 38: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 3c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 40: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 44: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 48: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 4c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 50: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 54: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 58: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 5c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 60: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 64: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 68: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 6c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> + 70: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt> -00000074 : - 74: 12 01 00 02 ff 00 00 10 ad de ee be 00 01 01 02 ................ - 84: 03 01 .. +00000074 <__ctors_start>: + 74: d4 01 movw r26, r8 -00000086 : - 86: 04 03 09 04 .... +00000076 <__ctors_end>: + 76: 11 24 eor r1, r1 + 78: 1f be out 0x3f, r1 ; 63 + 7a: cf ef ldi r28, 0xFF ; 255 + 7c: d4 e0 ldi r29, 0x04 ; 4 + 7e: de bf out 0x3e, r29 ; 62 + 80: cd bf out 0x3d, r28 ; 61 -0000008a : - 8a: 14 03 42 00 6c 00 75 00 62 00 62 00 46 00 69 00 ..B.l.u.b.b.F.i. - 9a: 73 00 68 00 00 00 s.h... +00000082 <__do_clear_bss>: + 82: 21 e0 ldi r18, 0x01 ; 1 + 84: a0 e0 ldi r26, 0x00 ; 0 + 86: b1 e0 ldi r27, 0x01 ; 1 + 88: 01 c0 rjmp .+2 ; 0x8c <.do_clear_bss_start> -000000a0 : - a0: 20 03 48 00 61 00 63 00 6b 00 65 00 72 00 2d 00 .H.a.c.k.e.r.-. - b0: 4a 00 65 00 6f 00 70 00 61 00 72 00 64 00 79 00 J.e.o.p.a.r.d.y. - ... +0000008a <.do_clear_bss_loop>: + 8a: 1d 92 st X+, r1 -000000c2 : - c2: 0e 03 30 00 30 00 30 00 30 00 30 00 31 00 00 00 ..0.0.0.0.0.1... +0000008c <.do_clear_bss_start>: + 8c: a2 30 cpi r26, 0x02 ; 2 + 8e: b2 07 cpc r27, r18 + 90: e1 f7 brne .-8 ; 0x8a <.do_clear_bss_loop> -000000d2 <__ctors_end>: - d2: 11 24 eor r1, r1 - d4: 1f be out 0x3f, r1 ; 63 - d6: cf ef ldi r28, 0xFF ; 255 - d8: d4 e0 ldi r29, 0x04 ; 4 - da: de bf out 0x3e, r29 ; 62 - dc: cd bf out 0x3d, r28 ; 61 +00000092 <__do_global_ctors>: + 92: 10 e0 ldi r17, 0x00 ; 0 + 94: c6 e7 ldi r28, 0x76 ; 118 + 96: d0 e0 ldi r29, 0x00 ; 0 + 98: 04 c0 rjmp .+8 ; 0xa2 <__do_global_ctors+0x10> + 9a: 22 97 sbiw r28, 0x02 ; 2 + 9c: fe 01 movw r30, r28 + 9e: 0e 94 df 01 call 0x3be ; 0x3be <__tablejump__> + a2: c4 37 cpi r28, 0x74 ; 116 + a4: d1 07 cpc r29, r17 + a6: c9 f7 brne .-14 ; 0x9a <__do_global_ctors+0x8> + a8: 0e 94 ce 01 call 0x39c ; 0x39c
+ ac: 0c 94 e3 01 jmp 0x3c6 ; 0x3c6 <_exit> -000000de <__do_copy_data>: - de: 11 e0 ldi r17, 0x01 ; 1 - e0: a0 e0 ldi r26, 0x00 ; 0 - e2: b1 e0 ldi r27, 0x01 ; 1 - e4: ec ee ldi r30, 0xEC ; 236 - e6: fe e0 ldi r31, 0x0E ; 14 - e8: 02 c0 rjmp .+4 ; 0xee <__do_copy_data+0x10> - ea: 05 90 lpm r0, Z+ - ec: 0d 92 st X+, r0 - ee: ae 33 cpi r26, 0x3E ; 62 - f0: b1 07 cpc r27, r17 - f2: d9 f7 brne .-10 ; 0xea <__do_copy_data+0xc> +000000b0 <__bad_interrupt>: + b0: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> -000000f4 <__do_clear_bss>: - f4: 21 e0 ldi r18, 0x01 ; 1 - f6: ae e3 ldi r26, 0x3E ; 62 - f8: b1 e0 ldi r27, 0x01 ; 1 - fa: 01 c0 rjmp .+2 ; 0xfe <.do_clear_bss_start> +000000b4 <_ZN3Can8init_pinEv>: + if (length > 8) { + length = 8; + } + + // Ist die Nachricht ein "Remote Transmit Request" ? + if (p_message->rtr) + b4: 84 b1 in r24, 0x04 ; 4 + b6: 86 60 ori r24, 0x06 ; 6 + b8: 84 b9 out 0x04, r24 ; 4 + ba: 85 b1 in r24, 0x05 ; 5 + { + /* Ein RTR hat zwar eine Laenge, + aber enthaelt keine Daten */ + + // Nachrichten Laenge + RTR einstellen + spi_putc((1< + + // Daten + for (uint8_t i=0;i + d2: 00 00 nop + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<: - fc: 1d 92 st X+, r1 +uint8_t Can::can_send_message(CANMessage *p_message) + d4: 5e 9a sbi 0x0b, 6 ; 11 + d6: 8f e3 ldi r24, 0x3F ; 63 + d8: 9c e9 ldi r25, 0x9C ; 156 + da: 01 97 sbiw r24, 0x01 ; 1 + dc: f1 f7 brne .-4 ; 0xda <_ZN3Can8init_pinEv+0x26> + de: 00 c0 rjmp .+0 ; 0xe0 <_ZN3Can8init_pinEv+0x2c> + e0: 00 00 nop + e2: 08 95 ret -000000fe <.do_clear_bss_start>: - fe: aa 34 cpi r26, 0x4A ; 74 - 100: b2 07 cpc r27, r18 - 102: e1 f7 brne .-8 ; 0xfc <.do_clear_bss_loop> - 104: 0e 94 3b 01 call 0x276 ; 0x276
- 108: 0c 94 74 07 jmp 0xee8 ; 0xee8 <_exit> +000000e4 <_ZN3Can8init_spiEv>: + e4: 1c bc out 0x2c, r1 ; 44 + e6: 2f ef ldi r18, 0xFF ; 255 + // Nachrichten Laenge einstellen + spi_putc(length); + + // Daten + for (uint8_t i=0;idata[i]); + e8: 81 ee ldi r24, 0xE1 ; 225 + ea: 94 e0 ldi r25, 0x04 ; 4 + ec: 21 50 subi r18, 0x01 ; 1 + ee: 80 40 sbci r24, 0x00 ; 0 + f0: 90 40 sbci r25, 0x00 ; 0 + f2: e1 f7 brne .-8 ; 0xec <_ZN3Can8init_spiEv+0x8> + { + // Nachrichten Laenge einstellen + spi_putc(length); + + // Daten + for (uint8_t i=0;i + f6: 00 00 nop + f8: 83 e5 ldi r24, 0x53 ; 83 + spi_putc(p_message->data[i]); + } + } + CANPORT_CS |= (1<: - 10c: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> - -00000110 : - 110: 95 b1 in r25, 0x05 ; 5 - 112: 9f 71 andi r25, 0x1F ; 31 - 114: 95 b9 out 0x05, r25 ; 5 - 116: 95 b1 in r25, 0x05 ; 5 - 118: 82 95 swap r24 - 11a: 88 0f add r24, r24 - 11c: 80 7e andi r24, 0xE0 ; 224 - 11e: 98 2b or r25, r24 - 120: 95 b9 out 0x05, r25 ; 5 - 122: 08 95 ret - -00000124 : - 124: 84 b1 in r24, 0x04 ; 4 - 126: 80 6e ori r24, 0xE0 ; 224 - 128: 84 b9 out 0x04, r24 ; 4 - 12a: 08 95 ret - -0000012c : - 12c: 2f 92 push r2 - 12e: 3f 92 push r3 - 130: 4f 92 push r4 - 132: 5f 92 push r5 - 134: 6f 92 push r6 - 136: 7f 92 push r7 - 138: 8f 92 push r8 - 13a: 9f 92 push r9 - 13c: af 92 push r10 - 13e: bf 92 push r11 - 140: cf 92 push r12 - 142: df 92 push r13 - 144: ef 92 push r14 - 146: ff 92 push r15 - 148: 0f 93 push r16 - 14a: 1f 93 push r17 - 14c: cf 93 push r28 - 14e: df 93 push r29 - 150: 7c 01 movw r14, r24 - 152: 8b 01 movw r16, r22 - 154: 5a 01 movw r10, r20 - 156: c0 e0 ldi r28, 0x00 ; 0 - 158: d0 e0 ldi r29, 0x00 ; 0 - 15a: 21 2c mov r2, r1 - 15c: 31 2c mov r3, r1 - 15e: 42 2c mov r4, r2 - 160: 53 2c mov r5, r3 - 162: 2c c0 rjmp .+88 ; 0x1bc - 164: 86 2c mov r8, r6 - 166: 97 2c mov r9, r7 - 168: c7 01 movw r24, r14 - 16a: 0e 94 88 00 call 0x110 ; 0x110 - 16e: 8f ef ldi r24, 0xFF ; 255 - 170: 88 1a sub r8, r24 - 172: 98 0a sbc r9, r24 - 174: 8f ef ldi r24, 0xFF ; 255 - 176: 88 16 cp r8, r24 - 178: 91 04 cpc r9, r1 - 17a: b1 f7 brne .-20 ; 0x168 - 17c: 1c 16 cp r1, r28 - 17e: 1d 06 cpc r1, r29 - 180: 5c f4 brge .+22 ; 0x198 - 182: 84 2c mov r8, r4 - 184: 95 2c mov r9, r5 - 186: c8 01 movw r24, r16 - 188: 0e 94 88 00 call 0x110 ; 0x110 - 18c: 8f ef ldi r24, 0xFF ; 255 - 18e: 88 1a sub r8, r24 - 190: 98 0a sbc r9, r24 - 192: 8c 16 cp r8, r28 - 194: 9d 06 cpc r9, r29 - 196: b9 f7 brne .-18 ; 0x186 - 198: 8f ef ldi r24, 0xFF ; 255 - 19a: c8 1a sub r12, r24 - 19c: d8 0a sbc r13, r24 - 19e: ca 14 cp r12, r10 - 1a0: db 04 cpc r13, r11 - 1a2: 21 f4 brne .+8 ; 0x1ac - 1a4: 07 c0 rjmp .+14 ; 0x1b4 - 1a6: 61 01 movw r12, r2 - 1a8: 6c 2e mov r6, r28 - 1aa: 7d 2e mov r7, r29 - 1ac: cf 3f cpi r28, 0xFF ; 255 - 1ae: d1 05 cpc r29, r1 - 1b0: cc f2 brlt .-78 ; 0x164 - 1b2: e4 cf rjmp .-56 ; 0x17c - 1b4: 21 96 adiw r28, 0x01 ; 1 - 1b6: cf 3f cpi r28, 0xFF ; 255 - 1b8: d1 05 cpc r29, r1 - 1ba: 21 f0 breq .+8 ; 0x1c4 - 1bc: 1a 14 cp r1, r10 - 1be: 1b 04 cpc r1, r11 - 1c0: 94 f3 brlt .-28 ; 0x1a6 - 1c2: f8 cf rjmp .-16 ; 0x1b4 - 1c4: df 91 pop r29 - 1c6: cf 91 pop r28 - 1c8: 1f 91 pop r17 - 1ca: 0f 91 pop r16 - 1cc: ff 90 pop r15 - 1ce: ef 90 pop r14 - 1d0: df 90 pop r13 - 1d2: cf 90 pop r12 - 1d4: bf 90 pop r11 - 1d6: af 90 pop r10 - 1d8: 9f 90 pop r9 - 1da: 8f 90 pop r8 - 1dc: 7f 90 pop r7 - 1de: 6f 90 pop r6 - 1e0: 5f 90 pop r5 - 1e2: 4f 90 pop r4 - 1e4: 3f 90 pop r3 - 1e6: 2f 90 pop r2 - 1e8: 08 95 ret - -000001ea : - 1ea: c8 2f mov r28, r24 - 1ec: 4a e0 ldi r20, 0x0A ; 10 - 1ee: 50 e0 ldi r21, 0x00 ; 0 - 1f0: 64 e0 ldi r22, 0x04 ; 4 - 1f2: 70 e0 ldi r23, 0x00 ; 0 - 1f4: 87 e0 ldi r24, 0x07 ; 7 - 1f6: 90 e0 ldi r25, 0x00 ; 0 - 1f8: 0e 94 96 00 call 0x12c ; 0x12c - 1fc: 4c 2f mov r20, r28 - 1fe: 50 e0 ldi r21, 0x00 ; 0 - 200: 66 e0 ldi r22, 0x06 ; 6 - 202: 70 e0 ldi r23, 0x00 ; 0 - 204: 84 e0 ldi r24, 0x04 ; 4 - 206: 90 e0 ldi r25, 0x00 ; 0 - 208: 0e 94 96 00 call 0x12c ; 0x12c - 20c: 4c 2f mov r20, r28 - 20e: 50 e0 ldi r21, 0x00 ; 0 - 210: 62 e0 ldi r22, 0x02 ; 2 - 212: 70 e0 ldi r23, 0x00 ; 0 - 214: 86 e0 ldi r24, 0x06 ; 6 - 216: 90 e0 ldi r25, 0x00 ; 0 - 218: 0e 94 96 00 call 0x12c ; 0x12c - 21c: 4c 2f mov r20, r28 - 21e: 50 e0 ldi r21, 0x00 ; 0 - 220: 63 e0 ldi r22, 0x03 ; 3 - 222: 70 e0 ldi r23, 0x00 ; 0 - 224: 82 e0 ldi r24, 0x02 ; 2 - 226: 90 e0 ldi r25, 0x00 ; 0 - 228: 0e 94 96 00 call 0x12c ; 0x12c - 22c: 4c 2f mov r20, r28 - 22e: 50 e0 ldi r21, 0x00 ; 0 - 230: 61 e0 ldi r22, 0x01 ; 1 - 232: 70 e0 ldi r23, 0x00 ; 0 - 234: 83 e0 ldi r24, 0x03 ; 3 - 236: 90 e0 ldi r25, 0x00 ; 0 - 238: 0e 94 96 00 call 0x12c ; 0x12c - 23c: 4c 2f mov r20, r28 - 23e: 50 e0 ldi r21, 0x00 ; 0 - 240: 65 e0 ldi r22, 0x05 ; 5 - 242: 70 e0 ldi r23, 0x00 ; 0 - 244: 81 e0 ldi r24, 0x01 ; 1 - 246: 90 e0 ldi r25, 0x00 ; 0 - 248: 0e 94 96 00 call 0x12c ; 0x12c - 24c: 4c 2f mov r20, r28 - 24e: 50 e0 ldi r21, 0x00 ; 0 - 250: 64 e0 ldi r22, 0x04 ; 4 - 252: 70 e0 ldi r23, 0x00 ; 0 - 254: 85 e0 ldi r24, 0x05 ; 5 - 256: 90 e0 ldi r25, 0x00 ; 0 - 258: 0e 94 96 00 call 0x12c ; 0x12c - 25c: cf cf rjmp .-98 ; 0x1fc - -0000025e : - 25e: 86 e0 ldi r24, 0x06 ; 6 - 260: 90 e0 ldi r25, 0x00 ; 0 - 262: 0e 94 88 00 call 0x110 ; 0x110 - 266: 78 94 sei - 268: 0e 94 92 00 call 0x124 ; 0x124 - 26c: 0e 94 57 01 call 0x2ae ; 0x2ae - 270: 3f 98 cbi 0x07, 7 ; 7 - 272: 47 9a sbi 0x08, 7 ; 8 - 274: 08 95 ret - -00000276
: - 276: 0e 94 2f 01 call 0x25e ; 0x25e - 27a: 82 e0 ldi r24, 0x02 ; 2 - 27c: 90 e0 ldi r25, 0x00 ; 0 - 27e: 0e 94 88 00 call 0x110 ; 0x110 - 282: 85 e0 ldi r24, 0x05 ; 5 - 284: 0e 94 f5 00 call 0x1ea ; 0x1ea - 288: fc cf rjmp .-8 ; 0x282 - -0000028a : - 28a: cf 93 push r28 - 28c: c8 2f mov r28, r24 - 28e: 8a 30 cpi r24, 0x0A ; 10 - 290: 19 f4 brne .+6 ; 0x298 - 292: 8d e0 ldi r24, 0x0D ; 13 - 294: 0e 94 45 01 call 0x28a ; 0x28a - 298: e8 ec ldi r30, 0xC8 ; 200 - 29a: f0 e0 ldi r31, 0x00 ; 0 - 29c: 90 81 ld r25, Z - 29e: 95 ff sbrs r25, 5 - 2a0: fd cf rjmp .-6 ; 0x29c - 2a2: c0 93 ce 00 sts 0x00CE, r28 - 2a6: 80 e0 ldi r24, 0x00 ; 0 - 2a8: 90 e0 ldi r25, 0x00 ; 0 - 2aa: cf 91 pop r28 - 2ac: 08 95 ret - -000002ae : - 2ae: 86 e0 ldi r24, 0x06 ; 6 - 2b0: 80 93 ca 00 sts 0x00CA, r24 - 2b4: e9 ec ldi r30, 0xC9 ; 201 - 2b6: f0 e0 ldi r31, 0x00 ; 0 - 2b8: 80 81 ld r24, Z - 2ba: 88 60 ori r24, 0x08 ; 8 - 2bc: 80 83 st Z, r24 - 2be: 87 e6 ldi r24, 0x67 ; 103 - 2c0: 80 93 cc 00 sts 0x00CC, r24 - 2c4: 80 e0 ldi r24, 0x00 ; 0 - 2c6: 91 e0 ldi r25, 0x01 ; 1 - 2c8: 90 93 47 01 sts 0x0147, r25 - 2cc: 80 93 46 01 sts 0x0146, r24 - 2d0: 08 95 ret - -000002d2 : - 2d2: cf 93 push r28 - 2d4: df 93 push r29 - 2d6: cd b7 in r28, 0x3d ; 61 - 2d8: de b7 in r29, 0x3e ; 62 - 2da: 60 97 sbiw r28, 0x10 ; 16 - 2dc: 0f b6 in r0, 0x3f ; 63 - 2de: f8 94 cli - 2e0: de bf out 0x3e, r29 ; 62 - 2e2: 0f be out 0x3f, r0 ; 63 - 2e4: cd bf out 0x3d, r28 ; 61 - 2e6: 2c e0 ldi r18, 0x0C ; 12 - 2e8: e5 e1 ldi r30, 0x15 ; 21 - 2ea: f1 e0 ldi r31, 0x01 ; 1 - 2ec: de 01 movw r26, r28 - 2ee: 11 96 adiw r26, 0x01 ; 1 - 2f0: 01 90 ld r0, Z+ - 2f2: 0d 92 st X+, r0 - 2f4: 2a 95 dec r18 - 2f6: e1 f7 brne .-8 ; 0x2f0 - 2f8: 1d 86 std Y+13, r1 ; 0x0d - 2fa: 1e 86 std Y+14, r1 ; 0x0e - 2fc: 1f 86 std Y+15, r1 ; 0x0f - 2fe: 18 8a std Y+16, r1 ; 0x10 - 300: fc 01 movw r30, r24 - 302: 20 81 ld r18, Z - 304: 23 3c cpi r18, 0xC3 ; 195 - 306: 51 f4 brne .+20 ; 0x31c - 308: 81 81 ldd r24, Z+1 ; 0x01 - 30a: 81 30 cpi r24, 0x01 ; 1 - 30c: 49 f4 brne .+18 ; 0x320 - 30e: 60 e1 ldi r22, 0x10 ; 16 - 310: ce 01 movw r24, r28 - 312: 01 96 adiw r24, 0x01 ; 1 - 314: 0e 94 d1 02 call 0x5a2 ; 0x5a2 - 318: 81 e0 ldi r24, 0x01 ; 1 - 31a: 03 c0 rjmp .+6 ; 0x322 - 31c: 80 e0 ldi r24, 0x00 ; 0 - 31e: 01 c0 rjmp .+2 ; 0x322 - 320: 80 e0 ldi r24, 0x00 ; 0 - 322: 60 96 adiw r28, 0x10 ; 16 - 324: 0f b6 in r0, 0x3f ; 63 - 326: f8 94 cli - 328: de bf out 0x3e, r29 ; 62 - 32a: 0f be out 0x3f, r0 ; 63 - 32c: cd bf out 0x3d, r28 ; 61 - 32e: df 91 pop r29 - 330: cf 91 pop r28 - 332: 08 95 ret - -00000334 : - 334: cf 93 push r28 - 336: df 93 push r29 - 338: cd b7 in r28, 0x3d ; 61 - 33a: de b7 in r29, 0x3e ; 62 - 33c: a0 97 sbiw r28, 0x20 ; 32 - 33e: 0f b6 in r0, 0x3f ; 63 - 340: f8 94 cli - 342: de bf out 0x3e, r29 ; 62 - 344: 0f be out 0x3f, r0 ; 63 - 346: cd bf out 0x3d, r28 ; 61 - 348: 81 30 cpi r24, 0x01 ; 1 - 34a: a1 f4 brne .+40 ; 0x374 - 34c: 40 e2 ldi r20, 0x20 ; 32 - 34e: be 01 movw r22, r28 - 350: 6f 5f subi r22, 0xFF ; 255 - 352: 7f 4f sbci r23, 0xFF ; 255 - 354: 0e 94 ac 02 call 0x558 ; 0x558 - 358: 88 23 and r24, r24 - 35a: 61 f0 breq .+24 ; 0x374 - 35c: 18 a2 std Y+32, r1 ; 0x20 - 35e: ce 01 movw r24, r28 - 360: 01 96 adiw r24, 0x01 ; 1 - 362: 0e 94 4f 07 call 0xe9e ; 0xe9e - 366: 40 e2 ldi r20, 0x20 ; 32 - 368: be 01 movw r22, r28 - 36a: 6f 5f subi r22, 0xFF ; 255 - 36c: 7f 4f sbci r23, 0xFF ; 255 - 36e: 82 e8 ldi r24, 0x82 ; 130 - 370: 0e 94 f4 02 call 0x5e8 ; 0x5e8 - 374: a0 96 adiw r28, 0x20 ; 32 - 376: 0f b6 in r0, 0x3f ; 63 - 378: f8 94 cli - 37a: de bf out 0x3e, r29 ; 62 - 37c: 0f be out 0x3f, r0 ; 63 - 37e: cd bf out 0x3d, r28 ; 61 - 380: df 91 pop r29 - 382: cf 91 pop r28 - 384: 08 95 ret - -00000386 : - 386: 2f 92 push r2 - 388: 3f 92 push r3 - 38a: 4f 92 push r4 - 38c: 5f 92 push r5 - 38e: 7f 92 push r7 - 390: 8f 92 push r8 - 392: 9f 92 push r9 - 394: af 92 push r10 - 396: cf 92 push r12 - 398: df 92 push r13 - 39a: ef 92 push r14 - 39c: ff 92 push r15 - 39e: 0f 93 push r16 - 3a0: 1f 93 push r17 - 3a2: cf 93 push r28 - 3a4: df 93 push r29 - 3a6: 28 2f mov r18, r24 - 3a8: 90 e0 ldi r25, 0x00 ; 0 - 3aa: 6c e0 ldi r22, 0x0C ; 12 - 3ac: 70 e0 ldi r23, 0x00 ; 0 - 3ae: 0e 94 05 06 call 0xc0a ; 0xc0a <__mulhi3> - 3b2: fc 01 movw r30, r24 - 3b4: eb 5d subi r30, 0xDB ; 219 - 3b6: fe 4f sbci r31, 0xFE ; 254 - 3b8: 82 2f mov r24, r18 - 3ba: 90 e0 ldi r25, 0x00 ; 0 -//----------------------------------------------------------------------------- -// Initializing Endpoints -//----------------------------------------------------------------------------- - -#if (NUMINTERFACES>1) -void usb_endpoints(uint8_t ifnumber) // with interface number - 3bc: 6c e0 ldi r22, 0x0C ; 12 - 3be: 70 e0 ldi r23, 0x00 ; 0 - 3c0: 0e 94 05 06 call 0xc0a ; 0xc0a <__mulhi3> - 3c4: 89 5d subi r24, 0xD9 ; 217 - 3c6: 9e 4f sbci r25, 0xFE ; 254 - 3c8: 41 e0 ldi r20, 0x01 ; 1 - #endif - uint8_t i; - - for (i=0; i1) -void usb_endpoints(uint8_t ifnumber) // with interface number - 402: df 01 movw r26, r30 - #define IN_TRANSFER EP_CONFIG[i].ep_type & 0x01 - #endif - uint8_t i; - - for (i=0; i - UENUM = i+1; // select endpoint - 40a: e6 01 movw r28, r12 - 40c: 48 83 st Y, r20 - UECONX = _BV(EPEN); // enable endpoint - 40e: e7 01 movw r28, r14 - 410: a8 82 st Y, r10 - UECFG0X = EPC.ep_type; // transfer type and direction - 412: 20 81 ld r18, Z - 414: e8 01 movw r28, r16 - 416: 28 83 st Y, r18 -//----------------------------------------------------------------------------- -// Initializing Endpoints -//----------------------------------------------------------------------------- - -#if (NUMINTERFACES>1) -void usb_endpoints(uint8_t ifnumber) // with interface number - 418: 1c 01 movw r2, r24 - 41a: 9c 01 movw r18, r24 - 41c: 21 50 subi r18, 0x01 ; 1 - 41e: 31 09 sbc r19, r1 - for (i=0; i - 428: 20 34 cpi r18, 0x40 ; 64 - 42a: 41 f0 breq .+16 ; 0x43c - 42c: 20 32 cpi r18, 0x20 ; 32 - 42e: 41 f0 breq .+16 ; 0x440 - 430: 20 31 cpi r18, 0x10 ; 16 - 432: 41 f4 brne .+16 ; 0x444 - 434: 37 2d mov r19, r7 - 436: 07 c0 rjmp .+14 ; 0x446 - 438: 30 e4 ldi r19, 0x40 ; 64 - 43a: 05 c0 rjmp .+10 ; 0x446 - 43c: 30 e3 ldi r19, 0x30 ; 48 - 43e: 03 c0 rjmp .+6 ; 0x446 - 440: 30 e2 ldi r19, 0x20 ; 32 - 442: 01 c0 rjmp .+2 ; 0x446 - 444: 38 2d mov r19, r8 - 446: e1 01 movw r28, r2 - 448: 28 81 ld r18, Y - 44a: 23 2b or r18, r19 - 44c: eb 01 movw r28, r22 - 44e: 28 83 st Y, r18 - (EPC.ep_buffer); // bufer size and bank - if (IN_TRANSFER) UEIENX = 0; // no interrupts handling for IN endpoints - 450: 2c 91 ld r18, X - 452: 20 ff sbrs r18, 0 - 454: 03 c0 rjmp .+6 ; 0x45c - 456: d2 01 movw r26, r4 - 458: 1c 92 st X, r1 - 45a: 02 c0 rjmp .+4 ; 0x460 - else UEIENX = _BV(RXOUTE); // interrupt handling for incoming data (OUT endpoint) - 45c: e2 01 movw r28, r4 - 45e: 98 82 st Y, r9 - 460: 4f 5f subi r20, 0xFF ; 255 - 462: 33 96 adiw r30, 0x03 ; 3 - 464: 03 96 adiw r24, 0x03 ; 3 - #define EPC EP_CONFIG[i] - #define IN_TRANSFER EP_CONFIG[i].ep_type & 0x01 - #endif - uint8_t i; - - for (i=0; i - } - } - #ifdef MEGA4_6 - UERST = 0x7E; // endpoint FIFO reset for endpoint 1, 2, 3, 4, 5 and 6 +000000fe <_ZN3Can8spi_putcEh>: + + /* CAN Nachricht verschicken + die letzten drei Bit im RTS Kommando geben an welcher + Puffer gesendet werden soll */ + CANPORT_CS &= ~(1< + 106: 00 d0 rcall .+0 ; 0x108 <_ZN3Can8spi_putcEh+0xa> + 108: 1f 92 push r1 + 10a: cd b7 in r28, 0x3d ; 61 + 10c: de b7 in r29, 0x3e ; 62 + } else { + spi_putc(SPI_RTS | address); + 10e: 16 2f mov r17, r22 + 110: 61 e0 ldi r22, 0x01 ; 1 + 112: ce 01 movw r24, r28 + 114: 05 96 adiw r24, 0x05 ; 5 + 116: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + } + CANPORT_CS |= (1< + 12a: 00 c0 rjmp .+0 ; 0x12c <_ZN3Can8spi_putcEh+0x2e> + 12c: 00 00 nop + 12e: 60 e0 ldi r22, 0x00 ; 0 + 130: ce 01 movw r24, r28 + 132: 04 96 adiw r24, 0x04 ; 4 + 134: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> #else - UERST = 0x1E; // endpoint FIFO reset for endpoint 1, 2, 3 and 4 - 46a: ea ee ldi r30, 0xEA ; 234 - 46c: f0 e0 ldi r31, 0x00 ; 0 - 46e: 8e e1 ldi r24, 0x1E ; 30 - 470: 80 83 st Z, r24 - #endif - UERST = 0; - 472: 10 82 st Z, r1 -} - 474: df 91 pop r29 - 476: cf 91 pop r28 - 478: 1f 91 pop r17 - 47a: 0f 91 pop r16 - 47c: ff 90 pop r15 - 47e: ef 90 pop r14 - 480: df 90 pop r13 - 482: cf 90 pop r12 - 484: af 90 pop r10 - 486: 9f 90 pop r9 - 488: 8f 90 pop r8 - 48a: 7f 90 pop r7 - 48c: 5f 90 pop r5 - 48e: 4f 90 pop r4 - 490: 3f 90 pop r3 - 492: 2f 90 pop r2 - 494: 08 95 ret - -00000496 : -void usb_wait_in(void) -// wait for host, until it's ready to receive IN package -{ - uint8_t i; - do { - i = UEINTX; - 496: e8 ee ldi r30, 0xE8 ; 232 - 498: f0 e0 ldi r31, 0x00 ; 0 - 49a: 80 81 ld r24, Z - } while (!(i & (_BV(TXINI)|_BV(RXOUTI)))); - 49c: 85 70 andi r24, 0x05 ; 5 - 49e: e9 f3 breq .-6 ; 0x49a -} - 4a0: 08 95 ret - -000004a2 : - -void usb_desc_out(bool isRAM, const uint8_t *pgmaddr, uint8_t size, uint16_t maxsize) -// return descriptor over endpoint 0 to host from flash memory or RAM -{ - 4a2: af 92 push r10 - 4a4: bf 92 push r11 - 4a6: cf 92 push r12 - 4a8: df 92 push r13 - 4aa: ef 92 push r14 - 4ac: ff 92 push r15 - 4ae: 0f 93 push r16 - 4b0: 1f 93 push r17 - 4b2: cf 93 push r28 - 4b4: df 93 push r29 - 4b6: d8 2e mov r13, r24 - 4b8: d6 2f mov r29, r22 - 4ba: c7 2f mov r28, r23 - uint8_t i=0, len, n; - const uint8_t *addr; - - addr=pgmaddr; - len=size; - if (len>maxsize) len=maxsize; - 4bc: e4 2f mov r30, r20 - 4be: f0 e0 ldi r31, 0x00 ; 0 - 4c0: 2e 17 cp r18, r30 - 4c2: 3f 07 cpc r19, r31 - 4c4: 10 f4 brcc .+4 ; 0x4ca - 4c6: c2 2e mov r12, r18 - 4c8: 01 c0 rjmp .+2 ; 0x4cc -{ - uint8_t i=0, len, n; - const uint8_t *addr; - - addr=pgmaddr; - len=size; - 4ca: c4 2e mov r12, r20 - if (len>maxsize) len=maxsize; - do { - usb_wait_in(); - 4cc: 0e 94 4b 02 call 0x496 ; 0x496 - 4d0: 0d 2f mov r16, r29 - 4d2: 1c 2f mov r17, r28 - if (i & _BV(RXOUTI)) return; // cancel - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - 4d4: 68 94 set - 4d6: aa 24 eor r10, r10 - 4d8: a4 f8 bld r10, 4 - for (i = n; i; i--) - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - len -= n; - USB_SEND_IN; - 4da: 0f 2e mov r0, r31 - 4dc: f8 ee ldi r31, 0xE8 ; 232 - 4de: ef 2e mov r14, r31 - 4e0: f1 2c mov r15, r1 - 4e2: f0 2d mov r31, r0 - 4e4: 0f 2e mov r0, r31 - 4e6: fe ef ldi r31, 0xFE ; 254 - 4e8: bf 2e mov r11, r31 - 4ea: f0 2d mov r31, r0 - usb_wait_in(); - if (i & _BV(RXOUTI)) return; // cancel - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - 4ec: c1 ef ldi r28, 0xF1 ; 241 - 4ee: d0 e0 ldi r29, 0x00 ; 0 - if (len>maxsize) len=maxsize; - do { - usb_wait_in(); - if (i & _BV(RXOUTI)) return; // cancel - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - 4f0: 2c 2d mov r18, r12 - 4f2: 80 e1 ldi r24, 0x10 ; 16 - 4f4: 8c 15 cp r24, r12 - 4f6: 08 f4 brcc .+2 ; 0x4fa - 4f8: 2a 2d mov r18, r10 - for (i = n; i; i--) - 4fa: 22 23 and r18, r18 - 4fc: d9 f0 breq .+54 ; 0x534 <__stack+0x35> - 4fe: f8 01 movw r30, r16 - 500: 92 2f mov r25, r18 - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - 502: dd 20 and r13, r13 - 504: 11 f0 breq .+4 ; 0x50a <__stack+0xb> - 506: 80 81 ld r24, Z - 508: 01 c0 rjmp .+2 ; 0x50c <__stack+0xd> - 50a: 84 91 lpm r24, Z - 50c: 88 83 st Y, r24 - do { - usb_wait_in(); - if (i & _BV(RXOUTI)) return; // cancel - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) - 50e: 91 50 subi r25, 0x01 ; 1 - 510: 31 96 adiw r30, 0x01 ; 1 - 512: 91 11 cpse r25, r1 - 514: f6 cf rjmp .-20 ; 0x502 <__stack+0x3> - do { - i = UEINTX; - } while (!(i & (_BV(TXINI)|_BV(RXOUTI)))); -} - -void usb_desc_out(bool isRAM, const uint8_t *pgmaddr, uint8_t size, uint16_t maxsize) - 516: 62 2f mov r22, r18 - 518: 61 50 subi r22, 0x01 ; 1 - 51a: 70 e0 ldi r23, 0x00 ; 0 - 51c: 6f 5f subi r22, 0xFF ; 255 - 51e: 7f 4f sbci r23, 0xFF ; 255 - 520: 06 0f add r16, r22 - 522: 17 1f adc r17, r23 - if (i & _BV(RXOUTI)) return; // cancel - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - len -= n; - 524: c2 1a sub r12, r18 - USB_SEND_IN; - 526: f7 01 movw r30, r14 - 528: b0 82 st Z, r11 - } while (len || n == ENDPOINT0_SIZE); - 52a: c1 10 cpse r12, r1 - 52c: 07 c0 rjmp .+14 ; 0x53c <__stack+0x3d> - 52e: 20 31 cpi r18, 0x10 ; 16 - 530: 29 f0 breq .+10 ; 0x53c <__stack+0x3d> - 532: 07 c0 rjmp .+14 ; 0x542 <__stack+0x43> - // send IN package - n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - len -= n; - USB_SEND_IN; - 534: f7 01 movw r30, r14 - 536: b0 82 st Z, r11 - } while (len || n == ENDPOINT0_SIZE); - 538: cc 20 and r12, r12 - 53a: 19 f0 breq .+6 ; 0x542 <__stack+0x43> - - addr=pgmaddr; - len=size; - if (len>maxsize) len=maxsize; - do { - usb_wait_in(); - 53c: 0e 94 4b 02 call 0x496 ; 0x496 - 540: d7 cf rjmp .-82 ; 0x4f0 - for (i = n; i; i--) - UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); - len -= n; - USB_SEND_IN; - } while (len || n == ENDPOINT0_SIZE); -} - 542: df 91 pop r29 - 544: cf 91 pop r28 - 546: 1f 91 pop r17 - 548: 0f 91 pop r16 - 54a: ff 90 pop r15 - 54c: ef 90 pop r14 - 54e: df 90 pop r13 - 550: cf 90 pop r12 - 552: bf 90 pop r11 - 554: af 90 pop r10 - 556: 08 95 ret - -00000558 : - uint16_t r, i; - #else - uint8_t r, i; + //round up by default + __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif - UENUM = endpoint; // select endpoint - 558: 80 93 e9 00 sts 0x00E9, r24 - #ifdef MEGA4_6 - r = ((uint16_t)(UEBCHX)<<8)+UEBCLX; - #else - r = UEBCLX; - 55c: 90 91 f2 00 lds r25, 0x00F2 - 560: 94 17 cp r25, r20 - 562: 08 f4 brcc .+2 ; 0x566 - 564: 49 2f mov r20, r25 - #endif - if (r>maxdatasize) r = maxdatasize; - if (r) { // data available in input endpoint - 566: 44 23 and r20, r20 - 568: d1 f0 breq .+52 ; 0x59e - 56a: 36 2f mov r19, r22 - 56c: e6 2f mov r30, r22 - 56e: f7 2f mov r31, r23 - for (i=0; i - #ifdef MEGA4_6 - if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty - #else - if (UEBCLX==0) { // buffer is empty - 580: 90 91 f2 00 lds r25, 0x00F2 - 584: 91 11 cpse r25, r1 - 586: 0b c0 rjmp .+22 ; 0x59e - #endif - UERST = _BV(endpoint); // endpoint FIFO reset - 588: 21 e0 ldi r18, 0x01 ; 1 - 58a: 30 e0 ldi r19, 0x00 ; 0 - 58c: 02 c0 rjmp .+4 ; 0x592 - 58e: 22 0f add r18, r18 - 590: 33 1f adc r19, r19 - 592: 8a 95 dec r24 - 594: e2 f7 brpl .-8 ; 0x58e - 596: ea ee ldi r30, 0xEA ; 234 - 598: f0 e0 ldi r31, 0x00 ; 0 - 59a: 20 83 st Z, r18 - UERST = 0; - 59c: 10 82 st Z, r1 + __builtin_avr_delay_cycles(__ticks_dc); + 138: 9f ef ldi r25, 0xFF ; 255 + 13a: 23 ec ldi r18, 0xC3 ; 195 + 13c: 39 e0 ldi r19, 0x09 ; 9 + 13e: 91 50 subi r25, 0x01 ; 1 + 140: 20 40 sbci r18, 0x00 ; 0 + 142: 30 40 sbci r19, 0x00 ; 0 + 144: e1 f7 brne .-8 ; 0x13e <_ZN3Can8spi_putcEh+0x40> + 146: 00 c0 rjmp .+0 ; 0x148 <_ZN3Can8spi_putcEh+0x4a> + 148: 00 00 nop + SPDR = data; + _delay_ms(200); + Led(0).color(Led::BLACK); + _delay_ms(200); + // Wartet bis Byte gesendet wurde + while(!(SPSR & (1< + if(SPSR & (1< + Led(0).color(Led::WHITE); + 156: 67 e0 ldi r22, 0x07 ; 7 + 158: ce 01 movw r24, r28 + 15a: 03 96 adiw r24, 0x03 ; 3 + 15c: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 160: 8a ea ldi r24, 0xAA ; 170 + 162: 96 ee ldi r25, 0xE6 ; 230 + 164: 26 e9 ldi r18, 0x96 ; 150 + 166: 31 e0 ldi r19, 0x01 ; 1 + 168: 81 50 subi r24, 0x01 ; 1 + 16a: 90 40 sbci r25, 0x00 ; 0 + 16c: 20 40 sbci r18, 0x00 ; 0 + 16e: 30 40 sbci r19, 0x00 ; 0 + 170: d9 f7 brne .-10 ; 0x168 <_ZN3Can8spi_putcEh+0x6a> + 172: 00 00 nop + _delay_ms(10000); } - } - return r; + Led(0).color(Led::MAGENTA); + 174: 65 e0 ldi r22, 0x05 ; 5 + 176: ce 01 movw r24, r28 + 178: 02 96 adiw r24, 0x02 ; 2 + 17a: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 17e: 8f ef ldi r24, 0xFF ; 255 + 180: 91 ee ldi r25, 0xE1 ; 225 + 182: 24 e0 ldi r18, 0x04 ; 4 + 184: 81 50 subi r24, 0x01 ; 1 + 186: 90 40 sbci r25, 0x00 ; 0 + 188: 20 40 sbci r18, 0x00 ; 0 + 18a: e1 f7 brne .-8 ; 0x184 <_ZN3Can8spi_putcEh+0x86> + 18c: 00 c0 rjmp .+0 ; 0x18e <_ZN3Can8spi_putcEh+0x90> + 18e: 00 00 nop + _delay_ms(100); + Led(0).color(Led::BLACK); + 190: 60 e0 ldi r22, 0x00 ; 0 + 192: ce 01 movw r24, r28 + 194: 01 96 adiw r24, 0x01 ; 1 + 196: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 19a: 3f ef ldi r19, 0xFF ; 255 + 19c: 81 ee ldi r24, 0xE1 ; 225 + 19e: 94 e0 ldi r25, 0x04 ; 4 + 1a0: 31 50 subi r19, 0x01 ; 1 + 1a2: 80 40 sbci r24, 0x00 ; 0 + 1a4: 90 40 sbci r25, 0x00 ; 0 + 1a6: e1 f7 brne .-8 ; 0x1a0 <_ZN3Can8spi_putcEh+0xa2> + 1a8: 00 c0 rjmp .+0 ; 0x1aa <_ZN3Can8spi_putcEh+0xac> + 1aa: 00 00 nop + SPDR = data; + _delay_ms(200); + Led(0).color(Led::BLACK); + _delay_ms(200); + // Wartet bis Byte gesendet wurde + while(!(SPSR & (1< + Led(0).color(Led::BLACK); + _delay_ms(100); + + } + + return SPDR; + 1b2: 8e b5 in r24, 0x2e ; 46 } - 59e: 84 2f mov r24, r20 - 5a0: 08 95 ret + 1b4: 0f 90 pop r0 + 1b6: 0f 90 pop r0 + 1b8: 0f 90 pop r0 + 1ba: 0f 90 pop r0 + 1bc: 0f 90 pop r0 + 1be: df 91 pop r29 + 1c0: cf 91 pop r28 + 1c2: 1f 91 pop r17 + 1c4: 08 95 ret -000005a2 : +000001c6 <_ZN3Can22mcp2515_write_registerEhh>: -bool usb_txdata_control(uint8_t *buffer, uint8_t datasize) +void Can::mcp2515_write_register( uint8_t adress, uint8_t data ) { - uint8_t i; - - if (datasize) { - 5a2: 66 23 and r22, r22 - 5a4: e9 f0 breq .+58 ; 0x5e0 - UENUM = 0; - 5a6: 10 92 e9 00 sts 0x00E9, r1 - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - 5aa: e8 ee ldi r30, 0xE8 ; 232 - 5ac: f0 e0 ldi r31, 0x00 ; 0 - 5ae: 20 81 ld r18, Z - 5b0: 20 ff sbrs r18, 0 - 5b2: fd cf rjmp .-6 ; 0x5ae - UENUM = 0; - usb_wait_in_ready(); - #ifdef MEGA4_6 - if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty - #else - if (UEBCLX==0) { // buffer is empty - 5b4: 20 91 f2 00 lds r18, 0x00F2 - 5b8: 21 11 cpse r18, r1 - 5ba: 14 c0 rjmp .+40 ; 0x5e4 - 5bc: 28 2f mov r18, r24 - 5be: e8 2f mov r30, r24 - 5c0: f9 2f mov r31, r25 - #endif - for (i=0; i - UEINTX&=~_BV(TXINI); // necessary (in this order) (changed V1.1.1) - 5d2: e8 ee ldi r30, 0xE8 ; 232 - 5d4: f0 e0 ldi r31, 0x00 ; 0 - 5d6: 80 81 ld r24, Z - 5d8: 8e 7f andi r24, 0xFE ; 254 - 5da: 80 83 st Z, r24 - return true; - 5dc: 81 e0 ldi r24, 0x01 ; 1 - 5de: 08 95 ret - } - } - return false; - 5e0: 80 e0 ldi r24, 0x00 ; 0 - 5e2: 08 95 ret - 5e4: 80 e0 ldi r24, 0x00 ; 0 + 1c6: 0f 93 push r16 + 1c8: 1f 93 push r17 + 1ca: cf 93 push r28 + 1cc: df 93 push r29 + 1ce: ec 01 movw r28, r24 + 1d0: 06 2f mov r16, r22 + 1d2: 14 2f mov r17, r20 + // /CS des MCP2515 auf Low ziehen + CANPORT_CS &= ~(1< + spi_putc(adress); + 1dc: 60 2f mov r22, r16 + 1de: ce 01 movw r24, r28 + 1e0: 0e 94 7f 00 call 0xfe ; 0xfe <_ZN3Can8spi_putcEh> + spi_putc(data); + 1e4: 61 2f mov r22, r17 + 1e6: ce 01 movw r24, r28 + 1e8: 0e 94 7f 00 call 0xfe ; 0xfe <_ZN3Can8spi_putcEh> + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<: -#ifdef MEGA4_6 -bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint16_t datasize) -#else -bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint8_t datasize) -#endif -{ - 5e8: cf 93 push r28 - 5ea: df 93 push r29 - uint16_t i; - #else - uint8_t i; - #endif - - if (datasize) { - 5ec: 44 23 and r20, r20 - 5ee: 29 f1 breq .+74 ; 0x63a - UENUM = endpoint; - 5f0: 80 93 e9 00 sts 0x00E9, r24 - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - 5f4: e8 ee ldi r30, 0xE8 ; 232 - 5f6: f0 e0 ldi r31, 0x00 ; 0 - 5f8: 80 81 ld r24, Z - 5fa: 80 ff sbrs r24, 0 - 5fc: fd cf rjmp .-6 ; 0x5f8 - UENUM = endpoint; - usb_wait_in_ready(); - #ifdef MEGA4_6 - if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty - #else - if (UEBCLX==0) { // buffer is empty - 5fe: 80 91 f2 00 lds r24, 0x00F2 - 602: 81 11 cpse r24, r1 - 604: 1c c0 rjmp .+56 ; 0x63e - 606: 96 2f mov r25, r22 - 608: e6 2f mov r30, r22 - 60a: f7 2f mov r31, r23 - #endif - for (i=0; i - 61a: 80 81 ld r24, Z - 61c: 88 83 st Y, r24 - 61e: 31 96 adiw r30, 0x01 ; 1 - #ifdef MEGA4_6 - if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty - #else - if (UEBCLX==0) { // buffer is empty - #endif - for (i=0; i - if (UEINTX & _BV(RWAL)) UEDATX = buffer[i]; - UEINTX&=~_BV(TXINI); // necessary (in this order) (changed V1.1.1) - 628: e8 ee ldi r30, 0xE8 ; 232 - 62a: f0 e0 ldi r31, 0x00 ; 0 - 62c: 80 81 ld r24, Z - 62e: 8e 7f andi r24, 0xFE ; 254 - 630: 80 83 st Z, r24 - UEINTX=0x7F; // (uint8_t)~_BV(FIFOCON); - 632: 8f e7 ldi r24, 0x7F ; 127 - 634: 80 83 st Z, r24 - return true; - 636: 81 e0 ldi r24, 0x01 ; 1 - 638: 03 c0 rjmp .+6 ; 0x640 - } - } - return false; - 63a: 80 e0 ldi r24, 0x00 ; 0 - 63c: 01 c0 rjmp .+2 ; 0x640 - 63e: 80 e0 ldi r24, 0x00 ; 0 +000001f8 <_ZN3Can18mcp2515_bit_modifyEhhh>: + + return data; } - 640: df 91 pop r29 - 642: cf 91 pop r28 - 644: 08 95 ret -00000646 <__vector_11>: -// USB Device Interrupt -//----------------------------------------------------------------------------- -// Hardware interrupts of the USB controller - -ISR(USB_GEN_vect) +void Can::mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data) { - 646: 1f 92 push r1 - 648: 0f 92 push r0 - 64a: 0f b6 in r0, 0x3f ; 63 - 64c: 0f 92 push r0 - 64e: 11 24 eor r1, r1 - 650: 8f 93 push r24 - 652: ef 93 push r30 - 654: ff 93 push r31 - uint8_t intbits; - - intbits = UDINT; // save flags - 656: e1 ee ldi r30, 0xE1 ; 225 - 658: f0 e0 ldi r31, 0x00 ; 0 - 65a: 80 81 ld r24, Z - UDINT = 0; // reset flags - 65c: 10 82 st Z, r1 - if (intbits & _BV(EORSTI)) { // End Of Reset Interrupt Flag - 65e: 83 ff sbrs r24, 3 - 660: 12 c0 rjmp .+36 ; 0x686 <__vector_11+0x40> - // initialize endpoint 0 for control transfers - UENUM = 0; - 662: 10 92 e9 00 sts 0x00E9, r1 - UECONX = _BV(EPEN); - 666: 81 e0 ldi r24, 0x01 ; 1 - 668: 80 93 eb 00 sts 0x00EB, r24 - UECFG0X = EP_TYPE_CONTROL; - 66c: 10 92 ec 00 sts 0x00EC, r1 - UECFG1X = EP_SIZE(ENDPOINT0_SIZE) | EP_SINGLE_BUFFER; - 670: 82 e1 ldi r24, 0x12 ; 18 - 672: 80 93 ed 00 sts 0x00ED, r24 - UEIENX = _BV(RXSTPE); // enable interrupt for incoming data - 676: 88 e0 ldi r24, 0x08 ; 8 - 678: 80 93 f0 00 sts 0x00F0, r24 - usb_conf = 0; - 67c: 10 92 3e 01 sts 0x013E, r1 - #if (NUMINTERFACES>1) - usb_if = 0xFF; - 680: 8f ef ldi r24, 0xFF ; 255 - 682: 80 93 0e 01 sts 0x010E, r24 - #endif - } + 1f8: ff 92 push r15 + 1fa: 0f 93 push r16 + 1fc: 1f 93 push r17 + 1fe: cf 93 push r28 + 200: df 93 push r29 + 202: ec 01 movw r28, r24 + 204: f6 2e mov r15, r22 + 206: 04 2f mov r16, r20 + 208: 12 2f mov r17, r18 + // /CS des MCP2515 auf Low ziehen + CANPORT_CS &= ~(1< + spi_putc(adress); + 212: 6f 2d mov r22, r15 + 214: ce 01 movw r24, r28 + 216: 0e 94 7f 00 call 0xfe ; 0xfe <_ZN3Can8spi_putcEh> + spi_putc(mask); + 21a: 60 2f mov r22, r16 + 21c: ce 01 movw r24, r28 + 21e: 0e 94 7f 00 call 0xfe ; 0xfe <_ZN3Can8spi_putcEh> + spi_putc(data); + 222: 61 2f mov r22, r17 + 224: ce 01 movw r24, r28 + 226: 0e 94 7f 00 call 0xfe ; 0xfe <_ZN3Can8spi_putcEh> + + // /CS Leitung wieder freigeben + CANPORT_CS |= (1<: -// Endpoint Interrupts -//----------------------------------------------------------------------------- -// Interrupts, triggered by incoming data in an endpoint, are handled here. - -ISR(USB_COM_vect) -{ - 696: 1f 92 push r1 - 698: 0f 92 push r0 - 69a: 0f b6 in r0, 0x3f ; 63 - 69c: 0f 92 push r0 - 69e: 11 24 eor r1, r1 - 6a0: 3f 92 push r3 - 6a2: 4f 92 push r4 - 6a4: 5f 92 push r5 - 6a6: 6f 92 push r6 - 6a8: 7f 92 push r7 - 6aa: 8f 92 push r8 - 6ac: 9f 92 push r9 - 6ae: af 92 push r10 - 6b0: bf 92 push r11 - 6b2: cf 92 push r12 - 6b4: df 92 push r13 - 6b6: ef 92 push r14 - 6b8: ff 92 push r15 - 6ba: 0f 93 push r16 - 6bc: 1f 93 push r17 - 6be: 2f 93 push r18 - 6c0: 3f 93 push r19 - 6c2: 4f 93 push r20 - 6c4: 5f 93 push r21 - 6c6: 6f 93 push r22 - 6c8: 7f 93 push r23 - 6ca: 8f 93 push r24 - 6cc: 9f 93 push r25 - 6ce: af 93 push r26 - 6d0: bf 93 push r27 - 6d2: ef 93 push r30 - 6d4: ff 93 push r31 - 6d6: cf 93 push r28 - 6d8: df 93 push r29 - 6da: cd b7 in r28, 0x3d ; 61 - 6dc: de b7 in r29, 0x3e ; 62 - 6de: 2a 97 sbiw r28, 0x0a ; 10 - 6e0: de bf out 0x3e, r29 ; 62 - 6e2: cd bf out 0x3d, r28 ; 61 - #if (USESN==2) // serial number in RAM - struct usb_string_descriptor_ram buf; - #endif - struct usb_control_request ucr; - - if (UEINT & 0x01) { - 6e4: 80 91 f4 00 lds r24, 0x00F4 - 6e8: 80 ff sbrs r24, 0 - 6ea: 58 c2 rjmp .+1200 ; 0xb9c <__vector_12+0x506> - // handle interrupts of endpoint 0 (control transfers) - UENUM = 0; - 6ec: 10 92 e9 00 sts 0x00E9, r1 - intbits = UEINTX; // save interrupt flags of the endpoint - 6f0: 80 91 e8 00 lds r24, 0x00E8 - if (intbits & _BV(RXSTPI)) { // control transfer, setup - 6f4: 83 ff sbrs r24, 3 - 6f6: 1f c2 rjmp .+1086 ; 0xb36 <__vector_12+0x4a0> - ucr.bmRequestType = UEDATX; - 6f8: e1 ef ldi r30, 0xF1 ; 241 - 6fa: f0 e0 ldi r31, 0x00 ; 0 - 6fc: 80 81 ld r24, Z - 6fe: 89 83 std Y+1, r24 ; 0x01 - ucr.bRequest = UEDATX; - 700: 80 81 ld r24, Z - 702: 8a 83 std Y+2, r24 ; 0x02 - ucr.wValue = UEDATX; - 704: 20 81 ld r18, Z - 706: 30 e0 ldi r19, 0x00 ; 0 - 708: 3c 83 std Y+4, r19 ; 0x04 - 70a: 2b 83 std Y+3, r18 ; 0x03 - ucr.wValue |= (UEDATX << 8); - 70c: 40 81 ld r20, Z - 70e: 94 2f mov r25, r20 - 710: 80 e0 ldi r24, 0x00 ; 0 - 712: 82 2b or r24, r18 - 714: 93 2b or r25, r19 - 716: 9c 83 std Y+4, r25 ; 0x04 - 718: 8b 83 std Y+3, r24 ; 0x03 - ucr.wIndex = UEDATX; - 71a: 20 81 ld r18, Z - 71c: 30 e0 ldi r19, 0x00 ; 0 - 71e: 3e 83 std Y+6, r19 ; 0x06 - 720: 2d 83 std Y+5, r18 ; 0x05 - ucr.wIndex |= (UEDATX << 8); - 722: 40 81 ld r20, Z - 724: 94 2f mov r25, r20 - 726: 80 e0 ldi r24, 0x00 ; 0 - 728: 82 2b or r24, r18 - 72a: 93 2b or r25, r19 - 72c: 9e 83 std Y+6, r25 ; 0x06 - 72e: 8d 83 std Y+5, r24 ; 0x05 - ucr.wLength = UEDATX; - 730: 20 81 ld r18, Z - 732: 30 e0 ldi r19, 0x00 ; 0 - 734: 38 87 std Y+8, r19 ; 0x08 - 736: 2f 83 std Y+7, r18 ; 0x07 - ucr.wLength |= (UEDATX << 8); - 738: 40 81 ld r20, Z - 73a: 94 2f mov r25, r20 - 73c: 80 e0 ldi r24, 0x00 ; 0 - 73e: 82 2b or r24, r18 - 740: 93 2b or r25, r19 - 742: 98 87 std Y+8, r25 ; 0x08 - 744: 8f 83 std Y+7, r24 ; 0x07 - UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); - 746: 82 ef ldi r24, 0xF2 ; 242 - 748: 80 93 e8 00 sts 0x00E8, r24 - if (ucr.bRequest == GET_DESCRIPTOR) { - 74c: 8a 81 ldd r24, Y+2 ; 0x02 - 74e: 86 30 cpi r24, 0x06 ; 6 - 750: 09 f0 breq .+2 ; 0x754 <__vector_12+0xbe> - 752: 30 c1 rjmp .+608 ; 0x9b4 <__vector_12+0x31e> - switch (ucr.wValue) { - 754: 8b 81 ldd r24, Y+3 ; 0x03 - 756: 9c 81 ldd r25, Y+4 ; 0x04 - 758: 81 15 cp r24, r1 - 75a: 23 e0 ldi r18, 0x03 ; 3 - 75c: 92 07 cpc r25, r18 - 75e: 09 f4 brne .+2 ; 0x762 <__vector_12+0xcc> - 760: fd c0 rjmp .+506 ; 0x95c <__vector_12+0x2c6> - 762: 48 f4 brcc .+18 ; 0x776 <__vector_12+0xe0> - 764: 81 15 cp r24, r1 - 766: 51 e0 ldi r21, 0x01 ; 1 - 768: 95 07 cpc r25, r21 - 76a: 89 f0 breq .+34 ; 0x78e <__vector_12+0xf8> - 76c: 81 15 cp r24, r1 - 76e: 92 40 sbci r25, 0x02 ; 2 - 770: 09 f0 breq .+2 ; 0x774 <__vector_12+0xde> - 772: 1c c1 rjmp .+568 ; 0x9ac <__vector_12+0x316> - 774: 26 c0 rjmp .+76 ; 0x7c2 <__vector_12+0x12c> - 776: 82 30 cpi r24, 0x02 ; 2 - 778: b3 e0 ldi r27, 0x03 ; 3 - 77a: 9b 07 cpc r25, r27 - 77c: 09 f4 brne .+2 ; 0x780 <__vector_12+0xea> - 77e: 02 c1 rjmp .+516 ; 0x984 <__vector_12+0x2ee> - 780: 08 f4 brcc .+2 ; 0x784 <__vector_12+0xee> - 782: f6 c0 rjmp .+492 ; 0x970 <__vector_12+0x2da> - 784: 83 30 cpi r24, 0x03 ; 3 - 786: 93 40 sbci r25, 0x03 ; 3 - 788: 09 f0 breq .+2 ; 0x78c <__vector_12+0xf6> - 78a: 10 c1 rjmp .+544 ; 0x9ac <__vector_12+0x316> - 78c: 05 c1 rjmp .+522 ; 0x998 <__vector_12+0x302> - case 0x0100: // device descriptor - usb_desc_out(false,&device_descriptor[0],pgm_read_byte(&device_descriptor[0]),ucr.wLength); - 78e: e4 e7 ldi r30, 0x74 ; 116 - 790: f0 e0 ldi r31, 0x00 ; 0 - 792: 44 91 lpm r20, Z - 794: 2f 81 ldd r18, Y+7 ; 0x07 - 796: 38 85 ldd r19, Y+8 ; 0x08 - 798: bf 01 movw r22, r30 - 79a: 80 e0 ldi r24, 0x00 ; 0 - 79c: 0e 94 51 02 call 0x4a2 ; 0x4a2 - break; - 7a0: 0c c2 rjmp .+1048 ; 0xbba <__vector_12+0x524> - case 0x0200: // configuration descriptor - // get number of activated endpoints - n=0; - #if (NUMINTERFACES>1) - for (j=0; j - 7aa: 9b 2f mov r25, r27 - 7ac: 49 0f add r20, r25 - 7ae: 81 50 subi r24, 0x01 ; 1 - 7b0: 33 96 adiw r30, 0x03 ; 3 - 7b2: 81 11 cpse r24, r1 - 7b4: f6 cf rjmp .-20 ; 0x7a2 <__vector_12+0x10c> - 7b6: 2f 5f subi r18, 0xFF ; 255 - 7b8: 3f 4f sbci r19, 0xFF ; 255 - break; - case 0x0200: // configuration descriptor - // get number of activated endpoints - n=0; - #if (NUMINTERFACES>1) - for (j=0; j - 7c0: 10 c0 rjmp .+32 ; 0x7e2 <__vector_12+0x14c> - ucr.wIndex |= (UEDATX << 8); - ucr.wLength = UEDATX; - ucr.wLength |= (UEDATX << 8); - UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); - if (ucr.bRequest == GET_DESCRIPTOR) { - switch (ucr.wValue) { - 7c2: 20 e0 ldi r18, 0x00 ; 0 - 7c4: 30 e0 ldi r19, 0x00 ; 0 - 7c6: 40 e0 ldi r20, 0x00 ; 0 -//----------------------------------------------------------------------------- -// Endpoint Interrupts -//----------------------------------------------------------------------------- -// Interrupts, triggered by incoming data in an endpoint, are handled here. - -ISR(USB_COM_vect) - 7c8: 14 e0 ldi r17, 0x04 ; 4 - case 0x0200: // configuration descriptor - // get number of activated endpoints - n=0; - #if (NUMINTERFACES>1) - for (j=0; j - 7d8: fc 01 movw r30, r24 - 7da: eb 5d subi r30, 0xDB ; 219 - 7dc: fe 4f sbci r31, 0xFE ; 254 - 7de: 81 2f mov r24, r17 - 7e0: e0 cf rjmp .-64 ; 0x7a2 <__vector_12+0x10c> - for (j=0; j - 7fe: 08 2f mov r16, r24 - 800: 19 2f mov r17, r25 - // initialize configuration descriptor - cfg->bLength = sizeof(cfg_desc); - 802: 89 e0 ldi r24, 0x09 ; 9 - 804: d8 01 movw r26, r16 - 806: 8c 93 st X, r24 - cfg->bDescriptorType = 2; - 808: 82 e0 ldi r24, 0x02 ; 2 - 80a: 11 96 adiw r26, 0x01 ; 1 - 80c: 8c 93 st X, r24 - 80e: 11 97 sbiw r26, 0x01 ; 1 - cfg->wTotalLength = s; - 810: 12 96 adiw r26, 0x02 ; 2 - 812: ec 92 st X, r14 - 814: 12 97 sbiw r26, 0x02 ; 2 - 816: 13 96 adiw r26, 0x03 ; 3 - 818: 1c 92 st X, r1 - 81a: 13 97 sbiw r26, 0x03 ; 3 - cfg->bNumInterfaces = NUMINTERFACES; - 81c: 14 96 adiw r26, 0x04 ; 4 - 81e: 8c 93 st X, r24 - 820: 14 97 sbiw r26, 0x04 ; 4 - cfg->bConfigurationValue = 1; - 822: 81 e0 ldi r24, 0x01 ; 1 - 824: 15 96 adiw r26, 0x05 ; 5 - 826: 8c 93 st X, r24 - 828: 15 97 sbiw r26, 0x05 ; 5 - cfg->iConfiguration = 0; - 82a: 16 96 adiw r26, 0x06 ; 6 - 82c: 1c 92 st X, r1 - 82e: 16 97 sbiw r26, 0x06 ; 6 - cfg->bmAttributes = POWERING; - 830: 80 ec ldi r24, 0xC0 ; 192 - 832: 17 96 adiw r26, 0x07 ; 7 - 834: 8c 93 st X, r24 - 836: 17 97 sbiw r26, 0x07 ; 7 - cfg->bMaxPower = MAXPOWER>>1; - 838: 8a ef ldi r24, 0xFA ; 250 - 83a: 18 96 adiw r26, 0x08 ; 8 - 83c: 8c 93 st X, r24 - // initialize interface descriptor - ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); - 83e: f8 01 movw r30, r16 - 840: 39 96 adiw r30, 0x09 ; 9 - 842: 1a 86 std Y+10, r1 ; 0x0a - 844: 19 86 std Y+9, r1 ; 0x09 -//----------------------------------------------------------------------------- -// Endpoint Interrupts -//----------------------------------------------------------------------------- -// Interrupts, triggered by incoming data in an endpoint, are handled here. - -ISR(USB_COM_vect) - 846: 44 e0 ldi r20, 0x04 ; 4 - 848: a1 2c mov r10, r1 - // initialize interface descriptor - ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); - #if (NUMINTERFACES>1) - for (j=0; jbLength = sizeof(if_desc); - 852: 0f 2e mov r0, r31 - 854: f9 e0 ldi r31, 0x09 ; 9 - 856: 7f 2e mov r7, r31 - 858: f0 2d mov r31, r0 - ifp->bDescriptorType = 4; - ifp->bInterfaceNumber = j; - ifp->bAlternateSetting = 0; - ifp->bNumEndpoints = n; - ifp->bInterfaceClass = 0xFF; - 85a: bb 24 eor r11, r11 - 85c: ba 94 dec r11 - ifp->iInterface = 0; - epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); - if (n) { // endpoints - for (i=0; ibLength = sizeof(ep_desc); - 85e: 0f 2e mov r0, r31 - 860: f7 e0 ldi r31, 0x07 ; 7 - 862: cf 2e mov r12, r31 - 864: f0 2d mov r31, r0 - epp->bDescriptorType = 5; - 866: 0f 2e mov r0, r31 - 868: f5 e0 ldi r31, 0x05 ; 5 - 86a: df 2e mov r13, r31 - 86c: f0 2d mov r31, r0 - epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); - epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); - 86e: 68 94 set - 870: 66 24 eor r6, r6 - 872: 61 f8 bld r6, 1 - 874: 0f 2e mov r0, r31 - 876: f3 e0 ldi r31, 0x03 ; 3 - 878: 5f 2e mov r5, r31 - 87a: f0 2d mov r31, r0 - 87c: 56 c0 rjmp .+172 ; 0x92a <__vector_12+0x294> - // initialize interface descriptor - ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); - #if (NUMINTERFACES>1) - for (j=0; j - 888: 79 2d mov r23, r9 - 88a: 67 0f add r22, r23 - 88c: 51 50 subi r21, 0x01 ; 1 - 88e: 03 96 adiw r24, 0x03 ; 3 - 890: 51 11 cpse r21, r1 - 892: f5 cf rjmp .-22 ; 0x87e <__vector_12+0x1e8> - #else - j = 0; - #endif - ifp->bLength = sizeof(if_desc); - 894: 70 82 st Z, r7 - ifp->bDescriptorType = 4; - 896: 41 83 std Z+1, r20 ; 0x01 - ifp->bInterfaceNumber = j; - 898: 42 82 std Z+2, r4 ; 0x02 - ifp->bAlternateSetting = 0; - 89a: 13 82 std Z+3, r1 ; 0x03 - ifp->bNumEndpoints = n; - 89c: 64 83 std Z+4, r22 ; 0x04 - ifp->bInterfaceClass = 0xFF; - 89e: b5 82 std Z+5, r11 ; 0x05 - ifp->bInterfaceSubClass = 0x00; - 8a0: 16 82 std Z+6, r1 ; 0x06 - ifp->bInterfaceProtocol = 0xFF; - 8a2: b7 82 std Z+7, r11 ; 0x07 - ifp->iInterface = 0; - 8a4: 10 86 std Z+8, r1 ; 0x08 - epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); - 8a6: 39 96 adiw r30, 0x09 ; 9 - if (n) { // endpoints - 8a8: 66 23 and r22, r22 - 8aa: c1 f1 breq .+112 ; 0x91c <__vector_12+0x286> -//----------------------------------------------------------------------------- -// Endpoint Interrupts -//----------------------------------------------------------------------------- -// Interrupts, triggered by incoming data in an endpoint, are handled here. - -ISR(USB_COM_vect) - 8ac: 83 2f mov r24, r19 - 8ae: 93 2d mov r25, r3 - 8b0: 6c e0 ldi r22, 0x0C ; 12 - 8b2: 70 e0 ldi r23, 0x00 ; 0 - 8b4: 0e 94 05 06 call 0xc0a ; 0xc0a <__mulhi3> - 8b8: 9c 01 movw r18, r24 - 8ba: 2a 5d subi r18, 0xDA ; 218 - 8bc: 3e 4f sbci r19, 0xFE ; 254 - 8be: 48 2c mov r4, r8 - 8c0: c9 01 movw r24, r18 - 8c2: b9 01 movw r22, r18 - 8c4: 61 50 subi r22, 0x01 ; 1 - 8c6: 71 09 sbc r23, r1 - ifp->bInterfaceProtocol = 0xFF; - ifp->iInterface = 0; - epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); - if (n) { // endpoints - for (i=0; i - epp->bLength = sizeof(ep_desc); - 8d0: c0 82 st Z, r12 - epp->bDescriptorType = 5; - 8d2: d1 82 std Z+1, r13 ; 0x01 - epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); - 8d4: 65 2f mov r22, r21 - 8d6: 67 95 ror r22 - 8d8: 66 27 eor r22, r22 - 8da: 67 95 ror r22 - 8dc: 64 29 or r22, r4 - 8de: 62 83 std Z+2, r22 ; 0x02 - epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); - 8e0: 51 34 cpi r21, 0x41 ; 65 - 8e2: 41 f0 breq .+16 ; 0x8f4 <__vector_12+0x25e> - 8e4: 50 34 cpi r21, 0x40 ; 64 - 8e6: 41 f0 breq .+16 ; 0x8f8 <__vector_12+0x262> - 8e8: 51 38 cpi r21, 0x81 ; 129 - 8ea: 41 f0 breq .+16 ; 0x8fc <__vector_12+0x266> - 8ec: 50 38 cpi r21, 0x80 ; 128 - 8ee: 41 f4 brne .+16 ; 0x900 <__vector_12+0x26a> - 8f0: 56 2d mov r21, r6 - 8f2: 07 c0 rjmp .+14 ; 0x902 <__vector_12+0x26c> - 8f4: 5f 2d mov r21, r15 - 8f6: 05 c0 rjmp .+10 ; 0x902 <__vector_12+0x26c> - 8f8: 5f 2d mov r21, r15 - 8fa: 03 c0 rjmp .+6 ; 0x902 <__vector_12+0x26c> - 8fc: 56 2d mov r21, r6 - 8fe: 01 c0 rjmp .+2 ; 0x902 <__vector_12+0x26c> - 900: 55 2d mov r21, r5 - 902: 53 83 std Z+3, r21 ; 0x03 - epp->wMaxPacketSize = EPCO.ep_size; - 904: dc 01 movw r26, r24 - 906: 8c 91 ld r24, X - 908: 84 83 std Z+4, r24 ; 0x04 - 90a: 15 82 std Z+5, r1 ; 0x05 - epp->bInterval = 0; - 90c: 16 82 std Z+6, r1 ; 0x06 - epp = (ep_desc *)((uint16_t)(epp)+sizeof(ep_desc)); - 90e: 37 96 adiw r30, 0x07 ; 7 - 910: 43 94 inc r4 - 912: 2d 5f subi r18, 0xFD ; 253 - 914: 3f 4f sbci r19, 0xFF ; 255 - ifp->bInterfaceSubClass = 0x00; - ifp->bInterfaceProtocol = 0xFF; - ifp->iInterface = 0; - epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); - if (n) { // endpoints - for (i=0; i - 91c: a9 85 ldd r26, Y+9 ; 0x09 - 91e: ba 85 ldd r27, Y+10 ; 0x0a - 920: 11 96 adiw r26, 0x01 ; 1 - 922: ba 87 std Y+10, r27 ; 0x0a - 924: a9 87 std Y+9, r26 ; 0x09 - cfg->bmAttributes = POWERING; - cfg->bMaxPower = MAXPOWER>>1; - // initialize interface descriptor - ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); - #if (NUMINTERFACES>1) - for (j=0; j - 92a: 49 84 ldd r4, Y+9 ; 0x09 - n = 0; - for (i=0; i - 93c: 8b 5d subi r24, 0xDB ; 219 - 93e: 9e 4f sbci r25, 0xFE ; 254 - 940: 54 2f mov r21, r20 - 942: 6a 2d mov r22, r10 - 944: 9c cf rjmp .-200 ; 0x87e <__vector_12+0x1e8> - #if (NUMINTERFACES>1) - ifp = (if_desc *)epp; - } - #endif - // finally - usb_desc_out(true,(uint8_t *)cfg,s,ucr.wLength); - 946: 2f 81 ldd r18, Y+7 ; 0x07 - 948: 38 85 ldd r19, Y+8 ; 0x08 - 94a: 4e 2d mov r20, r14 - 94c: b8 01 movw r22, r16 - 94e: 81 e0 ldi r24, 0x01 ; 1 - 950: 0e 94 51 02 call 0x4a2 ; 0x4a2 - free(cfg); - 954: c8 01 movw r24, r16 - 956: 0e 94 b2 06 call 0xd64 ; 0xd64 - break; - 95a: 2f c1 rjmp .+606 ; 0xbba <__vector_12+0x524> - case 0x0300: // String 0 - usb_desc_out(false,(uint8_t *)&string0.bLength,pgm_read_byte(&string0.bLength),ucr.wLength); - 95c: e6 e8 ldi r30, 0x86 ; 134 - 95e: f0 e0 ldi r31, 0x00 ; 0 - 960: 44 91 lpm r20, Z - 962: 2f 81 ldd r18, Y+7 ; 0x07 - 964: 38 85 ldd r19, Y+8 ; 0x08 - 966: bf 01 movw r22, r30 - 968: 80 e0 ldi r24, 0x00 ; 0 - 96a: 0e 94 51 02 call 0x4a2 ; 0x4a2 - break; - 96e: 25 c1 rjmp .+586 ; 0xbba <__vector_12+0x524> - case 0x0301: // String 1 - usb_desc_out(false,(uint8_t *)&string1.bLength,pgm_read_byte(&string1.bLength),ucr.wLength); - 970: ea e8 ldi r30, 0x8A ; 138 - 972: f0 e0 ldi r31, 0x00 ; 0 - 974: 44 91 lpm r20, Z - 976: 2f 81 ldd r18, Y+7 ; 0x07 - 978: 38 85 ldd r19, Y+8 ; 0x08 - 97a: bf 01 movw r22, r30 - 97c: 80 e0 ldi r24, 0x00 ; 0 - 97e: 0e 94 51 02 call 0x4a2 ; 0x4a2 - break; - 982: 1b c1 rjmp .+566 ; 0xbba <__vector_12+0x524> - case 0x0302: // String 2 - usb_desc_out(false,(uint8_t *)&string2.bLength,pgm_read_byte(&string2.bLength),ucr.wLength); - 984: e0 ea ldi r30, 0xA0 ; 160 - 986: f0 e0 ldi r31, 0x00 ; 0 - 988: 44 91 lpm r20, Z - 98a: 2f 81 ldd r18, Y+7 ; 0x07 - 98c: 38 85 ldd r19, Y+8 ; 0x08 - 98e: bf 01 movw r22, r30 - 990: 80 e0 ldi r24, 0x00 ; 0 - 992: 0e 94 51 02 call 0x4a2 ; 0x4a2 - break; - 996: 11 c1 rjmp .+546 ; 0xbba <__vector_12+0x524> - #if (USESN>0) - case 0x0303: // String 3, serial number - #if (USESN==1) // Seriennummer im Flash - usb_desc_out(false,(uint8_t *)&string3.bLength,pgm_read_byte(&string3.bLength),ucr.wLength); - 998: e2 ec ldi r30, 0xC2 ; 194 - 99a: f0 e0 ldi r31, 0x00 ; 0 - 99c: 44 91 lpm r20, Z - 99e: 2f 81 ldd r18, Y+7 ; 0x07 - 9a0: 38 85 ldd r19, Y+8 ; 0x08 - 9a2: bf 01 movw r22, r30 - 9a4: 80 e0 ldi r24, 0x00 ; 0 - 9a6: 0e 94 51 02 call 0x4a2 ; 0x4a2 - i++; - } - buf.bLength=2*i+2; // total length of the data set - usb_desc_out(true,(uint8_t *)&buf,buf.bLength,ucr.wLength); - #endif - break; - 9aa: 07 c1 rjmp .+526 ; 0xbba <__vector_12+0x524> - #endif - default: - STALL; // stall - 9ac: 81 e2 ldi r24, 0x21 ; 33 - 9ae: 80 93 eb 00 sts 0x00EB, r24 - 9b2: 03 c1 rjmp .+518 ; 0xbba <__vector_12+0x524> - } - return; - } - if (ucr.bRequest == SET_ADDRESS) { - 9b4: 85 30 cpi r24, 0x05 ; 5 - 9b6: 71 f4 brne .+28 ; 0x9d4 <__vector_12+0x33e> - USB_SEND_IN; - 9b8: 8e ef ldi r24, 0xFE ; 254 - 9ba: 80 93 e8 00 sts 0x00E8, r24 - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - 9be: e8 ee ldi r30, 0xE8 ; 232 - 9c0: f0 e0 ldi r31, 0x00 ; 0 - 9c2: 80 81 ld r24, Z - 9c4: 80 ff sbrs r24, 0 - 9c6: fd cf rjmp .-6 ; 0x9c2 <__vector_12+0x32c> - return; - } - if (ucr.bRequest == SET_ADDRESS) { - USB_SEND_IN; - usb_wait_in_ready(); - UDADDR = ucr.wValue | _BV(ADDEN); - 9c8: 8b 81 ldd r24, Y+3 ; 0x03 - 9ca: 9c 81 ldd r25, Y+4 ; 0x04 - 9cc: 80 68 ori r24, 0x80 ; 128 - 9ce: 80 93 e3 00 sts 0x00E3, r24 - 9d2: f3 c0 rjmp .+486 ; 0xbba <__vector_12+0x524> - return; - } - if (ucr.bRequest == SET_CONFIGURATION && ucr.bmRequestType == 0) { // another configuration will be chosen - 9d4: 89 30 cpi r24, 0x09 ; 9 - 9d6: c1 f4 brne .+48 ; 0xa08 <__vector_12+0x372> - 9d8: 99 81 ldd r25, Y+1 ; 0x01 - 9da: 91 11 cpse r25, r1 - 9dc: 60 c0 rjmp .+192 ; 0xa9e <__vector_12+0x408> - if (ucr.wValue==1) { // configuration 1 will be chosen - 9de: 8b 81 ldd r24, Y+3 ; 0x03 - 9e0: 9c 81 ldd r25, Y+4 ; 0x04 - 9e2: 01 97 sbiw r24, 0x01 ; 1 - 9e4: 69 f4 brne .+26 ; 0xa00 <__vector_12+0x36a> - usb_conf = ucr.wValue; - 9e6: 81 e0 ldi r24, 0x01 ; 1 - 9e8: 80 93 3e 01 sts 0x013E, r24 - USB_SEND_IN; - 9ec: 8e ef ldi r24, 0xFE ; 254 - 9ee: 80 93 e8 00 sts 0x00E8, r24 - #if (NUMINTERFACES==1) - usb_endpoints(); // initialize endpoints - #else - usb_if = 0; // select interface 0 - 9f2: 10 92 0e 01 sts 0x010E, r1 - usb_endpoints(usb_if); // initialize endpoints - 9f6: 80 91 0e 01 lds r24, 0x010E - 9fa: 0e 94 c3 01 call 0x386 ; 0x386 - 9fe: dd c0 rjmp .+442 ; 0xbba <__vector_12+0x524> - #endif - } else { // other configurations are not supported in this version - STALL; // stall - a00: 81 e2 ldi r24, 0x21 ; 33 - a02: 80 93 eb 00 sts 0x00EB, r24 - a06: d9 c0 rjmp .+434 ; 0xbba <__vector_12+0x524> - } - return; - } - if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { - a08: 88 30 cpi r24, 0x08 ; 8 - a0a: 89 f4 brne .+34 ; 0xa2e <__vector_12+0x398> - a0c: 99 81 ldd r25, Y+1 ; 0x01 - a0e: 90 38 cpi r25, 0x80 ; 128 - a10: 09 f0 breq .+2 ; 0xa14 <__vector_12+0x37e> - a12: 57 c0 rjmp .+174 ; 0xac2 <__vector_12+0x42c> - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - a14: e8 ee ldi r30, 0xE8 ; 232 - a16: f0 e0 ldi r31, 0x00 ; 0 - a18: 80 81 ld r24, Z - a1a: 80 ff sbrs r24, 0 - a1c: fd cf rjmp .-6 ; 0xa18 <__vector_12+0x382> - } - return; - } - if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { - usb_wait_in_ready(); - UEDATX = usb_conf; - a1e: 80 91 3e 01 lds r24, 0x013E - a22: 80 93 f1 00 sts 0x00F1, r24 - USB_SEND_IN; - a26: 8e ef ldi r24, 0xFE ; 254 - a28: 80 93 e8 00 sts 0x00E8, r24 - a2c: c6 c0 rjmp .+396 ; 0xbba <__vector_12+0x524> - return; - } - if (ucr.bRequest == GET_STATUS) { - a2e: 81 11 cpse r24, r1 - a30: 1c c0 rjmp .+56 ; 0xa6a <__vector_12+0x3d4> - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - a32: e8 ee ldi r30, 0xE8 ; 232 - a34: f0 e0 ldi r31, 0x00 ; 0 - a36: 80 81 ld r24, Z - a38: 80 ff sbrs r24, 0 - a3a: fd cf rjmp .-6 ; 0xa36 <__vector_12+0x3a0> - } - if (ucr.bRequest == GET_STATUS) { - usb_wait_in_ready(); - i = 0; - #ifdef SUPPORT_ENDPOINT_HALT - if (ucr.bmRequestType == 0x82) { - a3c: 89 81 ldd r24, Y+1 ; 0x01 - a3e: 82 38 cpi r24, 0x82 ; 130 - a40: 59 f4 brne .+22 ; 0xa58 <__vector_12+0x3c2> - UENUM = ucr.wIndex; - a42: 8d 81 ldd r24, Y+5 ; 0x05 - a44: e9 ee ldi r30, 0xE9 ; 233 - a46: f0 e0 ldi r31, 0x00 ; 0 - a48: 80 83 st Z, r24 - if (UECONX & _BV(STALLRQ)) i = 1; - a4a: 80 91 eb 00 lds r24, 0x00EB - a4e: 85 fb bst r24, 5 - a50: 88 27 eor r24, r24 - a52: 80 f9 bld r24, 0 - UENUM = 0; - a54: 10 82 st Z, r1 - a56: 01 c0 rjmp .+2 ; 0xa5a <__vector_12+0x3c4> - USB_SEND_IN; - return; - } - if (ucr.bRequest == GET_STATUS) { - usb_wait_in_ready(); - i = 0; - a58: 80 e0 ldi r24, 0x00 ; 0 - UENUM = ucr.wIndex; - if (UECONX & _BV(STALLRQ)) i = 1; - UENUM = 0; - } - #endif - UEDATX = i; - a5a: e1 ef ldi r30, 0xF1 ; 241 - a5c: f0 e0 ldi r31, 0x00 ; 0 - a5e: 80 83 st Z, r24 - UEDATX = 0; - a60: 10 82 st Z, r1 - USB_SEND_IN; - a62: 8e ef ldi r24, 0xFE ; 254 - a64: 80 93 e8 00 sts 0x00E8, r24 - a68: a8 c0 rjmp .+336 ; 0xbba <__vector_12+0x524> - return; - } - #if (NUMINTERFACES>1) - if (ucr.bRequest == SET_INTERFACE && (ucr.bmRequestType == 0x20 || ucr.bmRequestType == 0)) { // another interface will be chosen - a6a: 8b 30 cpi r24, 0x0B ; 11 - a6c: c1 f4 brne .+48 ; 0xa9e <__vector_12+0x408> - a6e: 89 81 ldd r24, Y+1 ; 0x01 - a70: 80 32 cpi r24, 0x20 ; 32 - a72: 11 f0 breq .+4 ; 0xa78 <__vector_12+0x3e2> - a74: 81 11 cpse r24, r1 - a76: 55 c0 rjmp .+170 ; 0xb22 <__vector_12+0x48c> - if (ucr.wIndex - usb_if = ucr.wIndex; - a82: 80 93 0e 01 sts 0x010E, r24 - USB_SEND_IN; - a86: 8e ef ldi r24, 0xFE ; 254 - a88: 80 93 e8 00 sts 0x00E8, r24 - usb_endpoints(usb_if); // initialize endpoints - a8c: 80 91 0e 01 lds r24, 0x010E - a90: 0e 94 c3 01 call 0x386 ; 0x386 - a94: 92 c0 rjmp .+292 ; 0xbba <__vector_12+0x524> - } else { // other configurations are not supported in this version - STALL; // stall - a96: 81 e2 ldi r24, 0x21 ; 33 - a98: 80 93 eb 00 sts 0x00EB, r24 - a9c: 8e c0 rjmp .+284 ; 0xbba <__vector_12+0x524> - } - return; - } - if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { - a9e: 8a 30 cpi r24, 0x0A ; 10 - aa0: 81 f4 brne .+32 ; 0xac2 <__vector_12+0x42c> - aa2: 89 81 ldd r24, Y+1 ; 0x01 - aa4: 80 38 cpi r24, 0x80 ; 128 - aa6: e9 f5 brne .+122 ; 0xb22 <__vector_12+0x48c> - -#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) - -static inline void usb_wait_in_ready(void) -{ - while (!(UEINTX & _BV(TXINI))); - aa8: e8 ee ldi r30, 0xE8 ; 232 - aaa: f0 e0 ldi r31, 0x00 ; 0 - aac: 80 81 ld r24, Z - aae: 80 ff sbrs r24, 0 - ab0: fd cf rjmp .-6 ; 0xaac <__vector_12+0x416> - } - return; - } - if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { - usb_wait_in_ready(); - UEDATX = usb_if; - ab2: 80 91 0e 01 lds r24, 0x010E - ab6: 80 93 f1 00 sts 0x00F1, r24 - USB_SEND_IN; - aba: 8e ef ldi r24, 0xFE ; 254 - abc: 80 93 e8 00 sts 0x00E8, r24 - ac0: 7c c0 rjmp .+248 ; 0xbba <__vector_12+0x524> - return; - } - #endif - #ifdef SUPPORT_ENDPOINT_HALT - if ((ucr.bRequest == CLEAR_FEATURE || ucr.bRequest == SET_FEATURE) - ac2: 81 30 cpi r24, 0x01 ; 1 - ac4: 11 f0 breq .+4 ; 0xaca <__vector_12+0x434> - ac6: 83 30 cpi r24, 0x03 ; 3 - ac8: 61 f5 brne .+88 ; 0xb22 <__vector_12+0x48c> - && ucr.bmRequestType == 0x02 && ucr.wValue == 0) { - aca: 89 81 ldd r24, Y+1 ; 0x01 - acc: 82 30 cpi r24, 0x02 ; 2 - ace: 49 f5 brne .+82 ; 0xb22 <__vector_12+0x48c> - ad0: 8b 81 ldd r24, Y+3 ; 0x03 - ad2: 9c 81 ldd r25, Y+4 ; 0x04 - ad4: 89 2b or r24, r25 - ad6: 29 f5 brne .+74 ; 0xb22 <__vector_12+0x48c> - i = ucr.wIndex & 0x7F; - ad8: 8d 81 ldd r24, Y+5 ; 0x05 - ada: 9e 81 ldd r25, Y+6 ; 0x06 - adc: 8f 77 andi r24, 0x7F ; 127 - ade: 99 27 eor r25, r25 - if (i >= 1 && i <= MAX_ENDPOINT) { - ae0: 38 2f mov r19, r24 - ae2: 31 50 subi r19, 0x01 ; 1 - ae4: 34 30 cpi r19, 0x04 ; 4 - ae6: e8 f4 brcc .+58 ; 0xb22 <__vector_12+0x48c> - USB_SEND_IN; - ae8: 3e ef ldi r19, 0xFE ; 254 - aea: 30 93 e8 00 sts 0x00E8, r19 - UENUM = i; - aee: 80 93 e9 00 sts 0x00E9, r24 - if (ucr.bRequest == SET_FEATURE) { - af2: 2a 81 ldd r18, Y+2 ; 0x02 - af4: 23 30 cpi r18, 0x03 ; 3 - af6: 21 f4 brne .+8 ; 0xb00 <__vector_12+0x46a> - UECONX = _BV(STALLRQ)|_BV(EPEN); - af8: 81 e2 ldi r24, 0x21 ; 33 - afa: 80 93 eb 00 sts 0x00EB, r24 - afe: 5d c0 rjmp .+186 ; 0xbba <__vector_12+0x524> - } else { - UECONX = _BV(STALLRQC)|_BV(RSTDT)|_BV(EPEN); - b00: 99 e1 ldi r25, 0x19 ; 25 - b02: 90 93 eb 00 sts 0x00EB, r25 - UERST = _BV(i); - b06: 21 e0 ldi r18, 0x01 ; 1 - b08: 30 e0 ldi r19, 0x00 ; 0 - b0a: f9 01 movw r30, r18 - b0c: 02 c0 rjmp .+4 ; 0xb12 <__vector_12+0x47c> - b0e: ee 0f add r30, r30 - b10: ff 1f adc r31, r31 - b12: 8a 95 dec r24 - b14: e2 f7 brpl .-8 ; 0xb0e <__vector_12+0x478> - b16: cf 01 movw r24, r30 - b18: ea ee ldi r30, 0xEA ; 234 - b1a: f0 e0 ldi r31, 0x00 ; 0 - b1c: 80 83 st Z, r24 - UERST = 0; - b1e: 10 82 st Z, r1 - b20: 4c c0 rjmp .+152 ; 0xbba <__vector_12+0x524> - } - } - #endif - #ifdef USERDEFCONTROLS - // handle user defined control requests - if (!usb_controlrequest(&ucr)) - b22: ce 01 movw r24, r28 - b24: 01 96 adiw r24, 0x01 ; 1 - b26: 0e 94 69 01 call 0x2d2 ; 0x2d2 - b2a: 81 11 cpse r24, r1 - b2c: 46 c0 rjmp .+140 ; 0xbba <__vector_12+0x524> - UECONX = _BV(STALLRQ) | _BV(EPEN); // stall - b2e: 81 e2 ldi r24, 0x21 ; 33 - b30: 80 93 eb 00 sts 0x00EB, r24 - b34: 42 c0 rjmp .+132 ; 0xbba <__vector_12+0x524> - return; - #endif - } - UECONX = _BV(STALLRQ) | _BV(EPEN); // stall - b36: 81 e2 ldi r24, 0x21 ; 33 - b38: 80 93 eb 00 sts 0x00EB, r24 - b3c: 2f c0 rjmp .+94 ; 0xb9c <__vector_12+0x506> - b3e: f2 2e mov r15, r18 - } - - // handle interrupts for further endpoints - for (i=1; i<=MAX_ENDPOINT; i++) { - if (UEINT & _BV(i)) { - b40: 40 81 ld r20, Z - b42: 50 e0 ldi r21, 0x00 ; 0 - b44: 02 2e mov r0, r18 - b46: 02 c0 rjmp .+4 ; 0xb4c <__vector_12+0x4b6> - b48: 55 95 asr r21 - b4a: 47 95 ror r20 - b4c: 0a 94 dec r0 - b4e: e2 f7 brpl .-8 ; 0xb48 <__vector_12+0x4b2> - b50: 40 ff sbrs r20, 0 - b52: 1b c0 rjmp .+54 ; 0xb8a <__vector_12+0x4f4> - UENUM=i; // select endpoint - b54: db 01 movw r26, r22 - b56: 2c 93 st X, r18 - intbits = UEINTX; // save interrupt bits of the endpoint - b58: d6 01 movw r26, r12 - b5a: 8c 91 ld r24, X - if (intbits & _BV(RXOUTI)) { // interrupt occured by incoming data - b5c: 82 ff sbrs r24, 2 - b5e: 13 c0 rjmp .+38 ; 0xb86 <__vector_12+0x4f0> - #ifdef MEGA4_6 - if (((uint16_t)(UEBCHX)<<8)+UEBCLX) { // data available in input endpoint - usb_ep(i,((uint16_t)(UEBCHX)<<8)+UEBCLX); - #else - if (UEBCLX) { // data available in input endpoint - b60: 80 91 f2 00 lds r24, 0x00F2 - b64: 88 23 and r24, r24 - b66: 41 f0 breq .+16 ; 0xb78 <__vector_12+0x4e2> - usb_ep(i,UEBCLX); - b68: 60 91 f2 00 lds r22, 0x00F2 - b6c: 70 e0 ldi r23, 0x00 ; 0 - b6e: 82 2f mov r24, r18 - b70: 0e 94 9a 01 call 0x334 ; 0x334 - #endif - UENUM=i; // reselect endpoint (if changed by handling routine) - b74: f0 92 e9 00 sts 0x00E9, r15 - } - UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags - b78: e8 ee ldi r30, 0xE8 ; 232 - b7a: f0 e0 ldi r31, 0x00 ; 0 - b7c: 89 ef ldi r24, 0xF9 ; 249 - b7e: 80 83 st Z, r24 - UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! - b80: 8f e7 ldi r24, 0x7F ; 127 - b82: 80 83 st Z, r24 - b84: 1a c0 rjmp .+52 ; 0xbba <__vector_12+0x524> - return; - } - STALL; // stall - b86: d8 01 movw r26, r16 - b88: 9c 93 st X, r25 - b8a: 2f 5f subi r18, 0xFF ; 255 - b8c: 3f 4f sbci r19, 0xFF ; 255 - } - UECONX = _BV(STALLRQ) | _BV(EPEN); // stall - } - - // handle interrupts for further endpoints - for (i=1; i<=MAX_ENDPOINT; i++) { - b8e: 25 30 cpi r18, 0x05 ; 5 - b90: 31 05 cpc r19, r1 - b92: a9 f6 brne .-86 ; 0xb3e <__vector_12+0x4a8> - return; - } - STALL; // stall - } - } - STALL; // stall - b94: 81 e2 ldi r24, 0x21 ; 33 - b96: 80 93 eb 00 sts 0x00EB, r24 - b9a: 0f c0 rjmp .+30 ; 0xbba <__vector_12+0x524> - USB_SEND_IN; - return; - } - if (ucr.bRequest == GET_STATUS) { - usb_wait_in_ready(); - i = 0; - b9c: 21 e0 ldi r18, 0x01 ; 1 - b9e: 30 e0 ldi r19, 0x00 ; 0 - UECONX = _BV(STALLRQ) | _BV(EPEN); // stall - } - - // handle interrupts for further endpoints - for (i=1; i<=MAX_ENDPOINT; i++) { - if (UEINT & _BV(i)) { - ba0: e4 ef ldi r30, 0xF4 ; 244 - ba2: f0 e0 ldi r31, 0x00 ; 0 - UENUM=i; // select endpoint - ba4: 69 ee ldi r22, 0xE9 ; 233 - ba6: 70 e0 ldi r23, 0x00 ; 0 - intbits = UEINTX; // save interrupt bits of the endpoint - ba8: 0f 2e mov r0, r31 - baa: f8 ee ldi r31, 0xE8 ; 232 - bac: cf 2e mov r12, r31 - bae: d1 2c mov r13, r1 - bb0: f0 2d mov r31, r0 - } - UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags - UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! - return; - } - STALL; // stall - bb2: 0b ee ldi r16, 0xEB ; 235 - bb4: 10 e0 ldi r17, 0x00 ; 0 - bb6: 91 e2 ldi r25, 0x21 ; 33 - bb8: c2 cf rjmp .-124 ; 0xb3e <__vector_12+0x4a8> - } - } - STALL; // stall +00000238 <_ZN3Can8init_canEv>: + _delay_ms(100); + SPCR = (1<: - c0a: 55 27 eor r21, r21 - c0c: 00 24 eor r0, r0 +void Can::init_can() { + 238: cf 93 push r28 + 23a: df 93 push r29 + 23c: ec 01 movw r28, r24 + + // MCP2515 per Software Reset zuruecksetzten, + // danach ist der MCP2515 im Configuration Mode + CANPORT_CS &= ~(1< + 246: 8f e9 ldi r24, 0x9F ; 159 + 248: 9f e0 ldi r25, 0x0F ; 15 + 24a: 01 97 sbiw r24, 0x01 ; 1 + 24c: f1 f7 brne .-4 ; 0x24a <_ZN3Can8init_canEv+0x12> + 24e: 00 c0 rjmp .+0 ; 0x250 <_ZN3Can8init_canEv+0x18> + 250: 00 00 nop + _delay_ms(1); + CANPORT_CS |= (1< + 25c: 00 c0 rjmp .+0 ; 0x25e <_ZN3Can8init_canEv+0x26> + 25e: 00 00 nop + * Bus speed = 1 / (Total # of TQ) * TQ + * = 1 / 8 * TQ = 125 kHz + */ + //return; + // BRP = 7 + mcp2515_write_register( CNF1, (1< + + // Prop Seg und Phase Seg1 einstellen + mcp2515_write_register( CNF2, (1< + + // Wake-up Filter deaktivieren, Phase Seg2 einstellen + mcp2515_write_register( CNF3, (1< + + // Aktivieren der Rx Buffer Interrupts + mcp2515_write_register( CANINTE, (1< + /* + * Einstellen der Filter + */ + + // Buffer 0 : Empfangen aller Nachrichten + mcp2515_write_register( RXB0CTRL, (1< + + // Buffer 1 : Empfangen aller Nachrichten + mcp2515_write_register( RXB1CTRL, (1< + + // Alle Bits der Empfangsmaske loeschen, + // damit werden alle Nachrichten empfangen + mcp2515_write_register( RXM0SIDH, 0 ); + 29c: 40 e0 ldi r20, 0x00 ; 0 + 29e: 60 e2 ldi r22, 0x20 ; 32 + 2a0: ce 01 movw r24, r28 + 2a2: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0SIDL, 0 ); + 2a6: 40 e0 ldi r20, 0x00 ; 0 + 2a8: 61 e2 ldi r22, 0x21 ; 33 + 2aa: ce 01 movw r24, r28 + 2ac: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0EID8, 0 ); + 2b0: 40 e0 ldi r20, 0x00 ; 0 + 2b2: 62 e2 ldi r22, 0x22 ; 34 + 2b4: ce 01 movw r24, r28 + 2b6: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM0EID0, 0 ); + 2ba: 40 e0 ldi r20, 0x00 ; 0 + 2bc: 63 e2 ldi r22, 0x23 ; 35 + 2be: ce 01 movw r24, r28 + 2c0: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + + mcp2515_write_register( RXM1SIDH, 0 ); + 2c4: 40 e0 ldi r20, 0x00 ; 0 + 2c6: 64 e2 ldi r22, 0x24 ; 36 + 2c8: ce 01 movw r24, r28 + 2ca: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1SIDL, 0 ); + 2ce: 40 e0 ldi r20, 0x00 ; 0 + 2d0: 65 e2 ldi r22, 0x25 ; 37 + 2d2: ce 01 movw r24, r28 + 2d4: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1EID8, 0 ); + 2d8: 40 e0 ldi r20, 0x00 ; 0 + 2da: 66 e2 ldi r22, 0x26 ; 38 + 2dc: ce 01 movw r24, r28 + 2de: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + mcp2515_write_register( RXM1EID0, 0 ); + 2e2: 40 e0 ldi r20, 0x00 ; 0 + 2e4: 67 e2 ldi r22, 0x27 ; 39 + 2e6: ce 01 movw r24, r28 + 2e8: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + /* + * Einstellen der Pin Funktionen + */ + + // Deaktivieren der Pins RXnBF Pins (High Impedance State) + mcp2515_write_register( BFPCTRL, 0 ); + 2ec: 40 e0 ldi r20, 0x00 ; 0 + 2ee: 6c e0 ldi r22, 0x0C ; 12 + 2f0: ce 01 movw r24, r28 + 2f2: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + + // TXnRTS Bits als Inputs schalten + mcp2515_write_register( TXRTSCTRL, 0 ); + 2f6: 40 e0 ldi r20, 0x00 ; 0 + 2f8: 6d e0 ldi r22, 0x0D ; 13 + 2fa: ce 01 movw r24, r28 + 2fc: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <_ZN3Can22mcp2515_write_registerEhh> + + // Device zurueck in den normalen Modus versetzten + mcp2515_bit_modify( CANCTRL, 0xE0, 0); + 300: 20 e0 ldi r18, 0x00 ; 0 + 302: 40 ee ldi r20, 0xE0 ; 224 + 304: 6f e0 ldi r22, 0x0F ; 15 + 306: ce 01 movw r24, r28 + 308: 0e 94 fc 00 call 0x1f8 ; 0x1f8 <_ZN3Can18mcp2515_bit_modifyEhhh> +} + 30c: df 91 pop r29 + 30e: cf 91 pop r28 + 310: 08 95 ret -00000c0e <__mulhi3_loop>: - c0e: 80 ff sbrs r24, 0 - c10: 02 c0 rjmp .+4 ; 0xc16 <__mulhi3_skip1> - c12: 06 0e add r0, r22 - c14: 57 1f adc r21, r23 +00000312 <_ZN3CanC1Ev>: -00000c16 <__mulhi3_skip1>: - c16: 66 0f add r22, r22 - c18: 77 1f adc r23, r23 - c1a: 61 15 cp r22, r1 - c1c: 71 05 cpc r23, r1 - c1e: 21 f0 breq .+8 ; 0xc28 <__mulhi3_exit> - c20: 96 95 lsr r25 - c22: 87 95 ror r24 - c24: 00 97 sbiw r24, 0x00 ; 0 - c26: 99 f7 brne .-26 ; 0xc0e <__mulhi3_loop> +#define CANDDR_RST DDRD +#define CANPORT_RST PORTD +#define CANP_RST PIND6 -00000c28 <__mulhi3_exit>: - c28: 95 2f mov r25, r21 - c2a: 80 2d mov r24, r0 - c2c: 08 95 ret +Can::Can() { + 312: 0f 93 push r16 + 314: 1f 93 push r17 + 316: cf 93 push r28 + 318: df 93 push r29 + 31a: 00 d0 rcall .+0 ; 0x31c <_ZN3CanC1Ev+0xa> + 31c: cd b7 in r28, 0x3d ; 61 + 31e: de b7 in r29, 0x3e ; 62 + 320: 8c 01 movw r16, r24 + Led(0).color(Led::GREEN); + 322: 62 e0 ldi r22, 0x02 ; 2 + 324: ce 01 movw r24, r28 + 326: 02 96 adiw r24, 0x02 ; 2 + 328: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 32c: 2f ef ldi r18, 0xFF ; 255 + 32e: 81 ee ldi r24, 0xE1 ; 225 + 330: 94 e0 ldi r25, 0x04 ; 4 + 332: 21 50 subi r18, 0x01 ; 1 + 334: 80 40 sbci r24, 0x00 ; 0 + 336: 90 40 sbci r25, 0x00 ; 0 + 338: e1 f7 brne .-8 ; 0x332 <_ZN3CanC1Ev+0x20> + 33a: 00 c0 rjmp .+0 ; 0x33c <_ZN3CanC1Ev+0x2a> + 33c: 00 00 nop + _delay_ms(100); + Led(0).color(Led::BLACK); + 33e: 60 e0 ldi r22, 0x00 ; 0 + 340: ce 01 movw r24, r28 + 342: 01 96 adiw r24, 0x01 ; 1 + 344: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 348: 2f ef ldi r18, 0xFF ; 255 + 34a: 81 ee ldi r24, 0xE1 ; 225 + 34c: 94 e0 ldi r25, 0x04 ; 4 + 34e: 21 50 subi r18, 0x01 ; 1 + 350: 80 40 sbci r24, 0x00 ; 0 + 352: 90 40 sbci r25, 0x00 ; 0 + 354: e1 f7 brne .-8 ; 0x34e <_ZN3CanC1Ev+0x3c> + 356: 00 c0 rjmp .+0 ; 0x358 <_ZN3CanC1Ev+0x46> + 358: 00 00 nop + _delay_ms(100); + init_pin(); + 35a: c8 01 movw r24, r16 + 35c: 0e 94 5a 00 call 0xb4 ; 0xb4 <_ZN3Can8init_pinEv> + init_spi(); + 360: c8 01 movw r24, r16 + 362: 0e 94 72 00 call 0xe4 ; 0xe4 <_ZN3Can8init_spiEv> + init_can(); + 366: c8 01 movw r24, r16 + 368: 0e 94 1c 01 call 0x238 ; 0x238 <_ZN3Can8init_canEv> +} + 36c: 0f 90 pop r0 + 36e: 0f 90 pop r0 + 370: df 91 pop r29 + 372: cf 91 pop r28 + 374: 1f 91 pop r17 + 376: 0f 91 pop r16 + 378: 08 95 ret -00000c2e : - c2e: 0f 93 push r16 - c30: 1f 93 push r17 - c32: cf 93 push r28 - c34: df 93 push r29 - c36: 82 30 cpi r24, 0x02 ; 2 - c38: 91 05 cpc r25, r1 - c3a: 10 f4 brcc .+4 ; 0xc40 - c3c: 82 e0 ldi r24, 0x02 ; 2 - c3e: 90 e0 ldi r25, 0x00 ; 0 - c40: e0 91 42 01 lds r30, 0x0142 - c44: f0 91 43 01 lds r31, 0x0143 - c48: 20 e0 ldi r18, 0x00 ; 0 - c4a: 30 e0 ldi r19, 0x00 ; 0 - c4c: c0 e0 ldi r28, 0x00 ; 0 - c4e: d0 e0 ldi r29, 0x00 ; 0 - c50: 23 c0 rjmp .+70 ; 0xc98 - c52: 40 81 ld r20, Z - c54: 51 81 ldd r21, Z+1 ; 0x01 - c56: 48 17 cp r20, r24 - c58: 59 07 cpc r21, r25 - c5a: a8 f0 brcs .+42 ; 0xc86 - c5c: 48 17 cp r20, r24 - c5e: 59 07 cpc r21, r25 - c60: 61 f4 brne .+24 ; 0xc7a - c62: 82 81 ldd r24, Z+2 ; 0x02 - c64: 93 81 ldd r25, Z+3 ; 0x03 - c66: 20 97 sbiw r28, 0x00 ; 0 - c68: 19 f0 breq .+6 ; 0xc70 - c6a: 9b 83 std Y+3, r25 ; 0x03 - c6c: 8a 83 std Y+2, r24 ; 0x02 - c6e: 2e c0 rjmp .+92 ; 0xccc - c70: 90 93 43 01 sts 0x0143, r25 - c74: 80 93 42 01 sts 0x0142, r24 - c78: 29 c0 rjmp .+82 ; 0xccc - c7a: 21 15 cp r18, r1 - c7c: 31 05 cpc r19, r1 - c7e: 29 f0 breq .+10 ; 0xc8a - c80: 42 17 cp r20, r18 - c82: 53 07 cpc r21, r19 - c84: 10 f0 brcs .+4 ; 0xc8a - c86: a9 01 movw r20, r18 - c88: 02 c0 rjmp .+4 ; 0xc8e - c8a: be 01 movw r22, r28 - c8c: df 01 movw r26, r30 - c8e: 02 81 ldd r16, Z+2 ; 0x02 - c90: 13 81 ldd r17, Z+3 ; 0x03 - c92: ef 01 movw r28, r30 - c94: 9a 01 movw r18, r20 - c96: f8 01 movw r30, r16 - c98: 30 97 sbiw r30, 0x00 ; 0 - c9a: d9 f6 brne .-74 ; 0xc52 - c9c: 21 15 cp r18, r1 - c9e: 31 05 cpc r19, r1 - ca0: 09 f1 breq .+66 ; 0xce4 - ca2: 28 1b sub r18, r24 - ca4: 39 0b sbc r19, r25 - ca6: 24 30 cpi r18, 0x04 ; 4 - ca8: 31 05 cpc r19, r1 - caa: 90 f4 brcc .+36 ; 0xcd0 - cac: 12 96 adiw r26, 0x02 ; 2 - cae: 8d 91 ld r24, X+ - cb0: 9c 91 ld r25, X - cb2: 13 97 sbiw r26, 0x03 ; 3 - cb4: 61 15 cp r22, r1 - cb6: 71 05 cpc r23, r1 - cb8: 21 f0 breq .+8 ; 0xcc2 - cba: fb 01 movw r30, r22 - cbc: 93 83 std Z+3, r25 ; 0x03 - cbe: 82 83 std Z+2, r24 ; 0x02 - cc0: 04 c0 rjmp .+8 ; 0xcca - cc2: 90 93 43 01 sts 0x0143, r25 - cc6: 80 93 42 01 sts 0x0142, r24 - cca: fd 01 movw r30, r26 - ccc: 32 96 adiw r30, 0x02 ; 2 - cce: 44 c0 rjmp .+136 ; 0xd58 - cd0: fd 01 movw r30, r26 - cd2: e2 0f add r30, r18 - cd4: f3 1f adc r31, r19 - cd6: 81 93 st Z+, r24 - cd8: 91 93 st Z+, r25 - cda: 22 50 subi r18, 0x02 ; 2 - cdc: 31 09 sbc r19, r1 - cde: 2d 93 st X+, r18 - ce0: 3c 93 st X, r19 - ce2: 3a c0 rjmp .+116 ; 0xd58 - ce4: 20 91 40 01 lds r18, 0x0140 - ce8: 30 91 41 01 lds r19, 0x0141 - cec: 23 2b or r18, r19 - cee: 41 f4 brne .+16 ; 0xd00 - cf0: 20 91 11 01 lds r18, 0x0111 - cf4: 30 91 12 01 lds r19, 0x0112 - cf8: 30 93 41 01 sts 0x0141, r19 - cfc: 20 93 40 01 sts 0x0140, r18 - d00: 20 91 0f 01 lds r18, 0x010F - d04: 30 91 10 01 lds r19, 0x0110 - d08: 21 15 cp r18, r1 - d0a: 31 05 cpc r19, r1 - d0c: 41 f4 brne .+16 ; 0xd1e - d0e: 2d b7 in r18, 0x3d ; 61 - d10: 3e b7 in r19, 0x3e ; 62 - d12: 40 91 13 01 lds r20, 0x0113 - d16: 50 91 14 01 lds r21, 0x0114 - d1a: 24 1b sub r18, r20 - d1c: 35 0b sbc r19, r21 - d1e: e0 91 40 01 lds r30, 0x0140 - d22: f0 91 41 01 lds r31, 0x0141 - d26: e2 17 cp r30, r18 - d28: f3 07 cpc r31, r19 - d2a: a0 f4 brcc .+40 ; 0xd54 - d2c: 2e 1b sub r18, r30 - d2e: 3f 0b sbc r19, r31 - d30: 28 17 cp r18, r24 - d32: 39 07 cpc r19, r25 - d34: 78 f0 brcs .+30 ; 0xd54 - d36: ac 01 movw r20, r24 - d38: 4e 5f subi r20, 0xFE ; 254 - d3a: 5f 4f sbci r21, 0xFF ; 255 - d3c: 24 17 cp r18, r20 - d3e: 35 07 cpc r19, r21 - d40: 48 f0 brcs .+18 ; 0xd54 - d42: 4e 0f add r20, r30 - d44: 5f 1f adc r21, r31 - d46: 50 93 41 01 sts 0x0141, r21 - d4a: 40 93 40 01 sts 0x0140, r20 - d4e: 81 93 st Z+, r24 - d50: 91 93 st Z+, r25 - d52: 02 c0 rjmp .+4 ; 0xd58 - d54: e0 e0 ldi r30, 0x00 ; 0 - d56: f0 e0 ldi r31, 0x00 ; 0 - d58: cf 01 movw r24, r30 - d5a: df 91 pop r29 - d5c: cf 91 pop r28 - d5e: 1f 91 pop r17 - d60: 0f 91 pop r16 - d62: 08 95 ret +0000037a <_ZN3Led4initEv>: +Led::Led() { + init(); +} -00000d64 : - d64: ef 92 push r14 - d66: ff 92 push r15 - d68: 0f 93 push r16 - d6a: 1f 93 push r17 - d6c: cf 93 push r28 - d6e: df 93 push r29 - d70: 00 97 sbiw r24, 0x00 ; 0 - d72: 09 f4 brne .+2 ; 0xd76 - d74: 8f c0 rjmp .+286 ; 0xe94 - d76: dc 01 movw r26, r24 - d78: 12 97 sbiw r26, 0x02 ; 2 - d7a: 13 96 adiw r26, 0x03 ; 3 - d7c: 1c 92 st X, r1 - d7e: 1e 92 st -X, r1 - d80: 12 97 sbiw r26, 0x02 ; 2 - d82: e0 90 42 01 lds r14, 0x0142 - d86: f0 90 43 01 lds r15, 0x0143 - d8a: e1 14 cp r14, r1 - d8c: f1 04 cpc r15, r1 - d8e: 89 f4 brne .+34 ; 0xdb2 - d90: 2d 91 ld r18, X+ - d92: 3c 91 ld r19, X - d94: 11 97 sbiw r26, 0x01 ; 1 - d96: 28 0f add r18, r24 - d98: 39 1f adc r19, r25 - d9a: 80 91 40 01 lds r24, 0x0140 - d9e: 90 91 41 01 lds r25, 0x0141 - da2: 82 17 cp r24, r18 - da4: 93 07 cpc r25, r19 - da6: 89 f5 brne .+98 ; 0xe0a - da8: b0 93 41 01 sts 0x0141, r27 - dac: a0 93 40 01 sts 0x0140, r26 - db0: 71 c0 rjmp .+226 ; 0xe94 - db2: e7 01 movw r28, r14 - db4: 20 e0 ldi r18, 0x00 ; 0 - db6: 30 e0 ldi r19, 0x00 ; 0 - db8: 01 c0 rjmp .+2 ; 0xdbc - dba: ea 01 movw r28, r20 - dbc: ca 17 cp r28, r26 - dbe: db 07 cpc r29, r27 - dc0: 38 f4 brcc .+14 ; 0xdd0 - dc2: 4a 81 ldd r20, Y+2 ; 0x02 - dc4: 5b 81 ldd r21, Y+3 ; 0x03 - dc6: 9e 01 movw r18, r28 - dc8: 41 15 cp r20, r1 - dca: 51 05 cpc r21, r1 - dcc: b1 f7 brne .-20 ; 0xdba - dce: 22 c0 rjmp .+68 ; 0xe14 - dd0: bc 01 movw r22, r24 - dd2: 62 50 subi r22, 0x02 ; 2 - dd4: 71 09 sbc r23, r1 - dd6: fb 01 movw r30, r22 - dd8: d3 83 std Z+3, r29 ; 0x03 - dda: c2 83 std Z+2, r28 ; 0x02 - ddc: 00 81 ld r16, Z - dde: 11 81 ldd r17, Z+1 ; 0x01 - de0: ac 01 movw r20, r24 - de2: 40 0f add r20, r16 - de4: 51 1f adc r21, r17 - de6: 4c 17 cp r20, r28 - de8: 5d 07 cpc r21, r29 - dea: 61 f4 brne .+24 ; 0xe04 - dec: 48 81 ld r20, Y - dee: 59 81 ldd r21, Y+1 ; 0x01 - df0: 40 0f add r20, r16 - df2: 51 1f adc r21, r17 - df4: 4e 5f subi r20, 0xFE ; 254 - df6: 5f 4f sbci r21, 0xFF ; 255 - df8: 51 83 std Z+1, r21 ; 0x01 - dfa: 40 83 st Z, r20 - dfc: 4a 81 ldd r20, Y+2 ; 0x02 - dfe: 5b 81 ldd r21, Y+3 ; 0x03 - e00: 53 83 std Z+3, r21 ; 0x03 - e02: 42 83 std Z+2, r20 ; 0x02 - e04: 21 15 cp r18, r1 - e06: 31 05 cpc r19, r1 - e08: 29 f4 brne .+10 ; 0xe14 - e0a: b0 93 43 01 sts 0x0143, r27 - e0e: a0 93 42 01 sts 0x0142, r26 - e12: 40 c0 rjmp .+128 ; 0xe94 - e14: f9 01 movw r30, r18 - e16: b3 83 std Z+3, r27 ; 0x03 - e18: a2 83 std Z+2, r26 ; 0x02 - e1a: e9 01 movw r28, r18 - e1c: 69 91 ld r22, Y+ - e1e: 79 91 ld r23, Y+ - e20: c6 0f add r28, r22 - e22: d7 1f adc r29, r23 - e24: ac 17 cp r26, r28 - e26: bd 07 cpc r27, r29 - e28: 79 f4 brne .+30 ; 0xe48 - e2a: dc 01 movw r26, r24 - e2c: 5e 91 ld r21, -X - e2e: 4e 91 ld r20, -X - e30: 46 0f add r20, r22 - e32: 57 1f adc r21, r23 - e34: 4e 5f subi r20, 0xFE ; 254 - e36: 5f 4f sbci r21, 0xFF ; 255 - e38: 51 83 std Z+1, r21 ; 0x01 - e3a: 40 83 st Z, r20 - e3c: 12 96 adiw r26, 0x02 ; 2 - e3e: 8d 91 ld r24, X+ - e40: 9c 91 ld r25, X - e42: 13 97 sbiw r26, 0x03 ; 3 - e44: 93 83 std Z+3, r25 ; 0x03 - e46: 82 83 std Z+2, r24 ; 0x02 - e48: a0 e0 ldi r26, 0x00 ; 0 - e4a: b0 e0 ldi r27, 0x00 ; 0 - e4c: 02 c0 rjmp .+4 ; 0xe52 - e4e: d7 01 movw r26, r14 - e50: 7c 01 movw r14, r24 - e52: f7 01 movw r30, r14 - e54: 82 81 ldd r24, Z+2 ; 0x02 - e56: 93 81 ldd r25, Z+3 ; 0x03 - e58: 00 97 sbiw r24, 0x00 ; 0 - e5a: c9 f7 brne .-14 ; 0xe4e - e5c: c7 01 movw r24, r14 - e5e: 02 96 adiw r24, 0x02 ; 2 - e60: 20 81 ld r18, Z - e62: 31 81 ldd r19, Z+1 ; 0x01 - e64: 82 0f add r24, r18 - e66: 93 1f adc r25, r19 - e68: 20 91 40 01 lds r18, 0x0140 - e6c: 30 91 41 01 lds r19, 0x0141 - e70: 28 17 cp r18, r24 - e72: 39 07 cpc r19, r25 - e74: 79 f4 brne .+30 ; 0xe94 - e76: 10 97 sbiw r26, 0x00 ; 0 - e78: 29 f4 brne .+10 ; 0xe84 - e7a: 10 92 43 01 sts 0x0143, r1 - e7e: 10 92 42 01 sts 0x0142, r1 - e82: 04 c0 rjmp .+8 ; 0xe8c - e84: 13 96 adiw r26, 0x03 ; 3 - e86: 1c 92 st X, r1 - e88: 1e 92 st -X, r1 - e8a: 12 97 sbiw r26, 0x02 ; 2 - e8c: f0 92 41 01 sts 0x0141, r15 - e90: e0 92 40 01 sts 0x0140, r14 - e94: cd b7 in r28, 0x3d ; 61 - e96: de b7 in r29, 0x3e ; 62 - e98: e6 e0 ldi r30, 0x06 ; 6 - e9a: 0c 94 65 07 jmp 0xeca ; 0xeca <__epilogue_restores__+0x18> +void Led::init() { + LEDDDR |= (1<: - e9e: dc 01 movw r26, r24 - ea0: 6c 91 ld r22, X - ea2: 61 56 subi r22, 0x61 ; 97 - ea4: 6a 31 cpi r22, 0x1A ; 26 - ea6: 08 f0 brcs .+2 ; 0xeaa - ea8: 60 5e subi r22, 0xE0 ; 224 - eaa: 6f 5b subi r22, 0xBF ; 191 - eac: 6d 93 st X+, r22 - eae: c1 f7 brne .-16 ; 0xea0 - eb0: 08 95 ret +00000382 <_ZN3LedC1Ev>: +#define LEDPING PINC6 +#define LEDPINB PINC7 +#define LEDPINM PINC5 -00000eb2 <__epilogue_restores__>: - eb2: 2a 88 ldd r2, Y+18 ; 0x12 - eb4: 39 88 ldd r3, Y+17 ; 0x11 - eb6: 48 88 ldd r4, Y+16 ; 0x10 - eb8: 5f 84 ldd r5, Y+15 ; 0x0f - eba: 6e 84 ldd r6, Y+14 ; 0x0e - ebc: 7d 84 ldd r7, Y+13 ; 0x0d - ebe: 8c 84 ldd r8, Y+12 ; 0x0c - ec0: 9b 84 ldd r9, Y+11 ; 0x0b - ec2: aa 84 ldd r10, Y+10 ; 0x0a - ec4: b9 84 ldd r11, Y+9 ; 0x09 - ec6: c8 84 ldd r12, Y+8 ; 0x08 - ec8: df 80 ldd r13, Y+7 ; 0x07 - eca: ee 80 ldd r14, Y+6 ; 0x06 - ecc: fd 80 ldd r15, Y+5 ; 0x05 - ece: 0c 81 ldd r16, Y+4 ; 0x04 - ed0: 1b 81 ldd r17, Y+3 ; 0x03 - ed2: aa 81 ldd r26, Y+2 ; 0x02 - ed4: b9 81 ldd r27, Y+1 ; 0x01 - ed6: ce 0f add r28, r30 - ed8: d1 1d adc r29, r1 - eda: 0f b6 in r0, 0x3f ; 63 - edc: f8 94 cli - ede: de bf out 0x3e, r29 ; 62 - ee0: 0f be out 0x3f, r0 ; 63 - ee2: cd bf out 0x3d, r28 ; 61 - ee4: ed 01 movw r28, r26 - ee6: 08 95 ret +Led::Led() { + init(); + 382: 0e 94 bd 01 call 0x37a ; 0x37a <_ZN3Led4initEv> + 386: 08 95 ret -00000ee8 <_exit>: - ee8: f8 94 cli +00000388 <_ZN3Led5colorEh>: + int rgb = 0; + rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); + rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); + rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); + + LEDPORT &= ~((1<: - eea: ff cf rjmp .-2 ; 0xeea <__stop_program> +0000039c
: +Led l; +Can c; + +int main(void) +{ + l.color(Led::YELLOW); + 39c: 66 e0 ldi r22, 0x06 ; 6 + 39e: 81 e0 ldi r24, 0x01 ; 1 + 3a0: 91 e0 ldi r25, 0x01 ; 1 + 3a2: 0e 94 c4 01 call 0x388 ; 0x388 <_ZN3Led5colorEh> + 3a6: ff cf rjmp .-2 ; 0x3a6 + +000003a8 <_GLOBAL__sub_I_l>: +#include "config.h" +#include "Led.h" +#include "Can.h" +#include + +Led l; + 3a8: 81 e0 ldi r24, 0x01 ; 1 + 3aa: 91 e0 ldi r25, 0x01 ; 1 + 3ac: 0e 94 c1 01 call 0x382 ; 0x382 <_ZN3LedC1Ev> +Can c; + 3b0: 80 e0 ldi r24, 0x00 ; 0 + 3b2: 91 e0 ldi r25, 0x01 ; 1 + 3b4: 0e 94 89 01 call 0x312 ; 0x312 <_ZN3CanC1Ev> + 3b8: 08 95 ret + +000003ba <__tablejump2__>: + 3ba: ee 0f add r30, r30 + 3bc: ff 1f adc r31, r31 + +000003be <__tablejump__>: + 3be: 05 90 lpm r0, Z+ + 3c0: f4 91 lpm r31, Z + 3c2: e0 2d mov r30, r0 + 3c4: 09 94 ijmp + +000003c6 <_exit>: + 3c6: f8 94 cli + +000003c8 <__stop_program>: + 3c8: ff cf rjmp .-2 ; 0x3c8 <__stop_program> diff --git a/Mainboard/Mainboard/Debug/Mainboard.map b/Mainboard/Mainboard/Debug/Mainboard.map index 6be80d7..039851b 100644 --- a/Mainboard/Mainboard/Debug/Mainboard.map +++ b/Mainboard/Mainboard/Debug/Mainboard.map @@ -1,98 +1,36 @@ Archive member included because of file (symbol) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - usb_user.o (__mulhi3) c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o (exit) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - Mainboard.o (__do_copy_data) c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) - usb_user.o (__do_clear_bss) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - usb_user.o (malloc) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - usb.o (strupr) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - rs232.o (fprintf) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - rs232.o (__iob) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) (vfprintf) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (strnlen_P) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (strnlen) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (fputc) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (__ultoa_invert) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (__mulqi3) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) (__prologue_saves__) -c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) (__epilogue_restores__) - -Allocating common symbols -Common symbol size file - -__brkval 0x2 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) -__flp 0x2 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) -__iob 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + Mainboard.o (__do_clear_bss) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + Mainboard.o (__do_global_ctors) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) (__tablejump__) Discarded input sections .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o - .text 0x00000000 0x0 led.o - .bss 0x00000000 0x0 led.o + .text 0x00000000 0x0 Can.o + .bss 0x00000000 0x0 Can.o + .text._ZN3Can21mcp2515_read_registerEh + 0x00000000 0x2c Can.o + .text._ZN3Can16can_send_messageEP10CANMessage + 0x00000000 0x138 Can.o + .text._ZN3Can22mcp2515_read_rx_statusEv + 0x00000000 0x2e Can.o + .text._ZN3Can15can_get_messageEP10CANMessage + 0x00000000 0x12a Can.o + .text 0x00000000 0x0 Led.o + .bss 0x00000000 0x0 Led.o + .text._ZN3Led6uninitEv + 0x00000000 0x2 Led.o + .text._ZN3Led4fadeEiii + 0x00000000 0xbc Led.o + .text._ZN3Led7rainbowEh + 0x00000000 0x7c Led.o .text 0x00000000 0x0 Mainboard.o - .bss 0x00000000 0x0 Mainboard.o - .text.wait_for_usb - 0x00000000 0x36 Mainboard.o - .text.send 0x00000000 0x6a Mainboard.o - .rodata.str1.1 - 0x00000000 0x14 Mainboard.o - .text.resi 0x00000000 0x30 Mainboard.o - .text 0x00000000 0x0 rs232.o - .bss 0x00000000 0x0 rs232.o - .text.rs232_send - 0x00000000 0x1a rs232.o - .text 0x00000000 0x0 usb.o - .bss 0x00000000 0x0 usb.o - .text.init_usb - 0x00000000 0x6 usb.o - .text.usb_send - 0x00000000 0x20 usb.o - .text.usb_getstatus - 0x00000000 0x6 usb.o - .text.usb_ready - 0x00000000 0x6 usb.o - .text 0x00000000 0x0 usb_user.o - .text.usb_init - 0x00000000 0x2e usb_user.o - .text.usb_status - 0x00000000 0x1c usb_user.o - .text.usb_configuration - 0x00000000 0x6 usb_user.o - .text.usb_interface - 0x00000000 0x6 usb_user.o - .text.usb_is_ready - 0x00000000 0x8 usb_user.o - .text.usb_freebuffer - 0x00000000 0x1e usb_user.o - .text.usb_rxavail - 0x00000000 0xa usb_user.o - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .text.libgcc.div - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .text.libgcc.prologue - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .text.libgcc.builtins - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .text.libgcc.fmul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) .text.libgcc.mul @@ -106,19 +44,6 @@ Discarded input sections 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) .text.libgcc.fmul 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc.mul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc.div - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc.prologue - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc.builtins - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .text.libgcc.fmul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) .text.libgcc.mul @@ -132,73 +57,31 @@ Discarded input sections 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) .text.libgcc.fmul 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .text.avr-libc - 0x00000000 0x24 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .text.avr-libc - 0x00000000 0x3bc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - .text.avr-libc - 0x00000000 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - .text.avr-libc - 0x00000000 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - .text.avr-libc - 0x00000000 0x58 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - .text.avr-libc - 0x00000000 0xc0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) .text.libgcc.mul - 0x00000000 0x12 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) .text.libgcc.div - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) - .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) .text.libgcc.prologue - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) .text.libgcc.builtins - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) .text.libgcc.fmul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) .text.libgcc.mul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) .text.libgcc.div - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) - .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) .text.libgcc.prologue - 0x00000000 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) .text.libgcc.builtins - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) .text.libgcc.fmul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) - .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .text.libgcc.mul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .text.libgcc.div - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .text.libgcc.builtins - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - .text.libgcc.fmul - 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) Memory Configuration @@ -216,15 +99,15 @@ Linker script and memory map Address of section .data set to 0x800100 LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o -LOAD led.o +LOAD Can.o +LOAD Led.o LOAD Mainboard.o -LOAD rs232.o -LOAD usb.o -LOAD usb_user.o START GROUP LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libm.a END GROUP LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libm.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a @@ -318,7 +201,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .rela.plt *(.rela.plt) -.text 0x00000000 0xeec +.text 0x00000000 0x3ca *(.vectors) .vectors 0x00000000 0x74 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o 0x00000000 __vector_default @@ -326,151 +209,130 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.vectors) *(.progmem.gcc*) *(.progmem*) - .progmem.data 0x00000074 0x5e usb_user.o - 0x000000d2 . = ALIGN (0x2) - 0x000000d2 __trampolines_start = . + 0x00000074 . = ALIGN (0x2) + 0x00000074 __trampolines_start = . *(.trampolines) - .trampolines 0x000000d2 0x0 linker stubs + .trampolines 0x00000074 0x0 linker stubs *(.trampolines*) - 0x000000d2 __trampolines_end = . + 0x00000074 __trampolines_end = . *(.jumptables) *(.jumptables*) *(.lowtext) *(.lowtext*) - 0x000000d2 __ctors_start = . + 0x00000074 __ctors_start = . *(.ctors) - 0x000000d2 __ctors_end = . - 0x000000d2 __dtors_start = . + .ctors 0x00000074 0x2 Mainboard.o + 0x00000076 __ctors_end = . + 0x00000076 __dtors_start = . *(.dtors) - 0x000000d2 __dtors_end = . + 0x00000076 __dtors_end = . SORT(*)(.ctors) SORT(*)(.dtors) *(.init0) - .init0 0x000000d2 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o - 0x000000d2 __init + .init0 0x00000076 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + 0x00000076 __init *(.init0) *(.init1) *(.init1) *(.init2) - .init2 0x000000d2 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .init2 0x00000076 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o *(.init2) *(.init3) *(.init3) *(.init4) - .init4 0x000000de 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - 0x000000de __do_copy_data - .init4 0x000000f4 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) - 0x000000f4 __do_clear_bss + .init4 0x00000082 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + 0x00000082 __do_clear_bss *(.init4) *(.init5) *(.init5) *(.init6) + .init6 0x00000092 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + 0x00000092 __do_global_ctors *(.init6) *(.init7) *(.init7) *(.init8) *(.init8) *(.init9) - .init9 0x00000104 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .init9 0x000000a8 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o *(.init9) *(.text) - .text 0x0000010c 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o - 0x0000010c __vector_22 - 0x0000010c __vector_28 - 0x0000010c __vector_1 - 0x0000010c __vector_24 - 0x0000010c __bad_interrupt - 0x0000010c __vector_6 - 0x0000010c __vector_3 - 0x0000010c __vector_23 - 0x0000010c __vector_25 - 0x0000010c __vector_13 - 0x0000010c __vector_17 - 0x0000010c __vector_19 - 0x0000010c __vector_7 - 0x0000010c __vector_27 - 0x0000010c __vector_5 - 0x0000010c __vector_4 - 0x0000010c __vector_9 - 0x0000010c __vector_2 - 0x0000010c __vector_21 - 0x0000010c __vector_15 - 0x0000010c __vector_8 - 0x0000010c __vector_26 - 0x0000010c __vector_14 - 0x0000010c __vector_10 - 0x0000010c __vector_16 - 0x0000010c __vector_18 - 0x0000010c __vector_20 - 0x00000110 . = ALIGN (0x2) + .text 0x000000b0 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + 0x000000b0 __vector_22 + 0x000000b0 __vector_28 + 0x000000b0 __vector_1 + 0x000000b0 __vector_24 + 0x000000b0 __vector_12 + 0x000000b0 __bad_interrupt + 0x000000b0 __vector_6 + 0x000000b0 __vector_3 + 0x000000b0 __vector_23 + 0x000000b0 __vector_25 + 0x000000b0 __vector_11 + 0x000000b0 __vector_13 + 0x000000b0 __vector_17 + 0x000000b0 __vector_19 + 0x000000b0 __vector_7 + 0x000000b0 __vector_27 + 0x000000b0 __vector_5 + 0x000000b0 __vector_4 + 0x000000b0 __vector_9 + 0x000000b0 __vector_2 + 0x000000b0 __vector_21 + 0x000000b0 __vector_15 + 0x000000b0 __vector_8 + 0x000000b0 __vector_26 + 0x000000b0 __vector_14 + 0x000000b0 __vector_10 + 0x000000b0 __vector_16 + 0x000000b0 __vector_18 + 0x000000b0 __vector_20 + 0x000000b4 . = ALIGN (0x2) *(.text.*) - .text.led 0x00000110 0x14 led.o - 0x00000110 led - .text.init_led - 0x00000124 0x8 led.o - 0x00000124 init_led - .text.fade 0x0000012c 0xbe led.o - 0x0000012c fade - .text.led_rainbow - 0x000001ea 0x74 led.o - 0x000001ea led_rainbow - .text.init 0x0000025e 0x18 Mainboard.o - 0x0000025e init - .text.main 0x00000276 0x14 Mainboard.o - 0x00000276 main - .text.uart_putchar - 0x0000028a 0x24 rs232.o - 0x0000028a uart_putchar - .text.init_rs232 - 0x000002ae 0x24 rs232.o - 0x000002ae init_rs232 - .text.usb_controlrequest - 0x000002d2 0x62 usb.o - 0x000002d2 usb_controlrequest - .text.usb_ep 0x00000334 0x52 usb.o - 0x00000334 usb_ep - .text.usb_endpoints - 0x00000386 0x110 usb_user.o - 0x00000386 usb_endpoints - .text.usb_wait_in - 0x00000496 0xc usb_user.o - 0x00000496 usb_wait_in - .text.usb_desc_out - 0x000004a2 0xb6 usb_user.o - 0x000004a2 usb_desc_out - .text.usb_rxdata - 0x00000558 0x4a usb_user.o - 0x00000558 usb_rxdata - .text.usb_txdata_control - 0x000005a2 0x46 usb_user.o - 0x000005a2 usb_txdata_control - .text.usb_txdata - 0x000005e8 0x5e usb_user.o - 0x000005e8 usb_txdata - .text.__vector_11 - 0x00000646 0x50 usb_user.o - 0x00000646 __vector_11 - .text.__vector_12 - 0x00000696 0x574 usb_user.o - 0x00000696 __vector_12 - .text.libgcc.mul - 0x00000c0a 0x24 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - 0x00000c0a __mulhi3 - .text.avr-libc - 0x00000c2e 0x270 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - 0x00000c2e malloc - 0x00000d64 free - .text.avr-libc - 0x00000e9e 0x14 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - 0x00000e9e strupr - .text.libgcc.prologue - 0x00000eb2 0x36 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) - 0x00000eb2 __epilogue_restores__ - 0x00000ee8 . = ALIGN (0x2) + .text._ZN3Can8init_pinEv + 0x000000b4 0x30 Can.o + 0x000000b4 _ZN3Can8init_pinEv + .text._ZN3Can8init_spiEv + 0x000000e4 0x1a Can.o + 0x000000e4 _ZN3Can8init_spiEv + .text._ZN3Can8spi_putcEh + 0x000000fe 0xc8 Can.o + 0x000000fe _ZN3Can8spi_putcEh + .text._ZN3Can22mcp2515_write_registerEhh + 0x000001c6 0x32 Can.o + 0x000001c6 _ZN3Can22mcp2515_write_registerEhh + .text._ZN3Can18mcp2515_bit_modifyEhhh + 0x000001f8 0x40 Can.o + 0x000001f8 _ZN3Can18mcp2515_bit_modifyEhhh + .text._ZN3Can8init_canEv + 0x00000238 0xda Can.o + 0x00000238 _ZN3Can8init_canEv + .text._ZN3CanC2Ev + 0x00000312 0x68 Can.o + 0x00000312 _ZN3CanC2Ev + 0x00000312 _ZN3CanC1Ev + .text._ZN3Led4initEv + 0x0000037a 0x8 Led.o + 0x0000037a _ZN3Led4initEv + .text._ZN3LedC2Ev + 0x00000382 0x6 Led.o + 0x00000382 _ZN3LedC1Ev + 0x00000382 _ZN3LedC2Ev + .text._ZN3Led5colorEh + 0x00000388 0x14 Led.o + 0x00000388 _ZN3Led5colorEh + .text.main 0x0000039c 0xc Mainboard.o + 0x0000039c main + .text._GLOBAL__sub_I_l + 0x000003a8 0x12 Mainboard.o + .text.libgcc 0x000003ba 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) + 0x000003ba __tablejump2__ + 0x000003be __tablejump__ + 0x000003c6 . = ALIGN (0x2) *(.fini9) - .fini9 0x00000ee8 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) - 0x00000ee8 _exit - 0x00000ee8 exit + .fini9 0x000003c6 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + 0x000003c6 _exit + 0x000003c6 exit *(.fini9) *(.fini8) *(.fini8) @@ -489,70 +351,47 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000ee8 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .fini0 0x000003c6 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) *(.fini0) - 0x00000eec _etext = . + 0x000003ca _etext = . -.data 0x00800100 0x3e load address 0x00000eec +.data 0x00800100 0x0 load address 0x000003ca 0x00800100 PROVIDE (__data_start, .) *(.data) .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o - .data 0x00800100 0x0 led.o + .data 0x00800100 0x0 Can.o + .data 0x00800100 0x0 Led.o .data 0x00800100 0x0 Mainboard.o - .data 0x00800100 0xe rs232.o - .data 0x0080010e 0x0 usb.o - .data 0x0080010e 0x1 usb_user.o - .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) - .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) - .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) - .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) - .data 0x0080010f 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - 0x0080010f __malloc_heap_end - 0x00800111 __malloc_heap_start - 0x00800113 __malloc_margin - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) - .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_ctors.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_tablejump.o) *(.data*) *(.rodata) - .rodata 0x00800115 0x10 usb.o - .rodata 0x00800125 0x18 usb_user.o *(.rodata*) *(.gnu.linkonce.d*) - 0x0080013e . = ALIGN (0x2) - *fill* 0x0080013d 0x1 - 0x0080013e _edata = . - 0x0080013e PROVIDE (__data_end, .) + 0x00800100 . = ALIGN (0x2) + 0x00800100 _edata = . + 0x00800100 PROVIDE (__data_end, .) -.bss 0x0080013e 0xc - 0x0080013e PROVIDE (__bss_start, .) +.bss 0x00800100 0x2 + 0x00800100 PROVIDE (__bss_start, .) *(.bss) - .bss 0x0080013e 0x2 usb_user.o + .bss 0x00800100 0x2 Mainboard.o + 0x00800100 c + 0x00800101 l *(.bss*) *(COMMON) - COMMON 0x00800140 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - 0x00800140 __brkval - 0x00800142 __flp - COMMON 0x00800144 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - 0x00800144 __iob - 0x0080014a PROVIDE (__bss_end, .) - 0x00000eec __data_load_start = LOADADDR (.data) - 0x00000f2a __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x00800102 PROVIDE (__bss_end, .) + 0x000003ca __data_load_start = LOADADDR (.data) + 0x000003ca __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x0080014a 0x0 - 0x0080014a PROVIDE (__noinit_start, .) +.noinit 0x00800102 0x0 + 0x00800102 PROVIDE (__noinit_start, .) *(.noinit*) - 0x0080014a PROVIDE (__noinit_end, .) - 0x0080014a _end = . - 0x0080014a PROVIDE (__heap_start, .) + 0x00800102 PROVIDE (__noinit_end, .) + 0x00800102 _end = . + 0x00800102 PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 *(.eeprom*) @@ -573,21 +412,13 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .user_signatures *(.user_signatures*) -.stab 0x00000000 0xd2c +.stab 0x00000000 0x6cc *(.stab) .stab 0x00000000 0x6cc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o - .stab 0x000006cc 0x90 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) - 0x9c (size before relaxing) - .stab 0x0000075c 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) - 0xa8 (size before relaxing) - .stab 0x000007f8 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) - 0xa8 (size before relaxing) - .stab 0x00000894 0x498 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) - 0x4a4 (size before relaxing) -.stabstr 0x00000000 0x209 +.stabstr 0x00000000 0x82 *(.stabstr) - .stabstr 0x00000000 0x209 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .stabstr 0x00000000 0x82 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o .stab.excl *(.stab.excl) @@ -603,17 +434,10 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .comment 0x00000000 0x2f *(.comment) - .comment 0x00000000 0x2f led.o + .comment 0x00000000 0x2f Can.o 0x30 (size before relaxing) + .comment 0x00000000 0x30 Led.o .comment 0x00000000 0x30 Mainboard.o - .comment 0x00000000 0x30 rs232.o - .comment 0x00000000 0x30 usb.o - .comment 0x00000000 0x30 usb_user.o - .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) .debug *(.debug) @@ -627,118 +451,56 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_sfnames *(.debug_sfnames) -.debug_aranges 0x00000000 0x220 +.debug_aranges 0x00000000 0xe0 *(.debug_aranges) .debug_aranges - 0x00000000 0x38 led.o + 0x00000000 0x70 Can.o .debug_aranges - 0x00000038 0x40 Mainboard.o + 0x00000070 0x48 Led.o .debug_aranges - 0x00000078 0x30 rs232.o - .debug_aranges - 0x000000a8 0x48 usb.o - .debug_aranges - 0x000000f0 0x90 usb_user.o - .debug_aranges - 0x00000180 0x28 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_aranges - 0x000001a8 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_aranges - 0x000001c8 0x18 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .debug_aranges - 0x000001e0 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_aranges - 0x00000200 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + 0x000000b8 0x28 Mainboard.o .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x2563 +.debug_info 0x00000000 0x1c15 *(.debug_info) - .debug_info 0x00000000 0x294 led.o - .debug_info 0x00000294 0x530 Mainboard.o - .debug_info 0x000007c4 0x232 rs232.o - .debug_info 0x000009f6 0x481 usb.o - .debug_info 0x00000e77 0xaa8 usb_user.o - .debug_info 0x0000191f 0x23d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_info 0x00001b5c 0x1fc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_info 0x00001d58 0x14e c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .debug_info 0x00001ea6 0x549 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_info 0x000023ef 0x174 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_info 0x00000000 0x1274 Can.o + .debug_info 0x00001274 0x4f8 Led.o + .debug_info 0x0000176c 0x4a9 Mainboard.o *(.gnu.linkonce.wi.*) -.debug_abbrev 0x00000000 0xf2d +.debug_abbrev 0x00000000 0x750 *(.debug_abbrev) - .debug_abbrev 0x00000000 0x112 led.o - .debug_abbrev 0x00000112 0x21f Mainboard.o - .debug_abbrev 0x00000331 0x181 rs232.o - .debug_abbrev 0x000004b2 0x1fb usb.o - .debug_abbrev 0x000006ad 0x2c6 usb_user.o - .debug_abbrev 0x00000973 0xf9 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_abbrev 0x00000a6c 0x139 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_abbrev 0x00000ba5 0xc1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .debug_abbrev 0x00000c66 0x1d6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_abbrev 0x00000e3c 0xf1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_abbrev 0x00000000 0x353 Can.o + .debug_abbrev 0x00000353 0x1eb Led.o + .debug_abbrev 0x0000053e 0x212 Mainboard.o -.debug_line 0x00000000 0x1227 +.debug_line 0x00000000 0x59e *(.debug_line) - .debug_line 0x00000000 0x150 led.o - .debug_line 0x00000150 0x228 Mainboard.o - .debug_line 0x00000378 0x107 rs232.o - .debug_line 0x0000047f 0x164 usb.o - .debug_line 0x000005e3 0x499 usb_user.o - .debug_line 0x00000a7c 0x1c8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_line 0x00000c44 0x14a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_line 0x00000d8e 0xc1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - .debug_line 0x00000e4f 0x2fe c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_line 0x0000114d 0xda c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_line 0x00000000 0x340 Can.o + .debug_line 0x00000340 0x162 Led.o + .debug_line 0x000004a2 0xfc Mainboard.o -.debug_frame 0x00000000 0x57c +.debug_frame 0x00000000 0x2d8 *(.debug_frame) - .debug_frame 0x00000000 0xb0 led.o - .debug_frame 0x000000b0 0x70 Mainboard.o - .debug_frame 0x00000120 0x5c rs232.o - .debug_frame 0x0000017c 0x94 usb.o - .debug_frame 0x00000210 0x254 usb_user.o - .debug_frame 0x00000464 0x68 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_frame 0x000004cc 0x2c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_frame 0x000004f8 0x4c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_frame 0x00000544 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_frame 0x00000000 0x1c4 Can.o + .debug_frame 0x000001c4 0xe0 Led.o + .debug_frame 0x000002a4 0x34 Mainboard.o -.debug_str 0x00000000 0x7dc +.debug_str 0x00000000 0x419 *(.debug_str) - .debug_str 0x00000000 0xb4 led.o - 0xe8 (size before relaxing) - .debug_str 0x000000b4 0x15f Mainboard.o - 0x244 (size before relaxing) - .debug_str 0x00000213 0x40 rs232.o - 0x135 (size before relaxing) - .debug_str 0x00000253 0xe2 usb.o - 0x27f (size before relaxing) - .debug_str 0x00000335 0x218 usb_user.o - 0x44f (size before relaxing) - .debug_str 0x0000054d 0xcd c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - 0x167 (size before relaxing) - .debug_str 0x0000061a 0x79 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - 0x12e (size before relaxing) - .debug_str 0x00000693 0x4b c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) - 0xf8 (size before relaxing) - .debug_str 0x000006de 0xb1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - 0x198 (size before relaxing) - .debug_str 0x0000078f 0x4d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) - 0xf8 (size before relaxing) + .debug_str 0x00000000 0x389 Can.o + 0x3e1 (size before relaxing) + .debug_str 0x00000389 0x23 Led.o + 0x185 (size before relaxing) + .debug_str 0x000003ac 0x6d Mainboard.o + 0x3b8 (size before relaxing) -.debug_loc 0x00000000 0x1a4c +.debug_loc 0x00000000 0xc98 *(.debug_loc) - .debug_loc 0x00000000 0x2a5 led.o - .debug_loc 0x000002a5 0xbe Mainboard.o - .debug_loc 0x00000363 0xee rs232.o - .debug_loc 0x00000451 0x1a9 usb.o - .debug_loc 0x000005fa 0x92b usb_user.o - .debug_loc 0x00000f25 0x4f8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_loc 0x0000141d 0x21 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_loc 0x0000143e 0x51b c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_loc 0x00001959 0xf3 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_loc 0x00000000 0x8ad Can.o + .debug_loc 0x000008ad 0x3eb Led.o .debug_macinfo *(.debug_macinfo) @@ -746,17 +508,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubtypes *(.debug_pubtypes) -.debug_ranges 0x00000000 0x1c0 +.debug_ranges 0x00000000 0xf8 *(.debug_ranges) - .debug_ranges 0x00000000 0x70 led.o - .debug_ranges 0x00000070 0x30 Mainboard.o - .debug_ranges 0x000000a0 0x20 rs232.o - .debug_ranges 0x000000c0 0x38 usb.o - .debug_ranges 0x000000f8 0x80 usb_user.o - .debug_ranges 0x00000178 0x18 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) - .debug_ranges 0x00000190 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) - .debug_ranges 0x000001a0 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) - .debug_ranges 0x000001b0 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .debug_ranges 0x00000000 0x60 Can.o + .debug_ranges 0x00000060 0x80 Led.o + .debug_ranges 0x000000e0 0x18 Mainboard.o .debug_macro *(.debug_macro) diff --git a/Mainboard/Mainboard/Debug/Mainboard.srec b/Mainboard/Mainboard/Debug/Mainboard.srec index 741d8d0..ddd7179 100644 --- a/Mainboard/Mainboard/Debug/Mainboard.srec +++ b/Mainboard/Mainboard/Debug/Mainboard.srec @@ -1,245 +1,63 @@ S01100004D61696E626F6172642E7372656386 -S11300000C9469000C9486000C9486000C94860071 -S11300100C9486000C9486000C9486000C94860044 -S11300200C9486000C9486000C9486000C94230394 -S11300300C944B030C9486000C9486000C9486005C -S11300400C9486000C9486000C9486000C94860014 -S11300500C9486000C9486000C9486000C94860004 -S11300600C9486000C9486000C9486000C948600F4 -S11300700C94860012010002FF000010ADDEEEBEFB -S113008000010102030104030904140342006C008B -S11300907500620062004600690073006800000099 -S11300A020034800610063006B00650072002D00AE -S11300B04A0065006F0070006100720064007900FE -S11300C000000E03300030003000300030003100FA -S11300D0000011241FBECFEFD4E0DEBFCDBF11E07E -S11300E0A0E0B1E0ECEEFEE002C005900D92AE336C -S11300F0B107D9F721E0AEE3B1E001C01D92AA3403 -S1130100B207E1F70E943B010C9474070C940000C1 -S113011095B19F7195B995B18295880F807E982B82 -S113012095B9089584B1806E84B908952F923F9251 -S11301304F925F926F927F928F929F92AF92BF92F3 -S1130140CF92DF92EF92FF920F931F93CF93DF939F -S11301507C018B015A01C0E0D0E0212C312C422CCF -S1130160532C2CC0862C972CC7010E9488008FEF3B -S1130170881A980A8FEF88169104B1F71C161D0689 -S11301805CF4842C952CC8010E9488008FEF881A97 -S1130190980A8C169D06B9F78FEFC81AD80ACA14A4 -S11301A0DB0421F407C061016C2E7D2ECF3FD10505 -S11301B0CCF2E4CF2196CF3FD10521F01A141B04D1 -S11301C094F3F8CFDF91CF911F910F91FF90EF90AF -S11301D0DF90CF90BF90AF909F908F907F906F9063 -S11301E05F904F903F902F900895C82F4AE050E0C1 -S11301F064E070E087E090E00E9496004C2F50E0AD -S113020066E070E084E090E00E9496004C2F50E09D -S113021062E070E086E090E00E9496004C2F50E08F -S113022063E070E082E090E00E9496004C2F50E082 -S113023061E070E083E090E00E9496004C2F50E073 -S113024065E070E081E090E00E9496004C2F50E061 -S113025064E070E085E090E00E949600CFCF86E0F5 -S113026090E00E94880078940E9492000E945701B6 -S11302703F98479A08950E942F0182E090E00E94DF -S1130280880085E00E94F500FCCFCF93C82F8A3008 -S113029019F48DE00E944501E8ECF0E0908195FFAF -S11302A0FDCFC093CE0080E090E0CF91089586E02A -S11302B08093CA00E9ECF0E080818860808387E65F -S11302C08093CC0080E091E09093470180934601B5 -S11302D00895CF93DF93CDB7DEB760970FB6F89448 -S11302E0DEBF0FBECDBF2CE0E5E1F1E0DE011196EB -S11302F001900D922A95E1F71D861E861F86188AA5 -S1130300FC012081233C51F48181813049F460E176 -S1130310CE0101960E94D10281E003C080E001C0B9 -S113032080E060960FB6F894DEBF0FBECDBFDF91BC -S1130330CF910895CF93DF93CDB7DEB7A0970FB6D3 -S1130340F894DEBF0FBECDBF8130A1F440E2BE0100 -S11303506F5F7F4F0E94AC02882361F018A2CE0128 -S113036001960E944F0740E2BE016F5F7F4F82E813 -S11303700E94F402A0960FB6F894DEBF0FBECDBF64 -S1130380DF91CF9108952F923F924F925F927F9287 -S11303908F929F92AF92CF92DF92EF92FF920F9340 -S11303A01F93CF93DF93282F90E06CE070E00E94BE -S11303B00506FC01EB5DFE4F822F90E06CE070E0DF -S11303C00E940506895D9E4F41E00F2EF9EECF2E67 -S11303D0D12CF02D0F2EFBEEEF2EF12CF02DAA24B4 -S11303E0A3940CEE10E06DEE70E00F2EF0EF4F2EA4 -S11303F0512CF02D6894992492F8812C68947724D8 -S113040074F8DF0120812F3F59F1E6014883E701A9 -S1130410A8822081E80128831C019C012150310914 -S1130420E9012881203841F0203441F0203241F0A4 -S1130430203141F4372D07C030E405C030E303C058 -S113044030E201C0382DE1012881232BEB01288300 -S11304502C9120FF03C0D2011C9202C0E2019882B9 -S11304604F5F33960396453061F6EAEEF0E08EE195 -S113047080831082DF91CF911F910F91FF90EF90B5 -S1130480DF90CF90AF909F908F907F905F904F9030 -S11304903F902F900895E8EEF0E080818570E9F3B5 -S11304A00895AF92BF92CF92DF92EF92FF920F9393 -S11304B01F93CF93DF93D82ED62FC72FE42FF0E0CE -S11304C02E173F0710F4C22E01C0C42E0E944B0207 -S11304D00D2F1C2F6894AA24A4F80F2EF8EEEF2EEB -S11304E0F12CF02D0F2EFEEFBF2EF02DC1EFD0E03A -S11304F02C2D80E18C1508F42A2D2223D9F0F80143 -S1130500922FDD2011F0808101C084918883915065 -S113051031969111F6CF622F615070E06F5F7F4F7B -S1130520060F171FC21AF701B082C11007C020318D -S113053029F007C0F701B082CC2019F00E944B02C9 -S1130540D7CFDF91CF911F910F91FF90EF90DF9064 -S1130550CF90BF90AF9008958093E9009091F200FE -S1130560941708F4492F4423D1F0362FE62FF72FA0 -S1130570A1EFB0E09C9191939E2F931B9417D0F31D -S11305809091F20091110BC021E030E002C0220FE3 -S1130590331F8A95E2F7EAEEF0E020831082842F7D -S11305A008956623E9F01092E900E8EEF0E0208176 -S11305B020FFFDCF2091F200211114C0282FE82F35 -S11305C0F92FA1EFB0E081918C938E2F821B8617B7 -S11305D0D0F3E8EEF0E080818E7F808381E008959F -S11305E080E0089580E00895CF93DF93442329F1B8 -S11305F08093E900E8EEF0E0808180FFFDCF8091F8 -S1130600F20081111CC0962FE62FF72FA8EEB0E060 -S1130610C1EFD0E08C9185FF02C080818883319640 -S11306208E2F891B8417B0F3E8EEF0E080818E7F73 -S113063080838FE7808381E003C080E001C080E095 -S1130640DF91CF9108951F920F920FB60F9211244C -S11306508F93EF93FF93E1EEF0E08081108283FFAC -S113066012C01092E90081E08093EB001092EC003C -S113067082E18093ED0088E08093F00010923E01C7 -S11306808FEF80930E01FF91EF918F910F900FBE2A -S11306900F901F9018951F920F920FB60F9211246E -S11306A03F924F925F926F927F928F929F92AF92FE -S11306B0BF92CF92DF92EF92FF920F931F932F93EB -S11306C03F934F935F936F937F938F939F93AF93D6 -S11306D0BF93EF93FF93CF93DF93CDB7DEB72A9702 -S11306E0DEBFCDBF8091F40080FF58C21092E900B4 -S11306F08091E80083FF1FC2E1EFF0E080818983ED -S113070080818A83208130E03C832B834081942F35 -S113071080E0822B932B9C838B83208130E03E836B -S11307202D834081942F80E0822B932B9E838D8395 -S1130730208130E038872F834081942F80E0822B02 -S1130740932B98878F8382EF8093E8008A81863089 -S113075009F030C18B819C81811523E0920709F453 -S1130760FDC048F4811551E0950789F08115924048 -S113077009F01CC126C08230B3E09B0709F402C112 -S113078008F4F6C08330934009F010C105C1E4E7D2 -S1130790F0E044912F813885BF0180E00E9451022E -S11307A00CC29A2F50815F3F09F49B2F490F81504F -S11307B033968111F6CF2F5F3F4F2230310539F444 -S11307C010C020E030E040E014E0A1E0B0E0C90156 -S11307D06CE070E00E940506FC01EB5DFE4F812F8A -S11307E0E0CF842F880F880F880F841B0F2EFBE126 -S11307F0EF2EF02DE80E8E2D90E00E941706082FA4 -S1130800192F89E0D8018C9382E011968C9311976B -S11308101296EC92129713961C92139714968C933B -S1130820149781E015968C93159716961C9216973B -S113083080EC17968C9317978AEF18968C93F8018F -S113084039961A86198644E0A12C88248394F82CBE -S11308509A2C0F2EF9E07F2EF02DBB24BA940F2E84 -S1130860F7E0CF2EF02D0F2EF5E0DF2EF02D68945B -S1130870662461F80F2EF3E05F2EF02D56C07F2D15 -S1130880DC012C912F3F09F4792D670F5150039609 -S11308905111F5CF70824183428213826483B58201 -S11308A01682B782108639966623C1F1832F932D61 -S11308B06CE070E00E9405069C012A5D3E4F482CC6 -S11308C0C901B90161507109DB015C915F3F01F11C -S11308D0C082D182652F67956627679564296283F4 -S11308E0513441F0503441F0513841F0503841F422 -S11308F0562D07C05F2D05C05F2D03C0562D01C0C6 -S1130900552D5383DC018C9184831582168237968E -S113091043942D5F3F4FB5E04B12D2CFA985BA85E2 -S11309201196BA87A987129771F04984342D3A84B5 -S1130930842D932D6CE070E00E9405068B5D9E4F24 -S1130940542F6A2D9CCF2F8138854E2DB80181E01C -S11309500E945102C8010E94B2062FC1E6E8F0E0ED -S113096044912F813885BF0180E00E94510225C146 -S1130970EAE8F0E044912F813885BF0180E00E94CD -S113098051021BC1E0EAF0E044912F813885BF0198 -S113099080E00E94510211C1E2ECF0E044912F8109 -S11309A03885BF0180E00E94510207C181E2809333 -S11309B0EB0003C1853071F48EEF8093E800E8EE1C -S11309C0F0E0808180FFFDCF8B819C8180688093E3 -S11309D0E300F3C08930C1F49981911160C08B8127 -S11309E09C81019769F481E080933E018EEF8093AE -S11309F0E80010920E0180910E010E94C301DDC037 -S1130A0081E28093EB00D9C0883089F499819038D1 -S1130A1009F057C0E8EEF0E0808180FFFDCF8091BF -S1130A203E018093F1008EEF8093E800C6C08111EF -S1130A301CC0E8EEF0E0808180FFFDCF8981823820 -S1130A4059F48D81E9EEF0E080838091EB0085FB21 -S1130A50882780F9108201C080E0E1EFF0E0808314 -S1130A6010828EEF8093E800A8C08B30C1F4898196 -S1130A70803211F0811155C08D819E8182309105A3 -S1130A8050F480930E018EEF8093E80080910E0164 -S1130A900E94C30192C081E28093EB008EC08A3031 -S1130AA081F489818038E9F5E8EEF0E0808180FF07 -S1130AB0FDCF80910E018093F1008EEF8093E800CA -S1130AC07CC0813011F0833061F58981823049F531 -S1130AD08B819C81892B29F58D819E818F77992724 -S1130AE0382F31503430E8F43EEF3093E8008093EF -S1130AF0E9002A81233021F481E28093EB005DC078 -S1130B0099E19093EB0021E030E0F90102C0EE0F8F -S1130B10FF1F8A95E2F7CF01EAEEF0E080831082AE -S1130B204CC0CE0101960E946901811146C081E248 -S1130B308093EB0042C081E28093EB002FC0F22E41 -S1130B40408150E0022E02C0559547950A94E2F781 -S1130B5040FF1BC0DB012C93D6018C9182FF13C094 -S1130B608091F200882341F06091F20070E0822FBE -S1130B700E949A01F092E900E8EEF0E089EF8083A8 -S1130B808FE780831AC0D8019C932F5F3F4F253095 -S1130B903105A9F681E28093EB000FC021E030E03B -S1130BA0E4EFF0E069EE70E00F2EF8EECF2ED12CDA -S1130BB0F02D0BEE10E091E2C2CF2A960FB6F89416 -S1130BC0DEBF0FBECDBFDF91CF91FF91EF91BF91FB -S1130BD0AF919F918F917F916F915F914F913F91D1 -S1130BE02F911F910F91FF90EF90DF90CF90BF90C6 -S1130BF0AF909F908F907F906F905F904F903F90B9 -S1130C000F900FBE0F901F9018955527002480FF5A -S1130C1002C0060E571F660F771F6115710521F07C -S1130C2096958795009799F7952F802D08950F93A2 -S1130C301F93CF93DF938230910510F482E090E00C -S1130C40E0914201F091430120E030E0C0E0D0E0C7 -S1130C5023C04081518148175907A8F04817590704 -S1130C6061F482819381209719F09B838A832EC03B -S1130C70909343018093420129C02115310529F045 -S1130C804217530710F0A90102C0BE01DF0102811F -S1130C901381EF019A01F8013097D9F62115310536 -S1130CA009F1281B390B2430310590F412968D91EB -S1130CB09C9113976115710521F0FB019383828345 -S1130CC004C09093430180934201FD01329644C0D5 -S1130CD0FD01E20FF31F81939193225031092D936B -S1130CE03C933AC02091400130914101232B41F4BF -S1130CF02091110130911201309341012093400160 -S1130D0020910F01309110012115310541F42DB7C7 -S1130D103EB74091130150911401241B350BE0910F -S1130D204001F0914101E217F307A0F42E1B3F0BA1 -S1130D302817390778F0AC014E5F5F4F2417350749 -S1130D4048F04E0F5F1F509341014093400181933F -S1130D50919302C0E0E0F0E0CF01DF91CF911F91C9 -S1130D600F910895EF92FF920F931F93CF93DF9308 -S1130D70009709F48FC0DC01129713961C921E92FF -S1130D801297E0904201F0904301E114F10489F4D8 -S1130D902D913C911197280F391F8091400190911A -S1130DA041018217930789F5B0934101A093400153 -S1130DB071C0E70120E030E001C0EA01CA17DB0797 -S1130DC038F44A815B819E0141155105B1F722C077 -S1130DD0BC0162507109FB01D383C283008111817C -S1130DE0AC01400F511F4C175D0761F448815981D4 -S1130DF0400F511F4E5F5F4F518340834A815B8197 -S1130E00538342832115310529F4B0934301A09300 -S1130E10420140C0F901B383A283E9016991799148 -S1130E20C60FD71FAC17BD0779F4DC015E914E9154 -S1130E30460F571F4E5F5F4F5183408312968D912B -S1130E409C91139793838283A0E0B0E002C0D70102 -S1130E507C01F701828193810097C9F7C70102964B -S1130E6020813181820F931F2091400130914101F3 -S1130E702817390779F4109729F410924301109236 -S1130E80420104C013961C921E921297F0924101E3 -S1130E90E0924001CDB7DEB7E6E00C946507DC01D3 -S1130EA06C9161566A3108F0605E6F5B6D93C1F7B7 -S1130EB008952A88398848885F846E847D848C8468 -S1130EC09B84AA84B984C884DF80EE80FD800C8171 -S1130ED01B81AA81B981CE0FD11D0FB6F894DEBF54 -S10F0EE00FBECDBFED010895F894FFCFC4 -S1130EEC0000000200000000450100000000FF00AB -S1130EFC004A01200056657273696F6E20312E30E2 -S1130F0C0000000000802002812002FF2002FF204C -S1110F1C02C12002FF2002FF2002FF2002007B +S11300000C943B000C9458000C9458000C94580029 +S11300100C9458000C9458000C9458000C945800FC +S11300200C9458000C9458000C9458000C945800EC +S11300300C9458000C9458000C9458000C945800DC +S11300400C9458000C9458000C9458000C945800CC +S11300500C9458000C9458000C9458000C945800BC +S11300600C9458000C9458000C9458000C945800AC +S11300700C945800D40111241FBECFEFD4E0DEBF8E +S1130080CDBF21E0A0E0B1E001C01D92A230B207D3 +S1130090E1F710E0C6E7D0E004C02297FE010E9419 +S11300A0DF01C437D107C9F70E94CE010C94E301E4 +S11300B00C94000084B1866084B985B1817F85B9D0 +S11300C0249A2C9A569A5E988FE39CE90197F1F74B +S11300D000C000005E9A8FE39CE90197F1F700C02D +S11300E0000008951CBC2FEF81EE94E02150804065 +S11300F09040E1F700C0000083E58CBD08951F9394 +S1130100CF93DF9300D000D01F92CDB7DEB7162F68 +S113011061E0CE0105960E94C4011EBD2FEF33ECB1 +S113012089E0215030408040E1F700C0000060E0E9 +S1130130CE0104960E94C4019FEF23EC39E0915054 +S113014020403040E1F700C000000DB407FC31C08E +S11301500DB406FE0FC067E0CE0103960E94C401F1 +S11301608AEA96EE26E931E0815090402040304002 +S1130170D9F7000065E0CE0102960E94C4018FEF1A +S113018091EE24E0815090402040E1F700C000004F +S113019060E0CE0101960E94C4013FEF81EE94E03D +S11301A0315080409040E1F700C000000DB407FEDC +S11301B0CFCF8EB50F900F900F900F900F90DF91CF +S11301C0CF911F9108950F931F93CF93DF93EC0169 +S11301D0062F142F2C9862E00E947F00602FCE011E +S11301E00E947F00612FCE010E947F002C9ADF9134 +S11301F0CF911F910F910895FF920F931F93CF9367 +S1130200DF93EC01F62E042F122F2C9865E00E9448 +S11302107F006F2DCE010E947F00602FCE010E94CF +S11302207F00612FCE010E947F002C9ADF91CF9135 +S11302301F910F91FF900895CF93DF93EC012C98B9 +S113024060EC0E947F008FE99FE00197F1F700C006 +S113025000002C9A8FE39CE90197F1F700C000009D +S113026047E06AE2CE010E94E30040E969E2CE0180 +S11302700E94E30042E068E2CE010E94E30043E012 +S11302806BE2CE010E94E30040E660E6CE010E94EC +S1130290E30040E660E7CE010E94E30040E060E254 +S11302A0CE010E94E30040E061E2CE010E94E3003F +S11302B040E062E2CE010E94E30040E063E2CE014E +S11302C00E94E30040E064E2CE010E94E30040E0CB +S11302D065E2CE010E94E30040E066E2CE010E94A6 +S11302E0E30040E067E2CE010E94E30040E06CE0FE +S11302F0CE010E94E30040E06DE0CE010E94E300E5 +S113030020E040EE6FE0CE010E94FC00DF91CF912F +S113031008950F931F93CF93DF9300D0CDB7DEB72B +S11303208C0162E0CE0102960E94C4012FEF81EE9F +S113033094E0215080409040E1F700C0000060E06C +S1130340CE0101960E94C4012FEF81EE94E021506A +S113035080409040E1F700C00000C8010E945A00AC +S1130360C8010E947200C8010E941C010F900F90E6 +S1130370DF91CF911F910F91089584B1806E84B95C +S113038008950E94BD01089585B18F7185B985B125 +S11303906295660F607E682B65B9089566E081E01A +S11303A091E00E94C401FFCF81E091E00E94C1016D +S11303B080E091E00E9489010895EE0FFF1F0590EF +S10D03C0F491E02D0994F894FFCFA6 S9030000FC diff --git a/Mainboard/Mainboard/Debug/Makefile b/Mainboard/Mainboard/Debug/Makefile index 853cef5..d195b0b 100644 --- a/Mainboard/Mainboard/Debug/Makefile +++ b/Mainboard/Mainboard/Debug/Makefile @@ -36,11 +36,9 @@ SUBDIRS := # Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ -../led.c \ -../Mainboard.c \ -../rs232.c \ -../usb.c \ -../usb_user.c +../Can.cpp \ +../Led.cpp \ +../Mainboard.cpp PREPROCESSING_SRCS += @@ -50,35 +48,27 @@ ASM_SRCS += OBJS += \ -led.o \ -Mainboard.o \ -rs232.o \ -usb.o \ -usb_user.o +Can.o \ +Led.o \ +Mainboard.o OBJS_AS_ARGS += \ -led.o \ -Mainboard.o \ -rs232.o \ -usb.o \ -usb_user.o +Can.o \ +Led.o \ +Mainboard.o C_DEPS += \ -led.d \ -Mainboard.d \ -rs232.d \ -usb.d \ -usb_user.d +Can.d \ +Led.d \ +Mainboard.d C_DEPS_AS_ARGS += \ -led.d \ -Mainboard.d \ -rs232.d \ -usb.d \ -usb_user.d +Can.d \ +Led.d \ +Mainboard.d OUTPUT_FILE_PATH +=Mainboard.elf @@ -99,14 +89,10 @@ LIB_DEP+= - - - - -./%.o: .././%.c +./%.o: .././%.cpp @echo Building file: $< - @echo Invoking: AVR/GNU C Compiler : - $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32u2 -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" + @echo Invoking: AVR8/GNU C++ Compiler : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32u2 -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" @echo Finished building: $< @@ -133,8 +119,8 @@ all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) $(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) @echo Building target: $@ - @echo Invoking: AVR/GNU Linker : - $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Mainboard.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega32u2 + @echo Invoking: AVR8/GNU Linker : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Mainboard.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega32u2 @echo Finished building target: $@ "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "Mainboard.elf" "Mainboard.hex" "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "Mainboard.elf" "Mainboard.eep" || exit 0 diff --git a/Mainboard/Mainboard/Debug/makedep.mk b/Mainboard/Mainboard/Debug/makedep.mk index 0492e81..bf0f449 100644 --- a/Mainboard/Mainboard/Debug/makedep.mk +++ b/Mainboard/Mainboard/Debug/makedep.mk @@ -2,13 +2,9 @@ # Automatically-generated file. Do not edit or delete the file ################################################################################ -led.c +Can.cpp -Mainboard.c +Led.cpp -rs232.c - -usb.c - -usb_user.c +Mainboard.cpp diff --git a/Mainboard/Mainboard/Led.cpp b/Mainboard/Mainboard/Led.cpp new file mode 100644 index 0000000..b1bdadb --- /dev/null +++ b/Mainboard/Mainboard/Led.cpp @@ -0,0 +1,57 @@ +/* + * CPPFile1.cpp + * + * Created: 03.11.2013 17:24:58 + * Author: netz + */ + +#include "Led.h" +#define LEDPORT PORTB +#define LEDDDR DDRB +#define LEDPINR PINC5 +#define LEDPING PINC6 +#define LEDPINB PINC7 +#define LEDPINM PINC5 + +Led::Led() { + init(); +} + +void Led::init() { + LEDDDR |= (1< + +#ifndef LED_H_ +#define LED_H_ + +class Led { + public: + Led(); + inline Led(int) {} + //virtual ~Led(); + void color(uint8_t mask); + void rainbow(uint8_t time); + void fade(int from, int to, int dur); + static const uint8_t BLACK = 0; + static const uint8_t BLUE = 1; + static const uint8_t GREEN = 2; + static const uint8_t CYAN = 3; + static const uint8_t RED = 4; + static const uint8_t MAGENTA = 5; + static const uint8_t YELLOW = 6; + static const uint8_t WHITE = 7; + private: + void init(); + void uninit(); +}; + + + +#endif /* LED_H_ */ \ No newline at end of file diff --git a/Mainboard/Mainboard/Mainboard.cpp b/Mainboard/Mainboard/Mainboard.cpp new file mode 100644 index 0000000..8abd301 --- /dev/null +++ b/Mainboard/Mainboard/Mainboard.cpp @@ -0,0 +1,33 @@ +/* + * Mainboard.cpp + * + * Created: 04.11.2013 12:23:16 + * Author: netz + */ + +#include "config.h" +#include "Led.h" +#include "Can.h" +#include + +Led l; +Can c; + +int main(void) +{ + l.color(Led::YELLOW); + //CANMessage m; + while(1) + { + /*l.color(Led::GREEN); + + uint8_t r = c.can_get_message(&m); + if(r == 0xFF) { + l.color(Led::RED); + _delay_ms(100); + } else { + l.color(Led::BLUE); + _delay_ms(100); + }*/ + } +} \ No newline at end of file diff --git a/Mainboard/Mainboard/Mainboard.cppproj b/Mainboard/Mainboard/Mainboard.cppproj new file mode 100644 index 0000000..1176fbf --- /dev/null +++ b/Mainboard/Mainboard/Mainboard.cppproj @@ -0,0 +1,169 @@ + + + + 2.0 + 6.1 + com.Atmel.AVRGCC8.CPP + {5cb60fa6-7c7b-4ec4-8b17-fc387a0e899b} + ATmega32U2 + none + Executable + CPP + $(MSBuildProjectName) + .elf + $(MSBuildProjectDirectory)\$(Configuration) + Mainboard + Mainboard + Mainboard + Native + true + false + exception_table + 0 + true + 0x20000000 + true + + 0 + + + + + + + + + + + + com.atmel.avrdbg.tool.ispmk2 + ISP + + com.atmel.avrdbg.tool.ispmk2 + AVRISP mkII + 0000000000000 + + 127.0.0.1 + 62361 + False + + + ISP + + 249000 + 1000000 + 150000 + false + false + 0 + 0 + 0 + 0 + + + + + + + + True + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + + + libm + + + <segmentname>=<address>, for example .boot=0xff + + + + + + + True + True + True + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + <segmentname>=<address>, for example .boot=0xff + Default (-Wa,-g) + + + + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + + \ No newline at end of file diff --git a/Mainboard/Mainboard/config.h b/Mainboard/Mainboard/config.h index 0c79d07..01820f0 100644 --- a/Mainboard/Mainboard/config.h +++ b/Mainboard/Mainboard/config.h @@ -1,7 +1,7 @@ /* * config.h * - * Created: 06.10.2013 17:05:43 + * Created: 03.11.2013 22:39:54 * Author: netz */ @@ -9,14 +9,6 @@ #ifndef CONFIG_H_ #define CONFIG_H_ - #define F_CPU 16000000 -#define BAUD_RATE 9600 - -#include -#include -#include -#include - #endif /* CONFIG_H_ */ \ No newline at end of file diff --git a/Mainboard/Mainboard/mcp2515_defs.h b/Mainboard/Mainboard/mcp2515_defs.h new file mode 100644 index 0000000..5212576 --- /dev/null +++ b/Mainboard/Mainboard/mcp2515_defs.h @@ -0,0 +1,280 @@ + +#ifndef MCP2515_DEFS_H +#define MCP2515_DEFS_H + +/** \name SPI Kommandos */ +/*@{*/ +#define SPI_RESET 0xC0 +#define SPI_READ 0x03 +#define SPI_READ_RX 0x90 +#define SPI_WRITE 0x02 +#define SPI_WRITE_TX 0x40 +#define SPI_RTS 0x80 +#define SPI_READ_STATUS 0xA0 +#define SPI_RX_STATUS 0xB0 +#define SPI_BIT_MODIFY 0x05 +/*@}*/ + +/** \name Adressen der Register des MCP2515 + * + * Die Redundanten Adressen von z.B. dem Register CANSTAT + * (0x0E, 0x1E, 0x2E, ...) wurden dabei nicht mit aufgelistet. + */ +/*@{*/ +#define RXF0SIDH 0x00 +#define RXF0SIDL 0x01 +#define RXF0EID8 0x02 +#define RXF0EID0 0x03 +#define RXF1SIDH 0x04 +#define RXF1SIDL 0x05 +#define RXF1EID8 0x06 +#define RXF1EID0 0x07 +#define RXF2SIDH 0x08 +#define RXF2SIDL 0x09 +#define RXF2EID8 0x0A +#define RXF2EID0 0x0B +#define BFPCTRL 0x0C +#define TXRTSCTRL 0x0D +#define CANSTAT 0x0E +#define CANCTRL 0x0F + +#define RXF3SIDH 0x10 +#define RXF3SIDL 0x11 +#define RXF3EID8 0x12 +#define RXF3EID0 0x13 +#define RXF4SIDH 0x14 +#define RXF4SIDL 0x15 +#define RXF4EID8 0x16 +#define RXF4EID0 0x17 +#define RXF5SIDH 0x18 +#define RXF5SIDL 0x19 +#define RXF5EID8 0x1A +#define RXF5EID0 0x1B +#define TEC 0x1C +#define REC 0x1D + +#define RXM0SIDH 0x20 +#define RXM0SIDL 0x21 +#define RXM0EID8 0x22 +#define RXM0EID0 0x23 +#define RXM1SIDH 0x24 +#define RXM1SIDL 0x25 +#define RXM1EID8 0x26 +#define RXM1EID0 0x27 +#define CNF3 0x28 +#define CNF2 0x29 +#define CNF1 0x2A +#define CANINTE 0x2B +#define CANINTF 0x2C +#define EFLG 0x2D + +#define TXB0CTRL 0x30 +#define TXB0SIDH 0x31 +#define TXB0SIDL 0x32 +#define TXB0EID8 0x33 +#define TXB0EID0 0x34 +#define TXB0DLC 0x35 +#define TXB0D0 0x36 +#define TXB0D1 0x37 +#define TXB0D2 0x38 +#define TXB0D3 0x39 +#define TXB0D4 0x3A +#define TXB0D5 0x3B +#define TXB0D6 0x3C +#define TXB0D7 0x3D + +#define TXB1CTRL 0x40 +#define TXB1SIDH 0x41 +#define TXB1SIDL 0x42 +#define TXB1EID8 0x43 +#define TXB1EID0 0x44 +#define TXB1DLC 0x45 +#define TXB1D0 0x46 +#define TXB1D1 0x47 +#define TXB1D2 0x48 +#define TXB1D3 0x49 +#define TXB1D4 0x4A +#define TXB1D5 0x4B +#define TXB1D6 0x4C +#define TXB1D7 0x4D + +#define TXB2CTRL 0x50 +#define TXB2SIDH 0x51 +#define TXB2SIDL 0x52 +#define TXB2EID8 0x53 +#define TXB2EID0 0x54 +#define TXB2DLC 0x55 +#define TXB2D0 0x56 +#define TXB2D1 0x57 +#define TXB2D2 0x58 +#define TXB2D3 0x59 +#define TXB2D4 0x5A +#define TXB2D5 0x5B +#define TXB2D6 0x5C +#define TXB2D7 0x5D + +#define RXB0CTRL 0x60 +#define RXB0SIDH 0x61 +#define RXB0SIDL 0x62 +#define RXB0EID8 0x63 +#define RXB0EID0 0x64 +#define RXB0DLC 0x65 +#define RXB0D0 0x66 +#define RXB0D1 0x67 +#define RXB0D2 0x68 +#define RXB0D3 0x69 +#define RXB0D4 0x6A +#define RXB0D5 0x6B +#define RXB0D6 0x6C +#define RXB0D7 0x6D + +#define RXB1CTRL 0x70 +#define RXB1SIDH 0x71 +#define RXB1SIDL 0x72 +#define RXB1EID8 0x73 +#define RXB1EID0 0x74 +#define RXB1DLC 0x75 +#define RXB1D0 0x76 +#define RXB1D1 0x77 +#define RXB1D2 0x78 +#define RXB1D3 0x79 +#define RXB1D4 0x7A +#define RXB1D5 0x7B +#define RXB1D6 0x7C +#define RXB1D7 0x7D +/*@}*/ + +/** \name Bitdefinition der verschiedenen Register */ +/*@{*/ + +/** \brief Bitdefinition von BFPCTRL */ +#define B1BFS 5 +#define B0BFS 4 +#define B1BFE 3 +#define B0BFE 2 +#define B1BFM 1 +#define B0BFM 0 + +/** \brief Bitdefinition von TXRTSCTRL */ +#define B2RTS 5 +#define B1RTS 4 +#define B0RTS 3 +#define B2RTSM 2 +#define B1RTSM 1 +#define B0RTSM 0 + +/** \brief Bitdefinition von CANSTAT */ +#define OPMOD2 7 +#define OPMOD1 6 +#define OPMOD0 5 +#define ICOD2 3 +#define ICOD1 2 +#define ICOD0 1 + +/** \brief Bitdefinition von CANCTRL */ +#define REQOP2 7 +#define REQOP1 6 +#define REQOP0 5 +#define ABAT 4 +#define CLKEN 2 +#define CLKPRE1 1 +#define CLKPRE0 0 + +/** \brief Bitdefinition von CNF3 */ +#define WAKFIL 6 +#define PHSEG22 2 +#define PHSEG21 1 +#define PHSEG20 0 + +/** \brief Bitdefinition von CNF2 */ +#define BTLMODE 7 +#define SAM 6 +#define PHSEG12 5 +#define PHSEG11 4 +#define PHSEG10 3 +#define PHSEG2 2 +#define PHSEG1 1 +#define PHSEG0 0 + +/** \brief Bitdefinition von CNF1 */ +#define SJW1 7 +#define SJW0 6 +#define BRP5 5 +#define BRP4 4 +#define BRP3 3 +#define BRP2 2 +#define BRP1 1 +#define BRP0 0 + +/** \brief Bitdefinition von CANINTE */ +#define MERRE 7 +#define WAKIE 6 +#define ERRIE 5 +#define TX2IE 4 +#define TX1IE 3 +#define TX0IE 2 +#define RX1IE 1 +#define RX0IE 0 + +/** \brief Bitdefinition von CANINTF */ +#define MERRF 7 +#define WAKIF 6 +#define ERRIF 5 +#define TX2IF 4 +#define TX1IF 3 +#define TX0IF 2 +#define RX1IF 1 +#define RX0IF 0 + +/** \brief Bitdefinition von EFLG */ +#define RX1OVR 7 +#define RX0OVR 6 +#define TXB0 5 +#define TXEP 4 +#define RXEP 3 +#define TXWAR 2 +#define RXWAR 1 +#define EWARN 0 + +/** \brief Bitdefinition von TXBnCTRL (n = 0, 1, 2) */ +#define ABTF 6 +#define MLOA 5 +#define TXERR 4 +#define TXREQ 3 +#define TXP1 1 +#define TXP0 0 + +/** \brief Bitdefinition von RXB0CTRL */ +#define RXM1 6 +#define RXM0 5 +#define RXRTR 3 +#define BUKT 2 +#define BUKT1 1 +#define FILHIT0 0 + +/** \brief Bitdefinition von TXBnSIDL (n = 0, 1) */ +#define EXIDE 3 + +/** + * \brief Bitdefinition von RXB1CTRL + * \see RXM1, RXM0, RXRTR und FILHIT0 sind schon fuer RXB0CTRL definiert + */ +#define FILHIT2 2 +#define FILHIT1 1 + +/** \brief Bitdefinition von RXBnSIDL (n = 0, 1) */ +#define SRR 4 +#define IDE 3 + +/** + * \brief Bitdefinition von RXBnDLC (n = 0, 1) + * \see TXBnDLC (gleiche Bits) + */ +#define RTR 6 +#define DLC3 3 +#define DLC2 2 +#define DLC1 1 +#define DLC0 0 + +/*@}*/ +#endif // MCP2515_DEFS_H diff --git a/Mainboard_/Mainboard.atsln b/Mainboard_/Mainboard.atsln new file mode 100644 index 0000000..f299e7f --- /dev/null +++ b/Mainboard_/Mainboard.atsln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Atmel Studio Solution File, Format Version 11.00 +Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Mainboard", "Mainboard\Mainboard.cproj", "{839C4697-AB18-4132-8E80-F57DDB26ADEB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|AVR = Debug|AVR + Release|AVR = Release|AVR + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Debug|AVR.ActiveCfg = Debug|AVR + {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Debug|AVR.Build.0 = Debug|AVR + {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Release|AVR.ActiveCfg = Release|AVR + {839C4697-AB18-4132-8E80-F57DDB26ADEB}.Release|AVR.Build.0 = Release|AVR + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Mainboard_/Mainboard.atsuo b/Mainboard_/Mainboard.atsuo new file mode 100644 index 0000000..74e2a3c Binary files /dev/null and b/Mainboard_/Mainboard.atsuo differ diff --git a/Mainboard_/Mainboard/Debug/Mainboard.d b/Mainboard_/Mainboard/Debug/Mainboard.d new file mode 100644 index 0000000..adab05f --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.d @@ -0,0 +1,43 @@ +Mainboard.d Mainboard.o: .././Mainboard.c \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: diff --git a/Mainboard_/Mainboard/Debug/Mainboard.eep b/Mainboard_/Mainboard/Debug/Mainboard.eep new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/Mainboard_/Mainboard/Debug/Mainboard.elf b/Mainboard_/Mainboard/Debug/Mainboard.elf new file mode 100644 index 0000000..19edb92 Binary files /dev/null and b/Mainboard_/Mainboard/Debug/Mainboard.elf differ diff --git a/Mainboard_/Mainboard/Debug/Mainboard.hex b/Mainboard_/Mainboard/Debug/Mainboard.hex new file mode 100644 index 0000000..58833d4 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.hex @@ -0,0 +1,226 @@ +:100000000C9469000C9486000C9486000C94860075 +:100010000C9486000C9486000C9486000C94860048 +:100020000C9486000C9486000C9486000C948F022D +:100030000C94B7020C9486000C9486000C948600F5 +:100040000C9486000C9486000C9486000C94860018 +:100050000C9486000C9486000C9486000C94860008 +:100060000C9486000C9486000C9486000C948600F8 +:100070000C94860012010002FF000010ADDEEEBEFF +:1000800000010102030104030904140342006C008F +:10009000750062006200460069007300680000009D +:1000A00020034800610063006B00650072002D00B2 +:1000B0004A0065006F007000610072006400790002 +:1000C00000000E03300030003000300030003100FE +:1000D000000011241FBECFEFD4E0DEBFCDBF11E082 +:1000E000A0E0B1E0E4ECFDE002C005900D92AE337B +:1000F000B107D9F721E0AEE3B1E001C01D92A4340D +:10010000B207E1F70E949E000C94E0060C940000F8 +:100110008EBD0DB407FC10C090E485B1892785B968 +:100120002FEF31EE84E0215030408040E1F700C0F5 +:1001300000000DB407FEF1CF8EB5089586ED84B9A9 +:1001400080E185B91DBC83E58CBD8FE39CE90197F7 +:10015000F1F700C000002C9880EC0E9488008FE925 +:100160009FE00197F1F700C000002C9A2C9880ECDA +:100170000E9488008FE99FE00197F1F700C000001E +:100180002C9A2F9AFFCFCF93C82F8A3019F48DE085 +:100190000E94C300E8ECF0E0908195FFFDCFC09392 +:1001A000CE0080E090E0CF910895CF93DF93CDB75C +:1001B000DEB760970FB6F894DEBF0FBECDBF2CE060 +:1001C000E5E1F1E0DE01119601900D922A95E1F74B +:1001D0001D861E861F86188AFC012081233C51F44F +:1001E0008181813049F460E1CE0101960E943D0297 +:1001F00081E003C080E001C080E060960FB6F89413 +:10020000DEBF0FBECDBFDF91CF910895CF93DF93B7 +:10021000CDB7DEB7A0970FB6F894DEBF0FBECDBF47 +:100220008130A1F440E2BE016F5F7F4F0E9418024F +:10023000882361F018A2CE0101960E94BB0640E21D +:10024000BE016F5F7F4F82E80E946002A0960FB6EA +:10025000F894DEBF0FBECDBFDF91CF9108952F92EE +:100260003F924F925F927F928F929F92AF92CF92E6 +:10027000DF92EF92FF920F931F93CF93DF93282F7C +:1002800090E06CE070E00E947105FC01EB5DFE4FB8 +:10029000822F90E06CE070E00E947105895D9E4FB6 +:1002A00041E00F2EF9EECF2ED12CF02D0F2EFBEECC +:1002B000EF2EF12CF02DAA24A3940CEE10E06DEE9D +:1002C00070E00F2EF0EF4F2E512CF02D68949924F2 +:1002D00092F8812C6894772474F8DF0120812F3FF5 +:1002E00059F1E6014883E701A8822081E8012883CB +:1002F0001C019C0121503109E9012881203841F07D +:10030000203441F0203241F0203141F4372D07C034 +:1003100030E405C030E303C030E201C0382DE10114 +:100320002881232BEB0128832C9120FF03C0D201CD +:100330001C9202C0E20198824F5F339603964530CB +:1003400061F6EAEEF0E08EE180831082DF91CF91DA +:100350001F910F91FF90EF90DF90CF90AF909F9003 +:100360008F907F905F904F903F902F900895E8EE90 +:10037000F0E080818570E9F30895AF92BF92CF924B +:10038000DF92EF92FF920F931F93CF93DF93D82EBC +:10039000D62FC72FE42FF0E02E173F0710F4C22E00 +:1003A00001C0C42E0E94B7010D2F1C2F6894AA24EF +:1003B000A4F80F2EF8EEEF2EF12CF02D0F2EFEEFFD +:1003C000BF2EF02DC1EFD0E02C2D80E18C1508F46C +:1003D0002A2D2223D9F0F801922FDD2011F08081FF +:1003E00001C084918883915031969111F6CF622F8C +:1003F000615070E06F5F7F4F060F171FC21AF70141 +:10040000B082C11007C0203129F007C0F701B082C7 +:10041000CC2019F00E94B701D7CFDF91CF911F9167 +:100420000F91FF90EF90DF90CF90BF90AF90089525 +:100430008093E9009091F200941708F4492F442327 +:10044000D1F0362FE62FF72FA1EFB0E09C919193DA +:100450009E2F931B9417D0F39091F20091110BC033 +:1004600021E030E002C0220F331F8A95E2F7EAEE66 +:10047000F0E020831082842F08956623E9F0109223 +:10048000E900E8EEF0E0208120FFFDCF2091F200AE +:10049000211114C0282FE82FF92FA1EFB0E081918E +:1004A0008C938E2F821B8617D0F3E8EEF0E08081CC +:1004B0008E7F808381E0089580E0089580E0089534 +:1004C000CF93DF93442329F18093E900E8EEF0E035 +:1004D000808180FFFDCF8091F20081111CC0962F9A +:1004E000E62FF72FA8EEB0E0C1EFD0E08C9185FFAA +:1004F00002C08081888331968E2F891B8417B0F3C8 +:10050000E8EEF0E080818E7F80838FE7808381E05A +:1005100003C080E001C080E0DF91CF9108951F9279 +:100520000F920FB60F9211248F93EF93FF93E1EE8A +:10053000F0E08081108283FF12C01092E90081E018 +:100540008093EB001092EC0082E18093ED0088E054 +:100550008093F00010923E018FEF80930E01FF9187 +:10056000EF918F910F900FBE0F901F9018951F92D3 +:100570000F920FB60F9211243F924F925F926F929B +:100580007F928F929F92AF92BF92CF92DF92EF9223 +:10059000FF920F931F932F933F934F935F936F930C +:1005A0007F938F939F93AF93BF93EF93FF93CF93DB +:1005B000DF93CDB7DEB72A97DEBFCDBF8091F400C1 +:1005C00080FF58C21092E9008091E80083FF1FC2AB +:1005D000E1EFF0E08081898380818A83208130E0AF +:1005E0003C832B834081942F80E0822B932B9C8330 +:1005F0008B83208130E03E832D834081942F80E0E7 +:10060000822B932B9E838D83208130E038872F832C +:100610004081942F80E0822B932B98878F8382EFE9 +:100620008093E8008A81863009F030C18B819C81FB +:10063000811523E0920709F4FDC048F4811551E0CB +:10064000950789F08115924009F01CC126C08230BF +:10065000B3E09B0709F402C108F4F6C0833093406D +:1006600009F010C105C1E4E7F0E044912F8138851D +:10067000BF0180E00E94BD010CC29A2F50815F3FF4 +:1006800009F49B2F490F815033968111F6CF2F5FCC +:100690003F4F2230310539F410C020E030E040E017 +:1006A00014E0A1E0B0E0C9016CE070E00E947105C7 +:1006B000FC01EB5DFE4F812FE0CF842F880F880F68 +:1006C000880F841B0F2EFBE1EF2EF02DE80E8E2DF0 +:1006D00090E00E948305082F192F89E0D8018C93A0 +:1006E00082E011968C9311971296EC9212971396C2 +:1006F0001C92139714968C93149781E015968C9303 +:10070000159716961C92169780EC17968C93179750 +:100710008AEF18968C93F80139961A86198644E068 +:10072000A12C88248394F82C9A2C0F2EF9E07F2E8C +:10073000F02DBB24BA940F2EF7E0CF2EF02D0F2E04 +:10074000F5E0DF2EF02D6894662461F80F2EF3E0BB +:100750005F2EF02D56C07F2DDC012C912F3F09F428 +:10076000792D670F515003965111F5CF7082418357 +:10077000428213826483B5821682B78210863996CC +:100780006623C1F1832F932D6CE070E00E94710508 +:100790009C012A5D3E4F482CC901B9016150710985 +:1007A000DB015C915F3F01F1C082D182652F6795CB +:1007B0006627679564296283513441F0503441F0D3 +:1007C000513841F0503841F4562D07C05F2D05C017 +:1007D0005F2D03C0562D01C0552D5383DC018C9134 +:1007E000848315821682379643942D5F3F4FB5E080 +:1007F0004B12D2CFA985BA851196BA87A9871297CD +:1008000071F04984342D3A84842D932D6CE070E08E +:100810000E9471058B5D9E4F542F6A2D9CCF2F81B6 +:1008200038854E2DB80181E00E94BD01C8010E94AB +:100830001E062FC1E6E8F0E044912F813885BF0104 +:1008400080E00E94BD0125C1EAE8F0E044912F81DB +:100850003885BF0180E00E94BD011BC1E0EAF0E0E5 +:1008600044912F813885BF0180E00E94BD0111C1F4 +:10087000E2ECF0E044912F813885BF0180E00E94D6 +:10088000BD0107C181E28093EB0003C1853071F4A3 +:100890008EEF8093E800E8EEF0E0808180FFFDCFEE +:1008A0008B819C8180688093E300F3C08930C1F420 +:1008B0009981911160C08B819C81019769F481E0DD +:1008C00080933E018EEF8093E80010920E0180919C +:1008D0000E010E942F01DDC081E28093EB00D9C0A0 +:1008E000883089F49981903809F057C0E8EEF0E03B +:1008F000808180FFFDCF80913E018093F1008EEFDB +:100900008093E800C6C081111CC0E8EEF0E0808151 +:1009100080FFFDCF8981823859F48D81E9EEF0E0C6 +:1009200080838091EB0085FB882780F9108201C0CD +:1009300080E0E1EFF0E0808310828EEF8093E800AA +:10094000A8C08B30C1F48981803211F0811155C06B +:100950008D819E818230910550F480930E018EEF3F +:100960008093E80080910E010E942F0192C081E2E5 +:100970008093EB008EC08A3081F489818038E9F55C +:10098000E8EEF0E0808180FFFDCF80910E01809342 +:10099000F1008EEF8093E8007CC0813011F083304D +:1009A00061F58981823049F58B819C81892B29F5FC +:1009B0008D819E818F779927382F31503430E8F41C +:1009C0003EEF3093E8008093E9002A81233021F440 +:1009D00081E28093EB005DC099E19093EB0021E010 +:1009E00030E0F90102C0EE0FFF1F8A95E2F7CF0158 +:1009F000EAEEF0E0808310824CC0CE0101960E94A6 +:100A0000D500811146C081E28093EB0042C081E2B3 +:100A10008093EB002FC0F22E408150E0022E02C0E6 +:100A2000559547950A94E2F740FF1BC0DB012C93D4 +:100A3000D6018C9182FF13C08091F200882341F08F +:100A40006091F20070E0822F0E940601F092E900AE +:100A5000E8EEF0E089EF80838FE780831AC0D80149 +:100A60009C932F5F3F4F25303105A9F681E280939B +:100A7000EB000FC021E030E0E4EFF0E069EE70E061 +:100A80000F2EF8EECF2ED12CF02D0BEE10E091E2D0 +:100A9000C2CF2A960FB6F894DEBF0FBECDBFDF914E +:100AA000CF91FF91EF91BF91AF919F918F917F91E6 +:100AB0006F915F914F913F912F911F910F91FF90F7 +:100AC000EF90DF90CF90BF90AF909F908F907F90EE +:100AD0006F905F904F903F900F900FBE0F901F90C0 +:100AE00018955527002480FF02C0060E571F660F79 +:100AF000771F6115710521F096958795009799F7F5 +:100B0000952F802D08950F931F93CF93DF938230FD +:100B1000910510F482E090E0E0914201F0914301F0 +:100B200020E030E0C0E0D0E023C040815181481790 +:100B30005907A8F04817590761F4828193812097DB +:100B400019F09B838A832EC09093430180934201C6 +:100B500029C02115310529F04217530710F0A901CA +:100B600002C0BE01DF0102811381EF019A01F80189 +:100B70003097D9F62115310509F1281B390B24309E +:100B8000310590F412968D919C9113976115710522 +:100B900021F0FB019383828304C0909343018093EF +:100BA0004201FD01329644C0FD01E20FF31F819323 +:100BB0009193225031092D933C933AC020914001EA +:100BC00030914101232B41F4209111013091120108 +:100BD000309341012093400120910F013091100189 +:100BE0002115310541F42DB73EB7409113015091C5 +:100BF0001401241B350BE0914001F0914101E217F3 +:100C0000F307A0F42E1B3F0B2817390778F0AC012F +:100C10004E5F5F4F2417350748F04E0F5F1F50930C +:100C20004101409340018193919302C0E0E0F0E0E4 +:100C3000CF01DF91CF911F910F910895EF92FF9215 +:100C40000F931F93CF93DF93009709F48FC0DC01BC +:100C5000129713961C921E921297E0904201F09008 +:100C60004301E114F10489F42D913C911197280F6F +:100C7000391F80914001909141018217930789F5B6 +:100C8000B0934101A093400171C0E70120E030E042 +:100C900001C0EA01CA17DB0738F44A815B819E0173 +:100CA00041155105B1F722C0BC0162507109FB0129 +:100CB000D383C28300811181AC01400F511F4C17B7 +:100CC0005D0761F448815981400F511F4E5F5F4FAE +:100CD000518340834A815B815383428321153105CF +:100CE00029F4B0934301A093420140C0F901B383BA +:100CF000A283E90169917991C60FD71FAC17BD078F +:100D000079F4DC015E914E91460F571F4E5F5F4FA5 +:100D10005183408312968D919C9113979383828384 +:100D2000A0E0B0E002C0D7017C01F701828193818D +:100D30000097C9F7C701029620813181820F931F66 +:100D400020914001309141012817390779F410971B +:100D500029F4109243011092420104C013961C9290 +:100D60001E921297F0924101E0924001CDB7DEB79A +:100D7000E6E00C94D106DC016C9161566A3108F012 +:100D8000605E6F5B6D93C1F708952A883988488843 +:100D90005F846E847D848C849B84AA84B984C88497 +:100DA000DF80EE80FD800C811B81AA81B981CE0F8E +:100DB000D11D0FB6F894DEBF0FBECDBFED01089573 +:040DC000F894FFCFD5 +:100DC4000000000200000000C30000000000FF005B +:100DD400004401200056657273696F6E20312E3015 +:100DE4000000000000802002812002FF2002FF207A +:0E0DF40002C12002FF2002FF2002FF200200A9 +:00000001FF diff --git a/Mainboard_/Mainboard/Debug/Mainboard.lss b/Mainboard_/Mainboard/Debug/Mainboard.lss new file mode 100644 index 0000000..ffb8913 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.lss @@ -0,0 +1,2312 @@ + +Mainboard.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .data 0000003e 00800100 00000dc4 00000e58 2**0 + CONTENTS, ALLOC, LOAD, DATA + 1 .text 00000dc4 00000000 00000000 00000094 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 .bss 00000006 0080013e 0080013e 00000e96 2**0 + ALLOC + 3 .stab 00000d2c 00000000 00000000 00000e98 2**2 + CONTENTS, READONLY, DEBUGGING + 4 .stabstr 00000209 00000000 00000000 00001bc4 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .comment 0000002f 00000000 00000000 00001dcd 2**0 + CONTENTS, READONLY + 6 .debug_aranges 00000208 00000000 00000000 00001dfc 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_info 0000226a 00000000 00000000 00002004 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_abbrev 00000e59 00000000 00000000 0000426e 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_line 000011b9 00000000 00000000 000050c7 2**0 + CONTENTS, READONLY, DEBUGGING + 10 .debug_frame 00000540 00000000 00000000 00006280 2**2 + CONTENTS, READONLY, DEBUGGING + 11 .debug_str 000007d4 00000000 00000000 000067c0 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_loc 000019f5 00000000 00000000 00006f94 2**0 + CONTENTS, READONLY, DEBUGGING + 13 .debug_ranges 000001a8 00000000 00000000 00008989 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: +void init_led() +{ + DDRB |= (1< + 4: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 8: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 10: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 14: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 18: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 1c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 20: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 24: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 28: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + for (int i=0;i<0xFF;i++) { + 2c: 0c 94 8f 02 jmp 0x51e ; 0x51e <__vector_11> + for(int k=0;k + for (int j=i;j<0xFF;j++) { + led(from); + } + for (int j=0;j +} + +void fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + for(int k=0;k + led(from); + 3c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 40: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> +} + +void fade(int from, int to, int dur) { + for (int i=0;i<0xFF;i++) { + for(int k=0;k + 48: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 4c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + led(from); + } + for (int j=0;j + 54: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 58: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + led(to); + 5c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + for (int i=0;i<0xFF;i++) { + for(int k=0;k + 64: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + 68: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + DDRB |= (1< + 70: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> + +00000074 : + 74: 12 01 00 02 ff 00 00 10 ad de ee be 00 01 01 02 ................ + for (int j=i;j<0xFF;j++) { + 84: 03 01 .. + +00000086 : + 86: 04 03 09 04 .... + +0000008a : +{ + DDRB |= (1<: + a0: 20 03 48 00 61 00 63 00 6b 00 65 00 72 00 2d 00 .H.a.c.k.e.r.-. + b0: 4a 00 65 00 6f 00 70 00 61 00 72 00 64 00 79 00 J.e.o.p.a.r.d.y. + ... + +000000c2 : + c2: 0e 03 30 00 30 00 30 00 30 00 30 00 31 00 00 00 ..0.0.0.0.0.1... + +000000d2 <__ctors_end>: + d2: 11 24 eor r1, r1 + d4: 1f be out 0x3f, r1 ; 63 + d6: cf ef ldi r28, 0xFF ; 255 + d8: d4 e0 ldi r29, 0x04 ; 4 + da: de bf out 0x3e, r29 ; 62 + dc: cd bf out 0x3d, r28 ; 61 + +000000de <__do_copy_data>: + de: 11 e0 ldi r17, 0x01 ; 1 + e0: a0 e0 ldi r26, 0x00 ; 0 + e2: b1 e0 ldi r27, 0x01 ; 1 + e4: e4 ec ldi r30, 0xC4 ; 196 + e6: fd e0 ldi r31, 0x0D ; 13 + e8: 02 c0 rjmp .+4 ; 0xee <__do_copy_data+0x10> + ea: 05 90 lpm r0, Z+ + ec: 0d 92 st X+, r0 + ee: ae 33 cpi r26, 0x3E ; 62 + f0: b1 07 cpc r27, r17 + f2: d9 f7 brne .-10 ; 0xea <__do_copy_data+0xc> + +000000f4 <__do_clear_bss>: + f4: 21 e0 ldi r18, 0x01 ; 1 + f6: ae e3 ldi r26, 0x3E ; 62 + f8: b1 e0 ldi r27, 0x01 ; 1 + fa: 01 c0 rjmp .+2 ; 0xfe <.do_clear_bss_start> + +000000fc <.do_clear_bss_loop>: + fc: 1d 92 st X+, r1 + +000000fe <.do_clear_bss_start>: + fe: a4 34 cpi r26, 0x44 ; 68 + 100: b2 07 cpc r27, r18 + 102: e1 f7 brne .-8 ; 0xfc <.do_clear_bss_loop> + 104: 0e 94 9e 00 call 0x13c ; 0x13c
+ 108: 0c 94 e0 06 jmp 0xdc0 ; 0xdc0 <_exit> + +0000010c <__bad_interrupt>: + 10c: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +00000110 : + 110: 8e bd out 0x2e, r24 ; 46 + 112: 0d b4 in r0, 0x2d ; 45 + 114: 07 fc sbrc r0, 7 + 116: 10 c0 rjmp .+32 ; 0x138 + 118: 90 e4 ldi r25, 0x40 ; 64 + 11a: 85 b1 in r24, 0x05 ; 5 + 11c: 89 27 eor r24, r25 + 11e: 85 b9 out 0x05, r24 ; 5 + 120: 2f ef ldi r18, 0xFF ; 255 + 122: 31 ee ldi r19, 0xE1 ; 225 + 124: 84 e0 ldi r24, 0x04 ; 4 + 126: 21 50 subi r18, 0x01 ; 1 + 128: 30 40 sbci r19, 0x00 ; 0 + 12a: 80 40 sbci r24, 0x00 ; 0 + 12c: e1 f7 brne .-8 ; 0x126 + 12e: 00 c0 rjmp .+0 ; 0x130 + 130: 00 00 nop + 132: 0d b4 in r0, 0x2d ; 45 + 134: 07 fe sbrs r0, 7 + 136: f1 cf rjmp .-30 ; 0x11a + 138: 8e b5 in r24, 0x2e ; 46 + 13a: 08 95 ret + +0000013c
: + 13c: 86 ed ldi r24, 0xD6 ; 214 + 13e: 84 b9 out 0x04, r24 ; 4 + 140: 80 e1 ldi r24, 0x10 ; 16 + 142: 85 b9 out 0x05, r24 ; 5 + 144: 1d bc out 0x2d, r1 ; 45 + 146: 83 e5 ldi r24, 0x53 ; 83 + 148: 8c bd out 0x2c, r24 ; 44 + 14a: 8f e3 ldi r24, 0x3F ; 63 + 14c: 9c e9 ldi r25, 0x9C ; 156 + 14e: 01 97 sbiw r24, 0x01 ; 1 + 150: f1 f7 brne .-4 ; 0x14e + 152: 00 c0 rjmp .+0 ; 0x154 + 154: 00 00 nop + 156: 2c 98 cbi 0x05, 4 ; 5 + 158: 80 ec ldi r24, 0xC0 ; 192 + 15a: 0e 94 88 00 call 0x110 ; 0x110 + 15e: 8f e9 ldi r24, 0x9F ; 159 + 160: 9f e0 ldi r25, 0x0F ; 15 + 162: 01 97 sbiw r24, 0x01 ; 1 + 164: f1 f7 brne .-4 ; 0x162 + 166: 00 c0 rjmp .+0 ; 0x168 + 168: 00 00 nop + 16a: 2c 9a sbi 0x05, 4 ; 5 + 16c: 2c 98 cbi 0x05, 4 ; 5 + 16e: 80 ec ldi r24, 0xC0 ; 192 + 170: 0e 94 88 00 call 0x110 ; 0x110 + 174: 8f e9 ldi r24, 0x9F ; 159 + 176: 9f e0 ldi r25, 0x0F ; 15 + 178: 01 97 sbiw r24, 0x01 ; 1 + 17a: f1 f7 brne .-4 ; 0x178 + 17c: 00 c0 rjmp .+0 ; 0x17e + 17e: 00 00 nop + 180: 2c 9a sbi 0x05, 4 ; 5 + 182: 2f 9a sbi 0x05, 7 ; 5 + 184: ff cf rjmp .-2 ; 0x184 + +00000186 : + 186: cf 93 push r28 + 188: c8 2f mov r28, r24 + 18a: 8a 30 cpi r24, 0x0A ; 10 + 18c: 19 f4 brne .+6 ; 0x194 + 18e: 8d e0 ldi r24, 0x0D ; 13 + 190: 0e 94 c3 00 call 0x186 ; 0x186 + 194: e8 ec ldi r30, 0xC8 ; 200 + 196: f0 e0 ldi r31, 0x00 ; 0 + 198: 90 81 ld r25, Z + 19a: 95 ff sbrs r25, 5 + 19c: fd cf rjmp .-6 ; 0x198 + 19e: c0 93 ce 00 sts 0x00CE, r28 + 1a2: 80 e0 ldi r24, 0x00 ; 0 + 1a4: 90 e0 ldi r25, 0x00 ; 0 + 1a6: cf 91 pop r28 + 1a8: 08 95 ret + +000001aa : + 1aa: cf 93 push r28 + 1ac: df 93 push r29 + 1ae: cd b7 in r28, 0x3d ; 61 + 1b0: de b7 in r29, 0x3e ; 62 + 1b2: 60 97 sbiw r28, 0x10 ; 16 + 1b4: 0f b6 in r0, 0x3f ; 63 + 1b6: f8 94 cli + 1b8: de bf out 0x3e, r29 ; 62 + 1ba: 0f be out 0x3f, r0 ; 63 + 1bc: cd bf out 0x3d, r28 ; 61 + 1be: 2c e0 ldi r18, 0x0C ; 12 + 1c0: e5 e1 ldi r30, 0x15 ; 21 + 1c2: f1 e0 ldi r31, 0x01 ; 1 + 1c4: de 01 movw r26, r28 + 1c6: 11 96 adiw r26, 0x01 ; 1 + 1c8: 01 90 ld r0, Z+ + 1ca: 0d 92 st X+, r0 + 1cc: 2a 95 dec r18 + 1ce: e1 f7 brne .-8 ; 0x1c8 + 1d0: 1d 86 std Y+13, r1 ; 0x0d + 1d2: 1e 86 std Y+14, r1 ; 0x0e + 1d4: 1f 86 std Y+15, r1 ; 0x0f + 1d6: 18 8a std Y+16, r1 ; 0x10 + 1d8: fc 01 movw r30, r24 + 1da: 20 81 ld r18, Z + 1dc: 23 3c cpi r18, 0xC3 ; 195 + 1de: 51 f4 brne .+20 ; 0x1f4 + 1e0: 81 81 ldd r24, Z+1 ; 0x01 + 1e2: 81 30 cpi r24, 0x01 ; 1 + 1e4: 49 f4 brne .+18 ; 0x1f8 + 1e6: 60 e1 ldi r22, 0x10 ; 16 + 1e8: ce 01 movw r24, r28 + 1ea: 01 96 adiw r24, 0x01 ; 1 + 1ec: 0e 94 3d 02 call 0x47a ; 0x47a + 1f0: 81 e0 ldi r24, 0x01 ; 1 + 1f2: 03 c0 rjmp .+6 ; 0x1fa + 1f4: 80 e0 ldi r24, 0x00 ; 0 + 1f6: 01 c0 rjmp .+2 ; 0x1fa + 1f8: 80 e0 ldi r24, 0x00 ; 0 + 1fa: 60 96 adiw r28, 0x10 ; 16 + 1fc: 0f b6 in r0, 0x3f ; 63 + 1fe: f8 94 cli + 200: de bf out 0x3e, r29 ; 62 + 202: 0f be out 0x3f, r0 ; 63 + 204: cd bf out 0x3d, r28 ; 61 + 206: df 91 pop r29 + 208: cf 91 pop r28 + 20a: 08 95 ret + +0000020c : + 20c: cf 93 push r28 + 20e: df 93 push r29 + 210: cd b7 in r28, 0x3d ; 61 + 212: de b7 in r29, 0x3e ; 62 + 214: a0 97 sbiw r28, 0x20 ; 32 + 216: 0f b6 in r0, 0x3f ; 63 + 218: f8 94 cli + 21a: de bf out 0x3e, r29 ; 62 + 21c: 0f be out 0x3f, r0 ; 63 + 21e: cd bf out 0x3d, r28 ; 61 + 220: 81 30 cpi r24, 0x01 ; 1 + 222: a1 f4 brne .+40 ; 0x24c + 224: 40 e2 ldi r20, 0x20 ; 32 + 226: be 01 movw r22, r28 + 228: 6f 5f subi r22, 0xFF ; 255 + 22a: 7f 4f sbci r23, 0xFF ; 255 + 22c: 0e 94 18 02 call 0x430 ; 0x430 + 230: 88 23 and r24, r24 + 232: 61 f0 breq .+24 ; 0x24c + 234: 18 a2 std Y+32, r1 ; 0x20 + 236: ce 01 movw r24, r28 + 238: 01 96 adiw r24, 0x01 ; 1 + 23a: 0e 94 bb 06 call 0xd76 ; 0xd76 + 23e: 40 e2 ldi r20, 0x20 ; 32 + 240: be 01 movw r22, r28 + 242: 6f 5f subi r22, 0xFF ; 255 + 244: 7f 4f sbci r23, 0xFF ; 255 + 246: 82 e8 ldi r24, 0x82 ; 130 + 248: 0e 94 60 02 call 0x4c0 ; 0x4c0 + 24c: a0 96 adiw r28, 0x20 ; 32 + 24e: 0f b6 in r0, 0x3f ; 63 + 250: f8 94 cli + 252: de bf out 0x3e, r29 ; 62 + 254: 0f be out 0x3f, r0 ; 63 + 256: cd bf out 0x3d, r28 ; 61 + 258: df 91 pop r29 + 25a: cf 91 pop r28 + 25c: 08 95 ret + +0000025e : + 25e: 2f 92 push r2 + 260: 3f 92 push r3 + 262: 4f 92 push r4 + 264: 5f 92 push r5 + 266: 7f 92 push r7 + 268: 8f 92 push r8 + 26a: 9f 92 push r9 + 26c: af 92 push r10 + 26e: cf 92 push r12 + 270: df 92 push r13 + 272: ef 92 push r14 + 274: ff 92 push r15 + 276: 0f 93 push r16 + 278: 1f 93 push r17 + 27a: cf 93 push r28 + 27c: df 93 push r29 + 27e: 28 2f mov r18, r24 + 280: 90 e0 ldi r25, 0x00 ; 0 + 282: 6c e0 ldi r22, 0x0C ; 12 + 284: 70 e0 ldi r23, 0x00 ; 0 + 286: 0e 94 71 05 call 0xae2 ; 0xae2 <__mulhi3> + 28a: fc 01 movw r30, r24 + 28c: eb 5d subi r30, 0xDB ; 219 + 28e: fe 4f sbci r31, 0xFE ; 254 + 290: 82 2f mov r24, r18 + 292: 90 e0 ldi r25, 0x00 ; 0 + 294: 6c e0 ldi r22, 0x0C ; 12 + 296: 70 e0 ldi r23, 0x00 ; 0 + 298: 0e 94 71 05 call 0xae2 ; 0xae2 <__mulhi3> + 29c: 89 5d subi r24, 0xD9 ; 217 + 29e: 9e 4f sbci r25, 0xFE ; 254 + 2a0: 41 e0 ldi r20, 0x01 ; 1 + 2a2: 0f 2e mov r0, r31 + 2a4: f9 ee ldi r31, 0xE9 ; 233 + 2a6: cf 2e mov r12, r31 + 2a8: d1 2c mov r13, r1 + 2aa: f0 2d mov r31, r0 + 2ac: 0f 2e mov r0, r31 + 2ae: fb ee ldi r31, 0xEB ; 235 + 2b0: ef 2e mov r14, r31 + 2b2: f1 2c mov r15, r1 + 2b4: f0 2d mov r31, r0 + 2b6: aa 24 eor r10, r10 + 2b8: a3 94 inc r10 + 2ba: 0c ee ldi r16, 0xEC ; 236 + 2bc: 10 e0 ldi r17, 0x00 ; 0 + 2be: 6d ee ldi r22, 0xED ; 237 + 2c0: 70 e0 ldi r23, 0x00 ; 0 + 2c2: 0f 2e mov r0, r31 + 2c4: f0 ef ldi r31, 0xF0 ; 240 + 2c6: 4f 2e mov r4, r31 + 2c8: 51 2c mov r5, r1 + 2ca: f0 2d mov r31, r0 + 2cc: 68 94 set + 2ce: 99 24 eor r9, r9 + 2d0: 92 f8 bld r9, 2 + 2d2: 81 2c mov r8, r1 + 2d4: 68 94 set + 2d6: 77 24 eor r7, r7 + 2d8: 74 f8 bld r7, 4 + 2da: df 01 movw r26, r30 + 2dc: 20 81 ld r18, Z + 2de: 2f 3f cpi r18, 0xFF ; 255 + 2e0: 59 f1 breq .+86 ; 0x338 + 2e2: e6 01 movw r28, r12 + 2e4: 48 83 st Y, r20 + 2e6: e7 01 movw r28, r14 + 2e8: a8 82 st Y, r10 + 2ea: 20 81 ld r18, Z + 2ec: e8 01 movw r28, r16 + 2ee: 28 83 st Y, r18 + 2f0: 1c 01 movw r2, r24 + 2f2: 9c 01 movw r18, r24 + 2f4: 21 50 subi r18, 0x01 ; 1 + 2f6: 31 09 sbc r19, r1 + 2f8: e9 01 movw r28, r18 + 2fa: 28 81 ld r18, Y + 2fc: 20 38 cpi r18, 0x80 ; 128 + 2fe: 41 f0 breq .+16 ; 0x310 + 300: 20 34 cpi r18, 0x40 ; 64 + 302: 41 f0 breq .+16 ; 0x314 + 304: 20 32 cpi r18, 0x20 ; 32 + 306: 41 f0 breq .+16 ; 0x318 + 308: 20 31 cpi r18, 0x10 ; 16 + 30a: 41 f4 brne .+16 ; 0x31c + 30c: 37 2d mov r19, r7 + 30e: 07 c0 rjmp .+14 ; 0x31e + 310: 30 e4 ldi r19, 0x40 ; 64 + 312: 05 c0 rjmp .+10 ; 0x31e + 314: 30 e3 ldi r19, 0x30 ; 48 + 316: 03 c0 rjmp .+6 ; 0x31e + 318: 30 e2 ldi r19, 0x20 ; 32 + 31a: 01 c0 rjmp .+2 ; 0x31e + 31c: 38 2d mov r19, r8 + 31e: e1 01 movw r28, r2 + 320: 28 81 ld r18, Y + 322: 23 2b or r18, r19 + 324: eb 01 movw r28, r22 + 326: 28 83 st Y, r18 + 328: 2c 91 ld r18, X + 32a: 20 ff sbrs r18, 0 + 32c: 03 c0 rjmp .+6 ; 0x334 + 32e: d2 01 movw r26, r4 + 330: 1c 92 st X, r1 + 332: 02 c0 rjmp .+4 ; 0x338 + 334: e2 01 movw r28, r4 + 336: 98 82 st Y, r9 + 338: 4f 5f subi r20, 0xFF ; 255 + 33a: 33 96 adiw r30, 0x03 ; 3 + 33c: 03 96 adiw r24, 0x03 ; 3 + 33e: 45 30 cpi r20, 0x05 ; 5 + 340: 61 f6 brne .-104 ; 0x2da + 342: ea ee ldi r30, 0xEA ; 234 + 344: f0 e0 ldi r31, 0x00 ; 0 + 346: 8e e1 ldi r24, 0x1E ; 30 + 348: 80 83 st Z, r24 + 34a: 10 82 st Z, r1 + 34c: df 91 pop r29 + 34e: cf 91 pop r28 + 350: 1f 91 pop r17 + 352: 0f 91 pop r16 + 354: ff 90 pop r15 + 356: ef 90 pop r14 + 358: df 90 pop r13 + 35a: cf 90 pop r12 + 35c: af 90 pop r10 + 35e: 9f 90 pop r9 + 360: 8f 90 pop r8 + 362: 7f 90 pop r7 + 364: 5f 90 pop r5 + 366: 4f 90 pop r4 + 368: 3f 90 pop r3 + 36a: 2f 90 pop r2 + 36c: 08 95 ret + +0000036e : + 36e: e8 ee ldi r30, 0xE8 ; 232 + 370: f0 e0 ldi r31, 0x00 ; 0 + 372: 80 81 ld r24, Z + 374: 85 70 andi r24, 0x05 ; 5 + 376: e9 f3 breq .-6 ; 0x372 + 378: 08 95 ret + +0000037a : + 37a: af 92 push r10 + 37c: bf 92 push r11 + 37e: cf 92 push r12 + 380: df 92 push r13 + 382: ef 92 push r14 + 384: ff 92 push r15 + 386: 0f 93 push r16 + 388: 1f 93 push r17 + 38a: cf 93 push r28 + 38c: df 93 push r29 + 38e: d8 2e mov r13, r24 + 390: d6 2f mov r29, r22 + 392: c7 2f mov r28, r23 + 394: e4 2f mov r30, r20 + 396: f0 e0 ldi r31, 0x00 ; 0 + 398: 2e 17 cp r18, r30 + 39a: 3f 07 cpc r19, r31 + 39c: 10 f4 brcc .+4 ; 0x3a2 + 39e: c2 2e mov r12, r18 + 3a0: 01 c0 rjmp .+2 ; 0x3a4 + 3a2: c4 2e mov r12, r20 + 3a4: 0e 94 b7 01 call 0x36e ; 0x36e + 3a8: 0d 2f mov r16, r29 + 3aa: 1c 2f mov r17, r28 + 3ac: 68 94 set + 3ae: aa 24 eor r10, r10 + 3b0: a4 f8 bld r10, 4 + 3b2: 0f 2e mov r0, r31 + 3b4: f8 ee ldi r31, 0xE8 ; 232 + 3b6: ef 2e mov r14, r31 + 3b8: f1 2c mov r15, r1 + 3ba: f0 2d mov r31, r0 + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + len -= n; + USB_SEND_IN; + 3bc: 0f 2e mov r0, r31 + 3be: fe ef ldi r31, 0xFE ; 254 + 3c0: bf 2e mov r11, r31 + 3c2: f0 2d mov r31, r0 + usb_wait_in(); + if (i & _BV(RXOUTI)) return; // cancel + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + 3c4: c1 ef ldi r28, 0xF1 ; 241 + 3c6: d0 e0 ldi r29, 0x00 ; 0 + if (len>maxsize) len=maxsize; + do { + usb_wait_in(); + if (i & _BV(RXOUTI)) return; // cancel + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + 3c8: 2c 2d mov r18, r12 + 3ca: 80 e1 ldi r24, 0x10 ; 16 + 3cc: 8c 15 cp r24, r12 + 3ce: 08 f4 brcc .+2 ; 0x3d2 + 3d0: 2a 2d mov r18, r10 + for (i = n; i; i--) + 3d2: 22 23 and r18, r18 + 3d4: d9 f0 breq .+54 ; 0x40c + 3d6: f8 01 movw r30, r16 + 3d8: 92 2f mov r25, r18 + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + 3da: dd 20 and r13, r13 + 3dc: 11 f0 breq .+4 ; 0x3e2 + 3de: 80 81 ld r24, Z + 3e0: 01 c0 rjmp .+2 ; 0x3e4 + 3e2: 84 91 lpm r24, Z + 3e4: 88 83 st Y, r24 + do { + usb_wait_in(); + if (i & _BV(RXOUTI)) return; // cancel + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + 3e6: 91 50 subi r25, 0x01 ; 1 + 3e8: 31 96 adiw r30, 0x01 ; 1 + 3ea: 91 11 cpse r25, r1 + 3ec: f6 cf rjmp .-20 ; 0x3da + do { + i = UEINTX; + } while (!(i & (_BV(TXINI)|_BV(RXOUTI)))); +} + +void usb_desc_out(bool isRAM, const uint8_t *pgmaddr, uint8_t size, uint16_t maxsize) + 3ee: 62 2f mov r22, r18 + 3f0: 61 50 subi r22, 0x01 ; 1 + 3f2: 70 e0 ldi r23, 0x00 ; 0 + 3f4: 6f 5f subi r22, 0xFF ; 255 + 3f6: 7f 4f sbci r23, 0xFF ; 255 + 3f8: 06 0f add r16, r22 + 3fa: 17 1f adc r17, r23 + if (i & _BV(RXOUTI)) return; // cancel + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + len -= n; + 3fc: c2 1a sub r12, r18 + USB_SEND_IN; + 3fe: f7 01 movw r30, r14 + 400: b0 82 st Z, r11 + } while (len || n == ENDPOINT0_SIZE); + 402: c1 10 cpse r12, r1 + 404: 07 c0 rjmp .+14 ; 0x414 + 406: 20 31 cpi r18, 0x10 ; 16 + 408: 29 f0 breq .+10 ; 0x414 + 40a: 07 c0 rjmp .+14 ; 0x41a + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + len -= n; + USB_SEND_IN; + 40c: f7 01 movw r30, r14 + 40e: b0 82 st Z, r11 + } while (len || n == ENDPOINT0_SIZE); + 410: cc 20 and r12, r12 + 412: 19 f0 breq .+6 ; 0x41a + + addr=pgmaddr; + len=size; + if (len>maxsize) len=maxsize; + do { + usb_wait_in(); + 414: 0e 94 b7 01 call 0x36e ; 0x36e + 418: d7 cf rjmp .-82 ; 0x3c8 + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + len -= n; + USB_SEND_IN; + } while (len || n == ENDPOINT0_SIZE); +} + 41a: df 91 pop r29 + 41c: cf 91 pop r28 + 41e: 1f 91 pop r17 + 420: 0f 91 pop r16 + 422: ff 90 pop r15 + 424: ef 90 pop r14 + 426: df 90 pop r13 + 428: cf 90 pop r12 + 42a: bf 90 pop r11 + 42c: af 90 pop r10 + 42e: 08 95 ret + +00000430 : + uint16_t r, i; + #else + uint8_t r, i; + #endif + + UENUM = endpoint; // select endpoint + 430: 80 93 e9 00 sts 0x00E9, r24 + #ifdef MEGA4_6 + r = ((uint16_t)(UEBCHX)<<8)+UEBCLX; + #else + r = UEBCLX; + 434: 90 91 f2 00 lds r25, 0x00F2 + 438: 94 17 cp r25, r20 + 43a: 08 f4 brcc .+2 ; 0x43e + 43c: 49 2f mov r20, r25 + #endif + if (r>maxdatasize) r = maxdatasize; + if (r) { // data available in input endpoint + 43e: 44 23 and r20, r20 + 440: d1 f0 breq .+52 ; 0x476 + 442: 36 2f mov r19, r22 + 444: e6 2f mov r30, r22 + 446: f7 2f mov r31, r23 + for (i=0; i + #ifdef MEGA4_6 + if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty + #else + if (UEBCLX==0) { // buffer is empty + 458: 90 91 f2 00 lds r25, 0x00F2 + 45c: 91 11 cpse r25, r1 + 45e: 0b c0 rjmp .+22 ; 0x476 + #endif + UERST = _BV(endpoint); // endpoint FIFO reset + 460: 21 e0 ldi r18, 0x01 ; 1 + 462: 30 e0 ldi r19, 0x00 ; 0 + 464: 02 c0 rjmp .+4 ; 0x46a + 466: 22 0f add r18, r18 + 468: 33 1f adc r19, r19 + 46a: 8a 95 dec r24 + 46c: e2 f7 brpl .-8 ; 0x466 + 46e: ea ee ldi r30, 0xEA ; 234 + 470: f0 e0 ldi r31, 0x00 ; 0 + 472: 20 83 st Z, r18 + UERST = 0; + 474: 10 82 st Z, r1 + } + } + return r; +} + 476: 84 2f mov r24, r20 + 478: 08 95 ret + +0000047a : + +bool usb_txdata_control(uint8_t *buffer, uint8_t datasize) +{ + uint8_t i; + + if (datasize) { + 47a: 66 23 and r22, r22 + 47c: e9 f0 breq .+58 ; 0x4b8 + UENUM = 0; + 47e: 10 92 e9 00 sts 0x00E9, r1 + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 482: e8 ee ldi r30, 0xE8 ; 232 + 484: f0 e0 ldi r31, 0x00 ; 0 + 486: 20 81 ld r18, Z + 488: 20 ff sbrs r18, 0 + 48a: fd cf rjmp .-6 ; 0x486 + UENUM = 0; + usb_wait_in_ready(); + #ifdef MEGA4_6 + if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty + #else + if (UEBCLX==0) { // buffer is empty + 48c: 20 91 f2 00 lds r18, 0x00F2 + 490: 21 11 cpse r18, r1 + 492: 14 c0 rjmp .+40 ; 0x4bc + 494: 28 2f mov r18, r24 + 496: e8 2f mov r30, r24 + 498: f9 2f mov r31, r25 + #endif + for (i=0; i + UEINTX&=~_BV(TXINI); // necessary (in this order) (changed V1.1.1) + 4aa: e8 ee ldi r30, 0xE8 ; 232 + 4ac: f0 e0 ldi r31, 0x00 ; 0 + 4ae: 80 81 ld r24, Z + 4b0: 8e 7f andi r24, 0xFE ; 254 + 4b2: 80 83 st Z, r24 + return true; + 4b4: 81 e0 ldi r24, 0x01 ; 1 + 4b6: 08 95 ret + } + } + return false; + 4b8: 80 e0 ldi r24, 0x00 ; 0 + 4ba: 08 95 ret + 4bc: 80 e0 ldi r24, 0x00 ; 0 +} + 4be: 08 95 ret + +000004c0 : +#ifdef MEGA4_6 +bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint16_t datasize) +#else +bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint8_t datasize) +#endif +{ + 4c0: cf 93 push r28 + 4c2: df 93 push r29 + uint16_t i; + #else + uint8_t i; + #endif + + if (datasize) { + 4c4: 44 23 and r20, r20 + 4c6: 29 f1 breq .+74 ; 0x512 <__stack+0x13> + UENUM = endpoint; + 4c8: 80 93 e9 00 sts 0x00E9, r24 + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 4cc: e8 ee ldi r30, 0xE8 ; 232 + 4ce: f0 e0 ldi r31, 0x00 ; 0 + 4d0: 80 81 ld r24, Z + 4d2: 80 ff sbrs r24, 0 + 4d4: fd cf rjmp .-6 ; 0x4d0 + UENUM = endpoint; + usb_wait_in_ready(); + #ifdef MEGA4_6 + if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty + #else + if (UEBCLX==0) { // buffer is empty + 4d6: 80 91 f2 00 lds r24, 0x00F2 + 4da: 81 11 cpse r24, r1 + 4dc: 1c c0 rjmp .+56 ; 0x516 <__stack+0x17> + 4de: 96 2f mov r25, r22 + 4e0: e6 2f mov r30, r22 + 4e2: f7 2f mov r31, r23 + #endif + for (i=0; i + 4f2: 80 81 ld r24, Z + 4f4: 88 83 st Y, r24 + 4f6: 31 96 adiw r30, 0x01 ; 1 + #ifdef MEGA4_6 + if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty + #else + if (UEBCLX==0) { // buffer is empty + #endif + for (i=0; i + if (UEINTX & _BV(RWAL)) UEDATX = buffer[i]; + UEINTX&=~_BV(TXINI); // necessary (in this order) (changed V1.1.1) + 500: e8 ee ldi r30, 0xE8 ; 232 + 502: f0 e0 ldi r31, 0x00 ; 0 + 504: 80 81 ld r24, Z + 506: 8e 7f andi r24, 0xFE ; 254 + 508: 80 83 st Z, r24 + UEINTX=0x7F; // (uint8_t)~_BV(FIFOCON); + 50a: 8f e7 ldi r24, 0x7F ; 127 + 50c: 80 83 st Z, r24 + return true; + 50e: 81 e0 ldi r24, 0x01 ; 1 + 510: 03 c0 rjmp .+6 ; 0x518 <__stack+0x19> + } + } + return false; + 512: 80 e0 ldi r24, 0x00 ; 0 + 514: 01 c0 rjmp .+2 ; 0x518 <__stack+0x19> + 516: 80 e0 ldi r24, 0x00 ; 0 +} + 518: df 91 pop r29 + 51a: cf 91 pop r28 + 51c: 08 95 ret + +0000051e <__vector_11>: +// USB Device Interrupt +//----------------------------------------------------------------------------- +// Hardware interrupts of the USB controller + +ISR(USB_GEN_vect) +{ + 51e: 1f 92 push r1 + 520: 0f 92 push r0 + 522: 0f b6 in r0, 0x3f ; 63 + 524: 0f 92 push r0 + 526: 11 24 eor r1, r1 + 528: 8f 93 push r24 + 52a: ef 93 push r30 + 52c: ff 93 push r31 + uint8_t intbits; + + intbits = UDINT; // save flags + 52e: e1 ee ldi r30, 0xE1 ; 225 + 530: f0 e0 ldi r31, 0x00 ; 0 + 532: 80 81 ld r24, Z + UDINT = 0; // reset flags + 534: 10 82 st Z, r1 + if (intbits & _BV(EORSTI)) { // End Of Reset Interrupt Flag + 536: 83 ff sbrs r24, 3 + 538: 12 c0 rjmp .+36 ; 0x55e <__vector_11+0x40> + // initialize endpoint 0 for control transfers + UENUM = 0; + 53a: 10 92 e9 00 sts 0x00E9, r1 + UECONX = _BV(EPEN); + 53e: 81 e0 ldi r24, 0x01 ; 1 + 540: 80 93 eb 00 sts 0x00EB, r24 + UECFG0X = EP_TYPE_CONTROL; + 544: 10 92 ec 00 sts 0x00EC, r1 + UECFG1X = EP_SIZE(ENDPOINT0_SIZE) | EP_SINGLE_BUFFER; + 548: 82 e1 ldi r24, 0x12 ; 18 + 54a: 80 93 ed 00 sts 0x00ED, r24 + UEIENX = _BV(RXSTPE); // enable interrupt for incoming data + 54e: 88 e0 ldi r24, 0x08 ; 8 + 550: 80 93 f0 00 sts 0x00F0, r24 + usb_conf = 0; + 554: 10 92 3e 01 sts 0x013E, r1 + #if (NUMINTERFACES>1) + usb_if = 0xFF; + 558: 8f ef ldi r24, 0xFF ; 255 + 55a: 80 93 0e 01 sts 0x010E, r24 + #endif + } +} + 55e: ff 91 pop r31 + 560: ef 91 pop r30 + 562: 8f 91 pop r24 + 564: 0f 90 pop r0 + 566: 0f be out 0x3f, r0 ; 63 + 568: 0f 90 pop r0 + 56a: 1f 90 pop r1 + 56c: 18 95 reti + +0000056e <__vector_12>: +// Endpoint Interrupts +//----------------------------------------------------------------------------- +// Interrupts, triggered by incoming data in an endpoint, are handled here. + +ISR(USB_COM_vect) +{ + 56e: 1f 92 push r1 + 570: 0f 92 push r0 + 572: 0f b6 in r0, 0x3f ; 63 + 574: 0f 92 push r0 + 576: 11 24 eor r1, r1 + 578: 3f 92 push r3 + 57a: 4f 92 push r4 + 57c: 5f 92 push r5 + 57e: 6f 92 push r6 + 580: 7f 92 push r7 + 582: 8f 92 push r8 + 584: 9f 92 push r9 + 586: af 92 push r10 + 588: bf 92 push r11 + 58a: cf 92 push r12 + 58c: df 92 push r13 + 58e: ef 92 push r14 + 590: ff 92 push r15 + 592: 0f 93 push r16 + 594: 1f 93 push r17 + 596: 2f 93 push r18 + 598: 3f 93 push r19 + 59a: 4f 93 push r20 + 59c: 5f 93 push r21 + 59e: 6f 93 push r22 + 5a0: 7f 93 push r23 + 5a2: 8f 93 push r24 + 5a4: 9f 93 push r25 + 5a6: af 93 push r26 + 5a8: bf 93 push r27 + 5aa: ef 93 push r30 + 5ac: ff 93 push r31 + 5ae: cf 93 push r28 + 5b0: df 93 push r29 + 5b2: cd b7 in r28, 0x3d ; 61 + 5b4: de b7 in r29, 0x3e ; 62 + 5b6: 2a 97 sbiw r28, 0x0a ; 10 + 5b8: de bf out 0x3e, r29 ; 62 + 5ba: cd bf out 0x3d, r28 ; 61 + #if (USESN==2) // serial number in RAM + struct usb_string_descriptor_ram buf; + #endif + struct usb_control_request ucr; + + if (UEINT & 0x01) { + 5bc: 80 91 f4 00 lds r24, 0x00F4 + 5c0: 80 ff sbrs r24, 0 + 5c2: 58 c2 rjmp .+1200 ; 0xa74 <__vector_12+0x506> + // handle interrupts of endpoint 0 (control transfers) + UENUM = 0; + 5c4: 10 92 e9 00 sts 0x00E9, r1 + intbits = UEINTX; // save interrupt flags of the endpoint + 5c8: 80 91 e8 00 lds r24, 0x00E8 + if (intbits & _BV(RXSTPI)) { // control transfer, setup + 5cc: 83 ff sbrs r24, 3 + 5ce: 1f c2 rjmp .+1086 ; 0xa0e <__vector_12+0x4a0> + ucr.bmRequestType = UEDATX; + 5d0: e1 ef ldi r30, 0xF1 ; 241 + 5d2: f0 e0 ldi r31, 0x00 ; 0 + 5d4: 80 81 ld r24, Z + 5d6: 89 83 std Y+1, r24 ; 0x01 + ucr.bRequest = UEDATX; + 5d8: 80 81 ld r24, Z + 5da: 8a 83 std Y+2, r24 ; 0x02 + ucr.wValue = UEDATX; + 5dc: 20 81 ld r18, Z + 5de: 30 e0 ldi r19, 0x00 ; 0 + 5e0: 3c 83 std Y+4, r19 ; 0x04 + 5e2: 2b 83 std Y+3, r18 ; 0x03 + ucr.wValue |= (UEDATX << 8); + 5e4: 40 81 ld r20, Z + 5e6: 94 2f mov r25, r20 + 5e8: 80 e0 ldi r24, 0x00 ; 0 + 5ea: 82 2b or r24, r18 + 5ec: 93 2b or r25, r19 + 5ee: 9c 83 std Y+4, r25 ; 0x04 + 5f0: 8b 83 std Y+3, r24 ; 0x03 + ucr.wIndex = UEDATX; + 5f2: 20 81 ld r18, Z + 5f4: 30 e0 ldi r19, 0x00 ; 0 + 5f6: 3e 83 std Y+6, r19 ; 0x06 + 5f8: 2d 83 std Y+5, r18 ; 0x05 + ucr.wIndex |= (UEDATX << 8); + 5fa: 40 81 ld r20, Z + 5fc: 94 2f mov r25, r20 + 5fe: 80 e0 ldi r24, 0x00 ; 0 + 600: 82 2b or r24, r18 + 602: 93 2b or r25, r19 + 604: 9e 83 std Y+6, r25 ; 0x06 + 606: 8d 83 std Y+5, r24 ; 0x05 + ucr.wLength = UEDATX; + 608: 20 81 ld r18, Z + 60a: 30 e0 ldi r19, 0x00 ; 0 + 60c: 38 87 std Y+8, r19 ; 0x08 + 60e: 2f 83 std Y+7, r18 ; 0x07 + ucr.wLength |= (UEDATX << 8); + 610: 40 81 ld r20, Z + 612: 94 2f mov r25, r20 + 614: 80 e0 ldi r24, 0x00 ; 0 + 616: 82 2b or r24, r18 + 618: 93 2b or r25, r19 + 61a: 98 87 std Y+8, r25 ; 0x08 + 61c: 8f 83 std Y+7, r24 ; 0x07 + UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); + 61e: 82 ef ldi r24, 0xF2 ; 242 + 620: 80 93 e8 00 sts 0x00E8, r24 + if (ucr.bRequest == GET_DESCRIPTOR) { + 624: 8a 81 ldd r24, Y+2 ; 0x02 + 626: 86 30 cpi r24, 0x06 ; 6 + 628: 09 f0 breq .+2 ; 0x62c <__vector_12+0xbe> + 62a: 30 c1 rjmp .+608 ; 0x88c <__vector_12+0x31e> + switch (ucr.wValue) { + 62c: 8b 81 ldd r24, Y+3 ; 0x03 + 62e: 9c 81 ldd r25, Y+4 ; 0x04 + 630: 81 15 cp r24, r1 + 632: 23 e0 ldi r18, 0x03 ; 3 + 634: 92 07 cpc r25, r18 + 636: 09 f4 brne .+2 ; 0x63a <__vector_12+0xcc> + 638: fd c0 rjmp .+506 ; 0x834 <__vector_12+0x2c6> + 63a: 48 f4 brcc .+18 ; 0x64e <__vector_12+0xe0> + 63c: 81 15 cp r24, r1 + 63e: 51 e0 ldi r21, 0x01 ; 1 + 640: 95 07 cpc r25, r21 + 642: 89 f0 breq .+34 ; 0x666 <__vector_12+0xf8> + 644: 81 15 cp r24, r1 + 646: 92 40 sbci r25, 0x02 ; 2 + 648: 09 f0 breq .+2 ; 0x64c <__vector_12+0xde> + 64a: 1c c1 rjmp .+568 ; 0x884 <__vector_12+0x316> + 64c: 26 c0 rjmp .+76 ; 0x69a <__vector_12+0x12c> + 64e: 82 30 cpi r24, 0x02 ; 2 + 650: b3 e0 ldi r27, 0x03 ; 3 + 652: 9b 07 cpc r25, r27 + 654: 09 f4 brne .+2 ; 0x658 <__vector_12+0xea> + 656: 02 c1 rjmp .+516 ; 0x85c <__vector_12+0x2ee> + 658: 08 f4 brcc .+2 ; 0x65c <__vector_12+0xee> + 65a: f6 c0 rjmp .+492 ; 0x848 <__vector_12+0x2da> + 65c: 83 30 cpi r24, 0x03 ; 3 + 65e: 93 40 sbci r25, 0x03 ; 3 + 660: 09 f0 breq .+2 ; 0x664 <__vector_12+0xf6> + 662: 10 c1 rjmp .+544 ; 0x884 <__vector_12+0x316> + 664: 05 c1 rjmp .+522 ; 0x870 <__vector_12+0x302> + case 0x0100: // device descriptor + usb_desc_out(false,&device_descriptor[0],pgm_read_byte(&device_descriptor[0]),ucr.wLength); + 666: e4 e7 ldi r30, 0x74 ; 116 + 668: f0 e0 ldi r31, 0x00 ; 0 + 66a: 44 91 lpm r20, Z + 66c: 2f 81 ldd r18, Y+7 ; 0x07 + 66e: 38 85 ldd r19, Y+8 ; 0x08 + 670: bf 01 movw r22, r30 + 672: 80 e0 ldi r24, 0x00 ; 0 + 674: 0e 94 bd 01 call 0x37a ; 0x37a + break; + 678: 0c c2 rjmp .+1048 ; 0xa92 <__vector_12+0x524> + case 0x0200: // configuration descriptor + // get number of activated endpoints + n=0; + #if (NUMINTERFACES>1) + for (j=0; j + 682: 9b 2f mov r25, r27 + 684: 49 0f add r20, r25 + 686: 81 50 subi r24, 0x01 ; 1 + 688: 33 96 adiw r30, 0x03 ; 3 + 68a: 81 11 cpse r24, r1 + 68c: f6 cf rjmp .-20 ; 0x67a <__vector_12+0x10c> + 68e: 2f 5f subi r18, 0xFF ; 255 + 690: 3f 4f sbci r19, 0xFF ; 255 + break; + case 0x0200: // configuration descriptor + // get number of activated endpoints + n=0; + #if (NUMINTERFACES>1) + for (j=0; j + 698: 10 c0 rjmp .+32 ; 0x6ba <__vector_12+0x14c> + ucr.wIndex |= (UEDATX << 8); + ucr.wLength = UEDATX; + ucr.wLength |= (UEDATX << 8); + UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); + if (ucr.bRequest == GET_DESCRIPTOR) { + switch (ucr.wValue) { + 69a: 20 e0 ldi r18, 0x00 ; 0 + 69c: 30 e0 ldi r19, 0x00 ; 0 + 69e: 40 e0 ldi r20, 0x00 ; 0 +//----------------------------------------------------------------------------- +// Endpoint Interrupts +//----------------------------------------------------------------------------- +// Interrupts, triggered by incoming data in an endpoint, are handled here. + +ISR(USB_COM_vect) + 6a0: 14 e0 ldi r17, 0x04 ; 4 + case 0x0200: // configuration descriptor + // get number of activated endpoints + n=0; + #if (NUMINTERFACES>1) + for (j=0; j + 6b0: fc 01 movw r30, r24 + 6b2: eb 5d subi r30, 0xDB ; 219 + 6b4: fe 4f sbci r31, 0xFE ; 254 + 6b6: 81 2f mov r24, r17 + 6b8: e0 cf rjmp .-64 ; 0x67a <__vector_12+0x10c> + for (j=0; j + 6d6: 08 2f mov r16, r24 + 6d8: 19 2f mov r17, r25 + // initialize configuration descriptor + cfg->bLength = sizeof(cfg_desc); + 6da: 89 e0 ldi r24, 0x09 ; 9 + 6dc: d8 01 movw r26, r16 + 6de: 8c 93 st X, r24 + cfg->bDescriptorType = 2; + 6e0: 82 e0 ldi r24, 0x02 ; 2 + 6e2: 11 96 adiw r26, 0x01 ; 1 + 6e4: 8c 93 st X, r24 + 6e6: 11 97 sbiw r26, 0x01 ; 1 + cfg->wTotalLength = s; + 6e8: 12 96 adiw r26, 0x02 ; 2 + 6ea: ec 92 st X, r14 + 6ec: 12 97 sbiw r26, 0x02 ; 2 + 6ee: 13 96 adiw r26, 0x03 ; 3 + 6f0: 1c 92 st X, r1 + 6f2: 13 97 sbiw r26, 0x03 ; 3 + cfg->bNumInterfaces = NUMINTERFACES; + 6f4: 14 96 adiw r26, 0x04 ; 4 + 6f6: 8c 93 st X, r24 + 6f8: 14 97 sbiw r26, 0x04 ; 4 + cfg->bConfigurationValue = 1; + 6fa: 81 e0 ldi r24, 0x01 ; 1 + 6fc: 15 96 adiw r26, 0x05 ; 5 + 6fe: 8c 93 st X, r24 + 700: 15 97 sbiw r26, 0x05 ; 5 + cfg->iConfiguration = 0; + 702: 16 96 adiw r26, 0x06 ; 6 + 704: 1c 92 st X, r1 + 706: 16 97 sbiw r26, 0x06 ; 6 + cfg->bmAttributes = POWERING; + 708: 80 ec ldi r24, 0xC0 ; 192 + 70a: 17 96 adiw r26, 0x07 ; 7 + 70c: 8c 93 st X, r24 + 70e: 17 97 sbiw r26, 0x07 ; 7 + cfg->bMaxPower = MAXPOWER>>1; + 710: 8a ef ldi r24, 0xFA ; 250 + 712: 18 96 adiw r26, 0x08 ; 8 + 714: 8c 93 st X, r24 + // initialize interface descriptor + ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); + 716: f8 01 movw r30, r16 + 718: 39 96 adiw r30, 0x09 ; 9 + 71a: 1a 86 std Y+10, r1 ; 0x0a + 71c: 19 86 std Y+9, r1 ; 0x09 +//----------------------------------------------------------------------------- +// Endpoint Interrupts +//----------------------------------------------------------------------------- +// Interrupts, triggered by incoming data in an endpoint, are handled here. + +ISR(USB_COM_vect) + 71e: 44 e0 ldi r20, 0x04 ; 4 + 720: a1 2c mov r10, r1 + // initialize interface descriptor + ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); + #if (NUMINTERFACES>1) + for (j=0; jbLength = sizeof(if_desc); + 72a: 0f 2e mov r0, r31 + 72c: f9 e0 ldi r31, 0x09 ; 9 + 72e: 7f 2e mov r7, r31 + 730: f0 2d mov r31, r0 + ifp->bDescriptorType = 4; + ifp->bInterfaceNumber = j; + ifp->bAlternateSetting = 0; + ifp->bNumEndpoints = n; + ifp->bInterfaceClass = 0xFF; + 732: bb 24 eor r11, r11 + 734: ba 94 dec r11 + ifp->iInterface = 0; + epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); + if (n) { // endpoints + for (i=0; ibLength = sizeof(ep_desc); + 736: 0f 2e mov r0, r31 + 738: f7 e0 ldi r31, 0x07 ; 7 + 73a: cf 2e mov r12, r31 + 73c: f0 2d mov r31, r0 + epp->bDescriptorType = 5; + 73e: 0f 2e mov r0, r31 + 740: f5 e0 ldi r31, 0x05 ; 5 + 742: df 2e mov r13, r31 + 744: f0 2d mov r31, r0 + epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); + epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); + 746: 68 94 set + 748: 66 24 eor r6, r6 + 74a: 61 f8 bld r6, 1 + 74c: 0f 2e mov r0, r31 + 74e: f3 e0 ldi r31, 0x03 ; 3 + 750: 5f 2e mov r5, r31 + 752: f0 2d mov r31, r0 + 754: 56 c0 rjmp .+172 ; 0x802 <__vector_12+0x294> + // initialize interface descriptor + ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); + #if (NUMINTERFACES>1) + for (j=0; j + 760: 79 2d mov r23, r9 + 762: 67 0f add r22, r23 + 764: 51 50 subi r21, 0x01 ; 1 + 766: 03 96 adiw r24, 0x03 ; 3 + 768: 51 11 cpse r21, r1 + 76a: f5 cf rjmp .-22 ; 0x756 <__vector_12+0x1e8> + #else + j = 0; + #endif + ifp->bLength = sizeof(if_desc); + 76c: 70 82 st Z, r7 + ifp->bDescriptorType = 4; + 76e: 41 83 std Z+1, r20 ; 0x01 + ifp->bInterfaceNumber = j; + 770: 42 82 std Z+2, r4 ; 0x02 + ifp->bAlternateSetting = 0; + 772: 13 82 std Z+3, r1 ; 0x03 + ifp->bNumEndpoints = n; + 774: 64 83 std Z+4, r22 ; 0x04 + ifp->bInterfaceClass = 0xFF; + 776: b5 82 std Z+5, r11 ; 0x05 + ifp->bInterfaceSubClass = 0x00; + 778: 16 82 std Z+6, r1 ; 0x06 + ifp->bInterfaceProtocol = 0xFF; + 77a: b7 82 std Z+7, r11 ; 0x07 + ifp->iInterface = 0; + 77c: 10 86 std Z+8, r1 ; 0x08 + epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); + 77e: 39 96 adiw r30, 0x09 ; 9 + if (n) { // endpoints + 780: 66 23 and r22, r22 + 782: c1 f1 breq .+112 ; 0x7f4 <__vector_12+0x286> +//----------------------------------------------------------------------------- +// Endpoint Interrupts +//----------------------------------------------------------------------------- +// Interrupts, triggered by incoming data in an endpoint, are handled here. + +ISR(USB_COM_vect) + 784: 83 2f mov r24, r19 + 786: 93 2d mov r25, r3 + 788: 6c e0 ldi r22, 0x0C ; 12 + 78a: 70 e0 ldi r23, 0x00 ; 0 + 78c: 0e 94 71 05 call 0xae2 ; 0xae2 <__mulhi3> + 790: 9c 01 movw r18, r24 + 792: 2a 5d subi r18, 0xDA ; 218 + 794: 3e 4f sbci r19, 0xFE ; 254 + 796: 48 2c mov r4, r8 + 798: c9 01 movw r24, r18 + 79a: b9 01 movw r22, r18 + 79c: 61 50 subi r22, 0x01 ; 1 + 79e: 71 09 sbc r23, r1 + ifp->bInterfaceProtocol = 0xFF; + ifp->iInterface = 0; + epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); + if (n) { // endpoints + for (i=0; i + epp->bLength = sizeof(ep_desc); + 7a8: c0 82 st Z, r12 + epp->bDescriptorType = 5; + 7aa: d1 82 std Z+1, r13 ; 0x01 + epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); + 7ac: 65 2f mov r22, r21 + 7ae: 67 95 ror r22 + 7b0: 66 27 eor r22, r22 + 7b2: 67 95 ror r22 + 7b4: 64 29 or r22, r4 + 7b6: 62 83 std Z+2, r22 ; 0x02 + epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); + 7b8: 51 34 cpi r21, 0x41 ; 65 + 7ba: 41 f0 breq .+16 ; 0x7cc <__vector_12+0x25e> + 7bc: 50 34 cpi r21, 0x40 ; 64 + 7be: 41 f0 breq .+16 ; 0x7d0 <__vector_12+0x262> + 7c0: 51 38 cpi r21, 0x81 ; 129 + 7c2: 41 f0 breq .+16 ; 0x7d4 <__vector_12+0x266> + 7c4: 50 38 cpi r21, 0x80 ; 128 + 7c6: 41 f4 brne .+16 ; 0x7d8 <__vector_12+0x26a> + 7c8: 56 2d mov r21, r6 + 7ca: 07 c0 rjmp .+14 ; 0x7da <__vector_12+0x26c> + 7cc: 5f 2d mov r21, r15 + 7ce: 05 c0 rjmp .+10 ; 0x7da <__vector_12+0x26c> + 7d0: 5f 2d mov r21, r15 + 7d2: 03 c0 rjmp .+6 ; 0x7da <__vector_12+0x26c> + 7d4: 56 2d mov r21, r6 + 7d6: 01 c0 rjmp .+2 ; 0x7da <__vector_12+0x26c> + 7d8: 55 2d mov r21, r5 + 7da: 53 83 std Z+3, r21 ; 0x03 + epp->wMaxPacketSize = EPCO.ep_size; + 7dc: dc 01 movw r26, r24 + 7de: 8c 91 ld r24, X + 7e0: 84 83 std Z+4, r24 ; 0x04 + 7e2: 15 82 std Z+5, r1 ; 0x05 + epp->bInterval = 0; + 7e4: 16 82 std Z+6, r1 ; 0x06 + epp = (ep_desc *)((uint16_t)(epp)+sizeof(ep_desc)); + 7e6: 37 96 adiw r30, 0x07 ; 7 + 7e8: 43 94 inc r4 + 7ea: 2d 5f subi r18, 0xFD ; 253 + 7ec: 3f 4f sbci r19, 0xFF ; 255 + ifp->bInterfaceSubClass = 0x00; + ifp->bInterfaceProtocol = 0xFF; + ifp->iInterface = 0; + epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); + if (n) { // endpoints + for (i=0; i + 7f4: a9 85 ldd r26, Y+9 ; 0x09 + 7f6: ba 85 ldd r27, Y+10 ; 0x0a + 7f8: 11 96 adiw r26, 0x01 ; 1 + 7fa: ba 87 std Y+10, r27 ; 0x0a + 7fc: a9 87 std Y+9, r26 ; 0x09 + cfg->bmAttributes = POWERING; + cfg->bMaxPower = MAXPOWER>>1; + // initialize interface descriptor + ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); + #if (NUMINTERFACES>1) + for (j=0; j + 802: 49 84 ldd r4, Y+9 ; 0x09 + n = 0; + for (i=0; i + 814: 8b 5d subi r24, 0xDB ; 219 + 816: 9e 4f sbci r25, 0xFE ; 254 + 818: 54 2f mov r21, r20 + 81a: 6a 2d mov r22, r10 + 81c: 9c cf rjmp .-200 ; 0x756 <__vector_12+0x1e8> + #if (NUMINTERFACES>1) + ifp = (if_desc *)epp; + } + #endif + // finally + usb_desc_out(true,(uint8_t *)cfg,s,ucr.wLength); + 81e: 2f 81 ldd r18, Y+7 ; 0x07 + 820: 38 85 ldd r19, Y+8 ; 0x08 + 822: 4e 2d mov r20, r14 + 824: b8 01 movw r22, r16 + 826: 81 e0 ldi r24, 0x01 ; 1 + 828: 0e 94 bd 01 call 0x37a ; 0x37a + free(cfg); + 82c: c8 01 movw r24, r16 + 82e: 0e 94 1e 06 call 0xc3c ; 0xc3c + break; + 832: 2f c1 rjmp .+606 ; 0xa92 <__vector_12+0x524> + case 0x0300: // String 0 + usb_desc_out(false,(uint8_t *)&string0.bLength,pgm_read_byte(&string0.bLength),ucr.wLength); + 834: e6 e8 ldi r30, 0x86 ; 134 + 836: f0 e0 ldi r31, 0x00 ; 0 + 838: 44 91 lpm r20, Z + 83a: 2f 81 ldd r18, Y+7 ; 0x07 + 83c: 38 85 ldd r19, Y+8 ; 0x08 + 83e: bf 01 movw r22, r30 + 840: 80 e0 ldi r24, 0x00 ; 0 + 842: 0e 94 bd 01 call 0x37a ; 0x37a + break; + 846: 25 c1 rjmp .+586 ; 0xa92 <__vector_12+0x524> + case 0x0301: // String 1 + usb_desc_out(false,(uint8_t *)&string1.bLength,pgm_read_byte(&string1.bLength),ucr.wLength); + 848: ea e8 ldi r30, 0x8A ; 138 + 84a: f0 e0 ldi r31, 0x00 ; 0 + 84c: 44 91 lpm r20, Z + 84e: 2f 81 ldd r18, Y+7 ; 0x07 + 850: 38 85 ldd r19, Y+8 ; 0x08 + 852: bf 01 movw r22, r30 + 854: 80 e0 ldi r24, 0x00 ; 0 + 856: 0e 94 bd 01 call 0x37a ; 0x37a + break; + 85a: 1b c1 rjmp .+566 ; 0xa92 <__vector_12+0x524> + case 0x0302: // String 2 + usb_desc_out(false,(uint8_t *)&string2.bLength,pgm_read_byte(&string2.bLength),ucr.wLength); + 85c: e0 ea ldi r30, 0xA0 ; 160 + 85e: f0 e0 ldi r31, 0x00 ; 0 + 860: 44 91 lpm r20, Z + 862: 2f 81 ldd r18, Y+7 ; 0x07 + 864: 38 85 ldd r19, Y+8 ; 0x08 + 866: bf 01 movw r22, r30 + 868: 80 e0 ldi r24, 0x00 ; 0 + 86a: 0e 94 bd 01 call 0x37a ; 0x37a + break; + 86e: 11 c1 rjmp .+546 ; 0xa92 <__vector_12+0x524> + #if (USESN>0) + case 0x0303: // String 3, serial number + #if (USESN==1) // Seriennummer im Flash + usb_desc_out(false,(uint8_t *)&string3.bLength,pgm_read_byte(&string3.bLength),ucr.wLength); + 870: e2 ec ldi r30, 0xC2 ; 194 + 872: f0 e0 ldi r31, 0x00 ; 0 + 874: 44 91 lpm r20, Z + 876: 2f 81 ldd r18, Y+7 ; 0x07 + 878: 38 85 ldd r19, Y+8 ; 0x08 + 87a: bf 01 movw r22, r30 + 87c: 80 e0 ldi r24, 0x00 ; 0 + 87e: 0e 94 bd 01 call 0x37a ; 0x37a + i++; + } + buf.bLength=2*i+2; // total length of the data set + usb_desc_out(true,(uint8_t *)&buf,buf.bLength,ucr.wLength); + #endif + break; + 882: 07 c1 rjmp .+526 ; 0xa92 <__vector_12+0x524> + #endif + default: + STALL; // stall + 884: 81 e2 ldi r24, 0x21 ; 33 + 886: 80 93 eb 00 sts 0x00EB, r24 + 88a: 03 c1 rjmp .+518 ; 0xa92 <__vector_12+0x524> + } + return; + } + if (ucr.bRequest == SET_ADDRESS) { + 88c: 85 30 cpi r24, 0x05 ; 5 + 88e: 71 f4 brne .+28 ; 0x8ac <__vector_12+0x33e> + USB_SEND_IN; + 890: 8e ef ldi r24, 0xFE ; 254 + 892: 80 93 e8 00 sts 0x00E8, r24 + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 896: e8 ee ldi r30, 0xE8 ; 232 + 898: f0 e0 ldi r31, 0x00 ; 0 + 89a: 80 81 ld r24, Z + 89c: 80 ff sbrs r24, 0 + 89e: fd cf rjmp .-6 ; 0x89a <__vector_12+0x32c> + return; + } + if (ucr.bRequest == SET_ADDRESS) { + USB_SEND_IN; + usb_wait_in_ready(); + UDADDR = ucr.wValue | _BV(ADDEN); + 8a0: 8b 81 ldd r24, Y+3 ; 0x03 + 8a2: 9c 81 ldd r25, Y+4 ; 0x04 + 8a4: 80 68 ori r24, 0x80 ; 128 + 8a6: 80 93 e3 00 sts 0x00E3, r24 + 8aa: f3 c0 rjmp .+486 ; 0xa92 <__vector_12+0x524> + return; + } + if (ucr.bRequest == SET_CONFIGURATION && ucr.bmRequestType == 0) { // another configuration will be chosen + 8ac: 89 30 cpi r24, 0x09 ; 9 + 8ae: c1 f4 brne .+48 ; 0x8e0 <__vector_12+0x372> + 8b0: 99 81 ldd r25, Y+1 ; 0x01 + 8b2: 91 11 cpse r25, r1 + 8b4: 60 c0 rjmp .+192 ; 0x976 <__vector_12+0x408> + if (ucr.wValue==1) { // configuration 1 will be chosen + 8b6: 8b 81 ldd r24, Y+3 ; 0x03 + 8b8: 9c 81 ldd r25, Y+4 ; 0x04 + 8ba: 01 97 sbiw r24, 0x01 ; 1 + 8bc: 69 f4 brne .+26 ; 0x8d8 <__vector_12+0x36a> + usb_conf = ucr.wValue; + 8be: 81 e0 ldi r24, 0x01 ; 1 + 8c0: 80 93 3e 01 sts 0x013E, r24 + USB_SEND_IN; + 8c4: 8e ef ldi r24, 0xFE ; 254 + 8c6: 80 93 e8 00 sts 0x00E8, r24 + #if (NUMINTERFACES==1) + usb_endpoints(); // initialize endpoints + #else + usb_if = 0; // select interface 0 + 8ca: 10 92 0e 01 sts 0x010E, r1 + usb_endpoints(usb_if); // initialize endpoints + 8ce: 80 91 0e 01 lds r24, 0x010E + 8d2: 0e 94 2f 01 call 0x25e ; 0x25e + 8d6: dd c0 rjmp .+442 ; 0xa92 <__vector_12+0x524> + #endif + } else { // other configurations are not supported in this version + STALL; // stall + 8d8: 81 e2 ldi r24, 0x21 ; 33 + 8da: 80 93 eb 00 sts 0x00EB, r24 + 8de: d9 c0 rjmp .+434 ; 0xa92 <__vector_12+0x524> + } + return; + } + if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { + 8e0: 88 30 cpi r24, 0x08 ; 8 + 8e2: 89 f4 brne .+34 ; 0x906 <__vector_12+0x398> + 8e4: 99 81 ldd r25, Y+1 ; 0x01 + 8e6: 90 38 cpi r25, 0x80 ; 128 + 8e8: 09 f0 breq .+2 ; 0x8ec <__vector_12+0x37e> + 8ea: 57 c0 rjmp .+174 ; 0x99a <__vector_12+0x42c> + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 8ec: e8 ee ldi r30, 0xE8 ; 232 + 8ee: f0 e0 ldi r31, 0x00 ; 0 + 8f0: 80 81 ld r24, Z + 8f2: 80 ff sbrs r24, 0 + 8f4: fd cf rjmp .-6 ; 0x8f0 <__vector_12+0x382> + } + return; + } + if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { + usb_wait_in_ready(); + UEDATX = usb_conf; + 8f6: 80 91 3e 01 lds r24, 0x013E + 8fa: 80 93 f1 00 sts 0x00F1, r24 + USB_SEND_IN; + 8fe: 8e ef ldi r24, 0xFE ; 254 + 900: 80 93 e8 00 sts 0x00E8, r24 + 904: c6 c0 rjmp .+396 ; 0xa92 <__vector_12+0x524> + return; + } + if (ucr.bRequest == GET_STATUS) { + 906: 81 11 cpse r24, r1 + 908: 1c c0 rjmp .+56 ; 0x942 <__vector_12+0x3d4> + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 90a: e8 ee ldi r30, 0xE8 ; 232 + 90c: f0 e0 ldi r31, 0x00 ; 0 + 90e: 80 81 ld r24, Z + 910: 80 ff sbrs r24, 0 + 912: fd cf rjmp .-6 ; 0x90e <__vector_12+0x3a0> + } + if (ucr.bRequest == GET_STATUS) { + usb_wait_in_ready(); + i = 0; + #ifdef SUPPORT_ENDPOINT_HALT + if (ucr.bmRequestType == 0x82) { + 914: 89 81 ldd r24, Y+1 ; 0x01 + 916: 82 38 cpi r24, 0x82 ; 130 + 918: 59 f4 brne .+22 ; 0x930 <__vector_12+0x3c2> + UENUM = ucr.wIndex; + 91a: 8d 81 ldd r24, Y+5 ; 0x05 + 91c: e9 ee ldi r30, 0xE9 ; 233 + 91e: f0 e0 ldi r31, 0x00 ; 0 + 920: 80 83 st Z, r24 + if (UECONX & _BV(STALLRQ)) i = 1; + 922: 80 91 eb 00 lds r24, 0x00EB + 926: 85 fb bst r24, 5 + 928: 88 27 eor r24, r24 + 92a: 80 f9 bld r24, 0 + UENUM = 0; + 92c: 10 82 st Z, r1 + 92e: 01 c0 rjmp .+2 ; 0x932 <__vector_12+0x3c4> + USB_SEND_IN; + return; + } + if (ucr.bRequest == GET_STATUS) { + usb_wait_in_ready(); + i = 0; + 930: 80 e0 ldi r24, 0x00 ; 0 + UENUM = ucr.wIndex; + if (UECONX & _BV(STALLRQ)) i = 1; + UENUM = 0; + } + #endif + UEDATX = i; + 932: e1 ef ldi r30, 0xF1 ; 241 + 934: f0 e0 ldi r31, 0x00 ; 0 + 936: 80 83 st Z, r24 + UEDATX = 0; + 938: 10 82 st Z, r1 + USB_SEND_IN; + 93a: 8e ef ldi r24, 0xFE ; 254 + 93c: 80 93 e8 00 sts 0x00E8, r24 + 940: a8 c0 rjmp .+336 ; 0xa92 <__vector_12+0x524> + return; + } + #if (NUMINTERFACES>1) + if (ucr.bRequest == SET_INTERFACE && (ucr.bmRequestType == 0x20 || ucr.bmRequestType == 0)) { // another interface will be chosen + 942: 8b 30 cpi r24, 0x0B ; 11 + 944: c1 f4 brne .+48 ; 0x976 <__vector_12+0x408> + 946: 89 81 ldd r24, Y+1 ; 0x01 + 948: 80 32 cpi r24, 0x20 ; 32 + 94a: 11 f0 breq .+4 ; 0x950 <__vector_12+0x3e2> + 94c: 81 11 cpse r24, r1 + 94e: 55 c0 rjmp .+170 ; 0x9fa <__vector_12+0x48c> + if (ucr.wIndex + usb_if = ucr.wIndex; + 95a: 80 93 0e 01 sts 0x010E, r24 + USB_SEND_IN; + 95e: 8e ef ldi r24, 0xFE ; 254 + 960: 80 93 e8 00 sts 0x00E8, r24 + usb_endpoints(usb_if); // initialize endpoints + 964: 80 91 0e 01 lds r24, 0x010E + 968: 0e 94 2f 01 call 0x25e ; 0x25e + 96c: 92 c0 rjmp .+292 ; 0xa92 <__vector_12+0x524> + } else { // other configurations are not supported in this version + STALL; // stall + 96e: 81 e2 ldi r24, 0x21 ; 33 + 970: 80 93 eb 00 sts 0x00EB, r24 + 974: 8e c0 rjmp .+284 ; 0xa92 <__vector_12+0x524> + } + return; + } + if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { + 976: 8a 30 cpi r24, 0x0A ; 10 + 978: 81 f4 brne .+32 ; 0x99a <__vector_12+0x42c> + 97a: 89 81 ldd r24, Y+1 ; 0x01 + 97c: 80 38 cpi r24, 0x80 ; 128 + 97e: e9 f5 brne .+122 ; 0x9fa <__vector_12+0x48c> + +#define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) + +static inline void usb_wait_in_ready(void) +{ + while (!(UEINTX & _BV(TXINI))); + 980: e8 ee ldi r30, 0xE8 ; 232 + 982: f0 e0 ldi r31, 0x00 ; 0 + 984: 80 81 ld r24, Z + 986: 80 ff sbrs r24, 0 + 988: fd cf rjmp .-6 ; 0x984 <__vector_12+0x416> + } + return; + } + if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { + usb_wait_in_ready(); + UEDATX = usb_if; + 98a: 80 91 0e 01 lds r24, 0x010E + 98e: 80 93 f1 00 sts 0x00F1, r24 + USB_SEND_IN; + 992: 8e ef ldi r24, 0xFE ; 254 + 994: 80 93 e8 00 sts 0x00E8, r24 + 998: 7c c0 rjmp .+248 ; 0xa92 <__vector_12+0x524> + return; + } + #endif + #ifdef SUPPORT_ENDPOINT_HALT + if ((ucr.bRequest == CLEAR_FEATURE || ucr.bRequest == SET_FEATURE) + 99a: 81 30 cpi r24, 0x01 ; 1 + 99c: 11 f0 breq .+4 ; 0x9a2 <__vector_12+0x434> + 99e: 83 30 cpi r24, 0x03 ; 3 + 9a0: 61 f5 brne .+88 ; 0x9fa <__vector_12+0x48c> + && ucr.bmRequestType == 0x02 && ucr.wValue == 0) { + 9a2: 89 81 ldd r24, Y+1 ; 0x01 + 9a4: 82 30 cpi r24, 0x02 ; 2 + 9a6: 49 f5 brne .+82 ; 0x9fa <__vector_12+0x48c> + 9a8: 8b 81 ldd r24, Y+3 ; 0x03 + 9aa: 9c 81 ldd r25, Y+4 ; 0x04 + 9ac: 89 2b or r24, r25 + 9ae: 29 f5 brne .+74 ; 0x9fa <__vector_12+0x48c> + i = ucr.wIndex & 0x7F; + 9b0: 8d 81 ldd r24, Y+5 ; 0x05 + 9b2: 9e 81 ldd r25, Y+6 ; 0x06 + 9b4: 8f 77 andi r24, 0x7F ; 127 + 9b6: 99 27 eor r25, r25 + if (i >= 1 && i <= MAX_ENDPOINT) { + 9b8: 38 2f mov r19, r24 + 9ba: 31 50 subi r19, 0x01 ; 1 + 9bc: 34 30 cpi r19, 0x04 ; 4 + 9be: e8 f4 brcc .+58 ; 0x9fa <__vector_12+0x48c> + USB_SEND_IN; + 9c0: 3e ef ldi r19, 0xFE ; 254 + 9c2: 30 93 e8 00 sts 0x00E8, r19 + UENUM = i; + 9c6: 80 93 e9 00 sts 0x00E9, r24 + if (ucr.bRequest == SET_FEATURE) { + 9ca: 2a 81 ldd r18, Y+2 ; 0x02 + 9cc: 23 30 cpi r18, 0x03 ; 3 + 9ce: 21 f4 brne .+8 ; 0x9d8 <__vector_12+0x46a> + UECONX = _BV(STALLRQ)|_BV(EPEN); + 9d0: 81 e2 ldi r24, 0x21 ; 33 + 9d2: 80 93 eb 00 sts 0x00EB, r24 + 9d6: 5d c0 rjmp .+186 ; 0xa92 <__vector_12+0x524> + } else { + UECONX = _BV(STALLRQC)|_BV(RSTDT)|_BV(EPEN); + 9d8: 99 e1 ldi r25, 0x19 ; 25 + 9da: 90 93 eb 00 sts 0x00EB, r25 + UERST = _BV(i); + 9de: 21 e0 ldi r18, 0x01 ; 1 + 9e0: 30 e0 ldi r19, 0x00 ; 0 + 9e2: f9 01 movw r30, r18 + 9e4: 02 c0 rjmp .+4 ; 0x9ea <__vector_12+0x47c> + 9e6: ee 0f add r30, r30 + 9e8: ff 1f adc r31, r31 + 9ea: 8a 95 dec r24 + 9ec: e2 f7 brpl .-8 ; 0x9e6 <__vector_12+0x478> + 9ee: cf 01 movw r24, r30 + 9f0: ea ee ldi r30, 0xEA ; 234 + 9f2: f0 e0 ldi r31, 0x00 ; 0 + 9f4: 80 83 st Z, r24 + UERST = 0; + 9f6: 10 82 st Z, r1 + 9f8: 4c c0 rjmp .+152 ; 0xa92 <__vector_12+0x524> + } + } + #endif + #ifdef USERDEFCONTROLS + // handle user defined control requests + if (!usb_controlrequest(&ucr)) + 9fa: ce 01 movw r24, r28 + 9fc: 01 96 adiw r24, 0x01 ; 1 + 9fe: 0e 94 d5 00 call 0x1aa ; 0x1aa + a02: 81 11 cpse r24, r1 + a04: 46 c0 rjmp .+140 ; 0xa92 <__vector_12+0x524> + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + a06: 81 e2 ldi r24, 0x21 ; 33 + a08: 80 93 eb 00 sts 0x00EB, r24 + a0c: 42 c0 rjmp .+132 ; 0xa92 <__vector_12+0x524> + return; + #endif + } + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + a0e: 81 e2 ldi r24, 0x21 ; 33 + a10: 80 93 eb 00 sts 0x00EB, r24 + a14: 2f c0 rjmp .+94 ; 0xa74 <__vector_12+0x506> + a16: f2 2e mov r15, r18 + } + + // handle interrupts for further endpoints + for (i=1; i<=MAX_ENDPOINT; i++) { + if (UEINT & _BV(i)) { + a18: 40 81 ld r20, Z + a1a: 50 e0 ldi r21, 0x00 ; 0 + a1c: 02 2e mov r0, r18 + a1e: 02 c0 rjmp .+4 ; 0xa24 <__vector_12+0x4b6> + a20: 55 95 asr r21 + a22: 47 95 ror r20 + a24: 0a 94 dec r0 + a26: e2 f7 brpl .-8 ; 0xa20 <__vector_12+0x4b2> + a28: 40 ff sbrs r20, 0 + a2a: 1b c0 rjmp .+54 ; 0xa62 <__vector_12+0x4f4> + UENUM=i; // select endpoint + a2c: db 01 movw r26, r22 + a2e: 2c 93 st X, r18 + intbits = UEINTX; // save interrupt bits of the endpoint + a30: d6 01 movw r26, r12 + a32: 8c 91 ld r24, X + if (intbits & _BV(RXOUTI)) { // interrupt occured by incoming data + a34: 82 ff sbrs r24, 2 + a36: 13 c0 rjmp .+38 ; 0xa5e <__vector_12+0x4f0> + #ifdef MEGA4_6 + if (((uint16_t)(UEBCHX)<<8)+UEBCLX) { // data available in input endpoint + usb_ep(i,((uint16_t)(UEBCHX)<<8)+UEBCLX); + #else + if (UEBCLX) { // data available in input endpoint + a38: 80 91 f2 00 lds r24, 0x00F2 + a3c: 88 23 and r24, r24 + a3e: 41 f0 breq .+16 ; 0xa50 <__vector_12+0x4e2> + usb_ep(i,UEBCLX); + a40: 60 91 f2 00 lds r22, 0x00F2 + a44: 70 e0 ldi r23, 0x00 ; 0 + a46: 82 2f mov r24, r18 + a48: 0e 94 06 01 call 0x20c ; 0x20c + #endif + UENUM=i; // reselect endpoint (if changed by handling routine) + a4c: f0 92 e9 00 sts 0x00E9, r15 + } + UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags + a50: e8 ee ldi r30, 0xE8 ; 232 + a52: f0 e0 ldi r31, 0x00 ; 0 + a54: 89 ef ldi r24, 0xF9 ; 249 + a56: 80 83 st Z, r24 + UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! + a58: 8f e7 ldi r24, 0x7F ; 127 + a5a: 80 83 st Z, r24 + a5c: 1a c0 rjmp .+52 ; 0xa92 <__vector_12+0x524> + return; + } + STALL; // stall + a5e: d8 01 movw r26, r16 + a60: 9c 93 st X, r25 + a62: 2f 5f subi r18, 0xFF ; 255 + a64: 3f 4f sbci r19, 0xFF ; 255 + } + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + } + + // handle interrupts for further endpoints + for (i=1; i<=MAX_ENDPOINT; i++) { + a66: 25 30 cpi r18, 0x05 ; 5 + a68: 31 05 cpc r19, r1 + a6a: a9 f6 brne .-86 ; 0xa16 <__vector_12+0x4a8> + return; + } + STALL; // stall + } + } + STALL; // stall + a6c: 81 e2 ldi r24, 0x21 ; 33 + a6e: 80 93 eb 00 sts 0x00EB, r24 + a72: 0f c0 rjmp .+30 ; 0xa92 <__vector_12+0x524> + USB_SEND_IN; + return; + } + if (ucr.bRequest == GET_STATUS) { + usb_wait_in_ready(); + i = 0; + a74: 21 e0 ldi r18, 0x01 ; 1 + a76: 30 e0 ldi r19, 0x00 ; 0 + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + } + + // handle interrupts for further endpoints + for (i=1; i<=MAX_ENDPOINT; i++) { + if (UEINT & _BV(i)) { + a78: e4 ef ldi r30, 0xF4 ; 244 + a7a: f0 e0 ldi r31, 0x00 ; 0 + UENUM=i; // select endpoint + a7c: 69 ee ldi r22, 0xE9 ; 233 + a7e: 70 e0 ldi r23, 0x00 ; 0 + intbits = UEINTX; // save interrupt bits of the endpoint + a80: 0f 2e mov r0, r31 + a82: f8 ee ldi r31, 0xE8 ; 232 + a84: cf 2e mov r12, r31 + a86: d1 2c mov r13, r1 + a88: f0 2d mov r31, r0 + } + UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags + UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! + return; + } + STALL; // stall + a8a: 0b ee ldi r16, 0xEB ; 235 + a8c: 10 e0 ldi r17, 0x00 ; 0 + a8e: 91 e2 ldi r25, 0x21 ; 33 + a90: c2 cf rjmp .-124 ; 0xa16 <__vector_12+0x4a8> + } + } + STALL; // stall +} + a92: 2a 96 adiw r28, 0x0a ; 10 + a94: 0f b6 in r0, 0x3f ; 63 + a96: f8 94 cli + a98: de bf out 0x3e, r29 ; 62 + a9a: 0f be out 0x3f, r0 ; 63 + a9c: cd bf out 0x3d, r28 ; 61 + a9e: df 91 pop r29 + aa0: cf 91 pop r28 + aa2: ff 91 pop r31 + aa4: ef 91 pop r30 + aa6: bf 91 pop r27 + aa8: af 91 pop r26 + aaa: 9f 91 pop r25 + aac: 8f 91 pop r24 + aae: 7f 91 pop r23 + ab0: 6f 91 pop r22 + ab2: 5f 91 pop r21 + ab4: 4f 91 pop r20 + ab6: 3f 91 pop r19 + ab8: 2f 91 pop r18 + aba: 1f 91 pop r17 + abc: 0f 91 pop r16 + abe: ff 90 pop r15 + ac0: ef 90 pop r14 + ac2: df 90 pop r13 + ac4: cf 90 pop r12 + ac6: bf 90 pop r11 + ac8: af 90 pop r10 + aca: 9f 90 pop r9 + acc: 8f 90 pop r8 + ace: 7f 90 pop r7 + ad0: 6f 90 pop r6 + ad2: 5f 90 pop r5 + ad4: 4f 90 pop r4 + ad6: 3f 90 pop r3 + ad8: 0f 90 pop r0 + ada: 0f be out 0x3f, r0 ; 63 + adc: 0f 90 pop r0 + ade: 1f 90 pop r1 + ae0: 18 95 reti + +00000ae2 <__mulhi3>: + ae2: 55 27 eor r21, r21 + ae4: 00 24 eor r0, r0 + +00000ae6 <__mulhi3_loop>: + ae6: 80 ff sbrs r24, 0 + ae8: 02 c0 rjmp .+4 ; 0xaee <__mulhi3_skip1> + aea: 06 0e add r0, r22 + aec: 57 1f adc r21, r23 + +00000aee <__mulhi3_skip1>: + aee: 66 0f add r22, r22 + af0: 77 1f adc r23, r23 + af2: 61 15 cp r22, r1 + af4: 71 05 cpc r23, r1 + af6: 21 f0 breq .+8 ; 0xb00 <__mulhi3_exit> + af8: 96 95 lsr r25 + afa: 87 95 ror r24 + afc: 00 97 sbiw r24, 0x00 ; 0 + afe: 99 f7 brne .-26 ; 0xae6 <__mulhi3_loop> + +00000b00 <__mulhi3_exit>: + b00: 95 2f mov r25, r21 + b02: 80 2d mov r24, r0 + b04: 08 95 ret + +00000b06 : + b06: 0f 93 push r16 + b08: 1f 93 push r17 + b0a: cf 93 push r28 + b0c: df 93 push r29 + b0e: 82 30 cpi r24, 0x02 ; 2 + b10: 91 05 cpc r25, r1 + b12: 10 f4 brcc .+4 ; 0xb18 + b14: 82 e0 ldi r24, 0x02 ; 2 + b16: 90 e0 ldi r25, 0x00 ; 0 + b18: e0 91 42 01 lds r30, 0x0142 + b1c: f0 91 43 01 lds r31, 0x0143 + b20: 20 e0 ldi r18, 0x00 ; 0 + b22: 30 e0 ldi r19, 0x00 ; 0 + b24: c0 e0 ldi r28, 0x00 ; 0 + b26: d0 e0 ldi r29, 0x00 ; 0 + b28: 23 c0 rjmp .+70 ; 0xb70 + b2a: 40 81 ld r20, Z + b2c: 51 81 ldd r21, Z+1 ; 0x01 + b2e: 48 17 cp r20, r24 + b30: 59 07 cpc r21, r25 + b32: a8 f0 brcs .+42 ; 0xb5e + b34: 48 17 cp r20, r24 + b36: 59 07 cpc r21, r25 + b38: 61 f4 brne .+24 ; 0xb52 + b3a: 82 81 ldd r24, Z+2 ; 0x02 + b3c: 93 81 ldd r25, Z+3 ; 0x03 + b3e: 20 97 sbiw r28, 0x00 ; 0 + b40: 19 f0 breq .+6 ; 0xb48 + b42: 9b 83 std Y+3, r25 ; 0x03 + b44: 8a 83 std Y+2, r24 ; 0x02 + b46: 2e c0 rjmp .+92 ; 0xba4 + b48: 90 93 43 01 sts 0x0143, r25 + b4c: 80 93 42 01 sts 0x0142, r24 + b50: 29 c0 rjmp .+82 ; 0xba4 + b52: 21 15 cp r18, r1 + b54: 31 05 cpc r19, r1 + b56: 29 f0 breq .+10 ; 0xb62 + b58: 42 17 cp r20, r18 + b5a: 53 07 cpc r21, r19 + b5c: 10 f0 brcs .+4 ; 0xb62 + b5e: a9 01 movw r20, r18 + b60: 02 c0 rjmp .+4 ; 0xb66 + b62: be 01 movw r22, r28 + b64: df 01 movw r26, r30 + b66: 02 81 ldd r16, Z+2 ; 0x02 + b68: 13 81 ldd r17, Z+3 ; 0x03 + b6a: ef 01 movw r28, r30 + b6c: 9a 01 movw r18, r20 + b6e: f8 01 movw r30, r16 + b70: 30 97 sbiw r30, 0x00 ; 0 + b72: d9 f6 brne .-74 ; 0xb2a + b74: 21 15 cp r18, r1 + b76: 31 05 cpc r19, r1 + b78: 09 f1 breq .+66 ; 0xbbc + b7a: 28 1b sub r18, r24 + b7c: 39 0b sbc r19, r25 + b7e: 24 30 cpi r18, 0x04 ; 4 + b80: 31 05 cpc r19, r1 + b82: 90 f4 brcc .+36 ; 0xba8 + b84: 12 96 adiw r26, 0x02 ; 2 + b86: 8d 91 ld r24, X+ + b88: 9c 91 ld r25, X + b8a: 13 97 sbiw r26, 0x03 ; 3 + b8c: 61 15 cp r22, r1 + b8e: 71 05 cpc r23, r1 + b90: 21 f0 breq .+8 ; 0xb9a + b92: fb 01 movw r30, r22 + b94: 93 83 std Z+3, r25 ; 0x03 + b96: 82 83 std Z+2, r24 ; 0x02 + b98: 04 c0 rjmp .+8 ; 0xba2 + b9a: 90 93 43 01 sts 0x0143, r25 + b9e: 80 93 42 01 sts 0x0142, r24 + ba2: fd 01 movw r30, r26 + ba4: 32 96 adiw r30, 0x02 ; 2 + ba6: 44 c0 rjmp .+136 ; 0xc30 + ba8: fd 01 movw r30, r26 + baa: e2 0f add r30, r18 + bac: f3 1f adc r31, r19 + bae: 81 93 st Z+, r24 + bb0: 91 93 st Z+, r25 + bb2: 22 50 subi r18, 0x02 ; 2 + bb4: 31 09 sbc r19, r1 + bb6: 2d 93 st X+, r18 + bb8: 3c 93 st X, r19 + bba: 3a c0 rjmp .+116 ; 0xc30 + bbc: 20 91 40 01 lds r18, 0x0140 + bc0: 30 91 41 01 lds r19, 0x0141 + bc4: 23 2b or r18, r19 + bc6: 41 f4 brne .+16 ; 0xbd8 + bc8: 20 91 11 01 lds r18, 0x0111 + bcc: 30 91 12 01 lds r19, 0x0112 + bd0: 30 93 41 01 sts 0x0141, r19 + bd4: 20 93 40 01 sts 0x0140, r18 + bd8: 20 91 0f 01 lds r18, 0x010F + bdc: 30 91 10 01 lds r19, 0x0110 + be0: 21 15 cp r18, r1 + be2: 31 05 cpc r19, r1 + be4: 41 f4 brne .+16 ; 0xbf6 + be6: 2d b7 in r18, 0x3d ; 61 + be8: 3e b7 in r19, 0x3e ; 62 + bea: 40 91 13 01 lds r20, 0x0113 + bee: 50 91 14 01 lds r21, 0x0114 + bf2: 24 1b sub r18, r20 + bf4: 35 0b sbc r19, r21 + bf6: e0 91 40 01 lds r30, 0x0140 + bfa: f0 91 41 01 lds r31, 0x0141 + bfe: e2 17 cp r30, r18 + c00: f3 07 cpc r31, r19 + c02: a0 f4 brcc .+40 ; 0xc2c + c04: 2e 1b sub r18, r30 + c06: 3f 0b sbc r19, r31 + c08: 28 17 cp r18, r24 + c0a: 39 07 cpc r19, r25 + c0c: 78 f0 brcs .+30 ; 0xc2c + c0e: ac 01 movw r20, r24 + c10: 4e 5f subi r20, 0xFE ; 254 + c12: 5f 4f sbci r21, 0xFF ; 255 + c14: 24 17 cp r18, r20 + c16: 35 07 cpc r19, r21 + c18: 48 f0 brcs .+18 ; 0xc2c + c1a: 4e 0f add r20, r30 + c1c: 5f 1f adc r21, r31 + c1e: 50 93 41 01 sts 0x0141, r21 + c22: 40 93 40 01 sts 0x0140, r20 + c26: 81 93 st Z+, r24 + c28: 91 93 st Z+, r25 + c2a: 02 c0 rjmp .+4 ; 0xc30 + c2c: e0 e0 ldi r30, 0x00 ; 0 + c2e: f0 e0 ldi r31, 0x00 ; 0 + c30: cf 01 movw r24, r30 + c32: df 91 pop r29 + c34: cf 91 pop r28 + c36: 1f 91 pop r17 + c38: 0f 91 pop r16 + c3a: 08 95 ret + +00000c3c : + c3c: ef 92 push r14 + c3e: ff 92 push r15 + c40: 0f 93 push r16 + c42: 1f 93 push r17 + c44: cf 93 push r28 + c46: df 93 push r29 + c48: 00 97 sbiw r24, 0x00 ; 0 + c4a: 09 f4 brne .+2 ; 0xc4e + c4c: 8f c0 rjmp .+286 ; 0xd6c + c4e: dc 01 movw r26, r24 + c50: 12 97 sbiw r26, 0x02 ; 2 + c52: 13 96 adiw r26, 0x03 ; 3 + c54: 1c 92 st X, r1 + c56: 1e 92 st -X, r1 + c58: 12 97 sbiw r26, 0x02 ; 2 + c5a: e0 90 42 01 lds r14, 0x0142 + c5e: f0 90 43 01 lds r15, 0x0143 + c62: e1 14 cp r14, r1 + c64: f1 04 cpc r15, r1 + c66: 89 f4 brne .+34 ; 0xc8a + c68: 2d 91 ld r18, X+ + c6a: 3c 91 ld r19, X + c6c: 11 97 sbiw r26, 0x01 ; 1 + c6e: 28 0f add r18, r24 + c70: 39 1f adc r19, r25 + c72: 80 91 40 01 lds r24, 0x0140 + c76: 90 91 41 01 lds r25, 0x0141 + c7a: 82 17 cp r24, r18 + c7c: 93 07 cpc r25, r19 + c7e: 89 f5 brne .+98 ; 0xce2 + c80: b0 93 41 01 sts 0x0141, r27 + c84: a0 93 40 01 sts 0x0140, r26 + c88: 71 c0 rjmp .+226 ; 0xd6c + c8a: e7 01 movw r28, r14 + c8c: 20 e0 ldi r18, 0x00 ; 0 + c8e: 30 e0 ldi r19, 0x00 ; 0 + c90: 01 c0 rjmp .+2 ; 0xc94 + c92: ea 01 movw r28, r20 + c94: ca 17 cp r28, r26 + c96: db 07 cpc r29, r27 + c98: 38 f4 brcc .+14 ; 0xca8 + c9a: 4a 81 ldd r20, Y+2 ; 0x02 + c9c: 5b 81 ldd r21, Y+3 ; 0x03 + c9e: 9e 01 movw r18, r28 + ca0: 41 15 cp r20, r1 + ca2: 51 05 cpc r21, r1 + ca4: b1 f7 brne .-20 ; 0xc92 + ca6: 22 c0 rjmp .+68 ; 0xcec + ca8: bc 01 movw r22, r24 + caa: 62 50 subi r22, 0x02 ; 2 + cac: 71 09 sbc r23, r1 + cae: fb 01 movw r30, r22 + cb0: d3 83 std Z+3, r29 ; 0x03 + cb2: c2 83 std Z+2, r28 ; 0x02 + cb4: 00 81 ld r16, Z + cb6: 11 81 ldd r17, Z+1 ; 0x01 + cb8: ac 01 movw r20, r24 + cba: 40 0f add r20, r16 + cbc: 51 1f adc r21, r17 + cbe: 4c 17 cp r20, r28 + cc0: 5d 07 cpc r21, r29 + cc2: 61 f4 brne .+24 ; 0xcdc + cc4: 48 81 ld r20, Y + cc6: 59 81 ldd r21, Y+1 ; 0x01 + cc8: 40 0f add r20, r16 + cca: 51 1f adc r21, r17 + ccc: 4e 5f subi r20, 0xFE ; 254 + cce: 5f 4f sbci r21, 0xFF ; 255 + cd0: 51 83 std Z+1, r21 ; 0x01 + cd2: 40 83 st Z, r20 + cd4: 4a 81 ldd r20, Y+2 ; 0x02 + cd6: 5b 81 ldd r21, Y+3 ; 0x03 + cd8: 53 83 std Z+3, r21 ; 0x03 + cda: 42 83 std Z+2, r20 ; 0x02 + cdc: 21 15 cp r18, r1 + cde: 31 05 cpc r19, r1 + ce0: 29 f4 brne .+10 ; 0xcec + ce2: b0 93 43 01 sts 0x0143, r27 + ce6: a0 93 42 01 sts 0x0142, r26 + cea: 40 c0 rjmp .+128 ; 0xd6c + cec: f9 01 movw r30, r18 + cee: b3 83 std Z+3, r27 ; 0x03 + cf0: a2 83 std Z+2, r26 ; 0x02 + cf2: e9 01 movw r28, r18 + cf4: 69 91 ld r22, Y+ + cf6: 79 91 ld r23, Y+ + cf8: c6 0f add r28, r22 + cfa: d7 1f adc r29, r23 + cfc: ac 17 cp r26, r28 + cfe: bd 07 cpc r27, r29 + d00: 79 f4 brne .+30 ; 0xd20 + d02: dc 01 movw r26, r24 + d04: 5e 91 ld r21, -X + d06: 4e 91 ld r20, -X + d08: 46 0f add r20, r22 + d0a: 57 1f adc r21, r23 + d0c: 4e 5f subi r20, 0xFE ; 254 + d0e: 5f 4f sbci r21, 0xFF ; 255 + d10: 51 83 std Z+1, r21 ; 0x01 + d12: 40 83 st Z, r20 + d14: 12 96 adiw r26, 0x02 ; 2 + d16: 8d 91 ld r24, X+ + d18: 9c 91 ld r25, X + d1a: 13 97 sbiw r26, 0x03 ; 3 + d1c: 93 83 std Z+3, r25 ; 0x03 + d1e: 82 83 std Z+2, r24 ; 0x02 + d20: a0 e0 ldi r26, 0x00 ; 0 + d22: b0 e0 ldi r27, 0x00 ; 0 + d24: 02 c0 rjmp .+4 ; 0xd2a + d26: d7 01 movw r26, r14 + d28: 7c 01 movw r14, r24 + d2a: f7 01 movw r30, r14 + d2c: 82 81 ldd r24, Z+2 ; 0x02 + d2e: 93 81 ldd r25, Z+3 ; 0x03 + d30: 00 97 sbiw r24, 0x00 ; 0 + d32: c9 f7 brne .-14 ; 0xd26 + d34: c7 01 movw r24, r14 + d36: 02 96 adiw r24, 0x02 ; 2 + d38: 20 81 ld r18, Z + d3a: 31 81 ldd r19, Z+1 ; 0x01 + d3c: 82 0f add r24, r18 + d3e: 93 1f adc r25, r19 + d40: 20 91 40 01 lds r18, 0x0140 + d44: 30 91 41 01 lds r19, 0x0141 + d48: 28 17 cp r18, r24 + d4a: 39 07 cpc r19, r25 + d4c: 79 f4 brne .+30 ; 0xd6c + d4e: 10 97 sbiw r26, 0x00 ; 0 + d50: 29 f4 brne .+10 ; 0xd5c + d52: 10 92 43 01 sts 0x0143, r1 + d56: 10 92 42 01 sts 0x0142, r1 + d5a: 04 c0 rjmp .+8 ; 0xd64 + d5c: 13 96 adiw r26, 0x03 ; 3 + d5e: 1c 92 st X, r1 + d60: 1e 92 st -X, r1 + d62: 12 97 sbiw r26, 0x02 ; 2 + d64: f0 92 41 01 sts 0x0141, r15 + d68: e0 92 40 01 sts 0x0140, r14 + d6c: cd b7 in r28, 0x3d ; 61 + d6e: de b7 in r29, 0x3e ; 62 + d70: e6 e0 ldi r30, 0x06 ; 6 + d72: 0c 94 d1 06 jmp 0xda2 ; 0xda2 <__epilogue_restores__+0x18> + +00000d76 : + d76: dc 01 movw r26, r24 + d78: 6c 91 ld r22, X + d7a: 61 56 subi r22, 0x61 ; 97 + d7c: 6a 31 cpi r22, 0x1A ; 26 + d7e: 08 f0 brcs .+2 ; 0xd82 + d80: 60 5e subi r22, 0xE0 ; 224 + d82: 6f 5b subi r22, 0xBF ; 191 + d84: 6d 93 st X+, r22 + d86: c1 f7 brne .-16 ; 0xd78 + d88: 08 95 ret + +00000d8a <__epilogue_restores__>: + d8a: 2a 88 ldd r2, Y+18 ; 0x12 + d8c: 39 88 ldd r3, Y+17 ; 0x11 + d8e: 48 88 ldd r4, Y+16 ; 0x10 + d90: 5f 84 ldd r5, Y+15 ; 0x0f + d92: 6e 84 ldd r6, Y+14 ; 0x0e + d94: 7d 84 ldd r7, Y+13 ; 0x0d + d96: 8c 84 ldd r8, Y+12 ; 0x0c + d98: 9b 84 ldd r9, Y+11 ; 0x0b + d9a: aa 84 ldd r10, Y+10 ; 0x0a + d9c: b9 84 ldd r11, Y+9 ; 0x09 + d9e: c8 84 ldd r12, Y+8 ; 0x08 + da0: df 80 ldd r13, Y+7 ; 0x07 + da2: ee 80 ldd r14, Y+6 ; 0x06 + da4: fd 80 ldd r15, Y+5 ; 0x05 + da6: 0c 81 ldd r16, Y+4 ; 0x04 + da8: 1b 81 ldd r17, Y+3 ; 0x03 + daa: aa 81 ldd r26, Y+2 ; 0x02 + dac: b9 81 ldd r27, Y+1 ; 0x01 + dae: ce 0f add r28, r30 + db0: d1 1d adc r29, r1 + db2: 0f b6 in r0, 0x3f ; 63 + db4: f8 94 cli + db6: de bf out 0x3e, r29 ; 62 + db8: 0f be out 0x3f, r0 ; 63 + dba: cd bf out 0x3d, r28 ; 61 + dbc: ed 01 movw r28, r26 + dbe: 08 95 ret + +00000dc0 <_exit>: + dc0: f8 94 cli + +00000dc2 <__stop_program>: + dc2: ff cf rjmp .-2 ; 0xdc2 <__stop_program> diff --git a/Mainboard_/Mainboard/Debug/Mainboard.map b/Mainboard_/Mainboard/Debug/Mainboard.map new file mode 100644 index 0000000..ccc2526 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.map @@ -0,0 +1,753 @@ +Archive member included because of file (symbol) + +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + usb_user.o (__mulhi3) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o (exit) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + rs232.o (__do_copy_data) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + usb_user.o (__do_clear_bss) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + usb_user.o (malloc) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + usb.o (strupr) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + rs232.o (fprintf) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + rs232.o (__iob) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) (vfprintf) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (strnlen_P) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (strnlen) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (fputc) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (__ultoa_invert) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) (__mulqi3) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) (__prologue_saves__) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) (__epilogue_restores__) + +Allocating common symbols +Common symbol size file + +__brkval 0x2 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) +__flp 0x2 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) +__iob 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + +Discarded input sections + + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .text 0x00000000 0x0 led.o + .bss 0x00000000 0x0 led.o + .text.led 0x00000000 0x14 led.o + .text.init_led + 0x00000000 0x8 led.o + .text.fade 0x00000000 0xbe led.o + .text.led_rainbow + 0x00000000 0x74 led.o + .text 0x00000000 0x0 Mainboard.o + .bss 0x00000000 0x0 Mainboard.o + .text 0x00000000 0x0 rs232.o + .bss 0x00000000 0x0 rs232.o + .text.init_rs232 + 0x00000000 0x24 rs232.o + .text.rs232_send + 0x00000000 0x1a rs232.o + .text 0x00000000 0x0 usb.o + .bss 0x00000000 0x0 usb.o + .text.init_usb + 0x00000000 0x6 usb.o + .text.usb_send + 0x00000000 0x20 usb.o + .text.usb_getstatus + 0x00000000 0x6 usb.o + .text.usb_ready + 0x00000000 0x6 usb.o + .text 0x00000000 0x0 usb_user.o + .text.usb_init + 0x00000000 0x2e usb_user.o + .text.usb_status + 0x00000000 0x1c usb_user.o + .text.usb_configuration + 0x00000000 0x6 usb_user.o + .text.usb_interface + 0x00000000 0x6 usb_user.o + .text.usb_is_ready + 0x00000000 0x8 usb_user.o + .text.usb_freebuffer + 0x00000000 0x1e usb_user.o + .text.usb_rxavail + 0x00000000 0xa usb_user.o + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .text.avr-libc + 0x00000000 0x24 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + COMMON 0x00000000 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .text.avr-libc + 0x00000000 0x3bc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + .text.avr-libc + 0x00000000 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + .text.avr-libc + 0x00000000 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .text.avr-libc + 0x00000000 0x58 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + .text.avr-libc + 0x00000000 0xc0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc.mul + 0x00000000 0x12 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc.prologue + 0x00000000 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00010000 xr +data 0x00800060 0x0000ffa0 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000400 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +user_signatures 0x00850000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +Address of section .data set to 0x800100 +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o +LOAD led.o +LOAD Mainboard.o +LOAD rs232.o +LOAD usb.o +LOAD usb_user.o +START GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libm.a +END GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0xdc4 + *(.vectors) + .vectors 0x00000000 0x74 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + 0x00000000 __vector_default + 0x00000000 __vectors + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + .progmem.data 0x00000074 0x5e usb_user.o + 0x000000d2 . = ALIGN (0x2) + 0x000000d2 __trampolines_start = . + *(.trampolines) + .trampolines 0x000000d2 0x0 linker stubs + *(.trampolines*) + 0x000000d2 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x000000d2 __ctors_start = . + *(.ctors) + 0x000000d2 __ctors_end = . + 0x000000d2 __dtors_start = . + *(.dtors) + 0x000000d2 __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x000000d2 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + 0x000000d2 __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x000000d2 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x000000de 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + 0x000000de __do_copy_data + .init4 0x000000f4 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + 0x000000f4 __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x00000104 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + *(.init9) + *(.text) + .text 0x0000010c 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + 0x0000010c __vector_22 + 0x0000010c __vector_28 + 0x0000010c __vector_1 + 0x0000010c __vector_24 + 0x0000010c __bad_interrupt + 0x0000010c __vector_6 + 0x0000010c __vector_3 + 0x0000010c __vector_23 + 0x0000010c __vector_25 + 0x0000010c __vector_13 + 0x0000010c __vector_17 + 0x0000010c __vector_19 + 0x0000010c __vector_7 + 0x0000010c __vector_27 + 0x0000010c __vector_5 + 0x0000010c __vector_4 + 0x0000010c __vector_9 + 0x0000010c __vector_2 + 0x0000010c __vector_21 + 0x0000010c __vector_15 + 0x0000010c __vector_8 + 0x0000010c __vector_26 + 0x0000010c __vector_14 + 0x0000010c __vector_10 + 0x0000010c __vector_16 + 0x0000010c __vector_18 + 0x0000010c __vector_20 + 0x00000110 . = ALIGN (0x2) + *(.text.*) + .text.spi_putc + 0x00000110 0x2c Mainboard.o + 0x00000110 spi_putc + .text.main 0x0000013c 0x4a Mainboard.o + 0x0000013c main + .text.uart_putchar + 0x00000186 0x24 rs232.o + 0x00000186 uart_putchar + .text.usb_controlrequest + 0x000001aa 0x62 usb.o + 0x000001aa usb_controlrequest + .text.usb_ep 0x0000020c 0x52 usb.o + 0x0000020c usb_ep + .text.usb_endpoints + 0x0000025e 0x110 usb_user.o + 0x0000025e usb_endpoints + .text.usb_wait_in + 0x0000036e 0xc usb_user.o + 0x0000036e usb_wait_in + .text.usb_desc_out + 0x0000037a 0xb6 usb_user.o + 0x0000037a usb_desc_out + .text.usb_rxdata + 0x00000430 0x4a usb_user.o + 0x00000430 usb_rxdata + .text.usb_txdata_control + 0x0000047a 0x46 usb_user.o + 0x0000047a usb_txdata_control + .text.usb_txdata + 0x000004c0 0x5e usb_user.o + 0x000004c0 usb_txdata + .text.__vector_11 + 0x0000051e 0x50 usb_user.o + 0x0000051e __vector_11 + .text.__vector_12 + 0x0000056e 0x574 usb_user.o + 0x0000056e __vector_12 + .text.libgcc.mul + 0x00000ae2 0x24 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + 0x00000ae2 __mulhi3 + .text.avr-libc + 0x00000b06 0x270 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + 0x00000b06 malloc + 0x00000c3c free + .text.avr-libc + 0x00000d76 0x14 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + 0x00000d76 strupr + .text.libgcc.prologue + 0x00000d8a 0x36 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + 0x00000d8a __epilogue_restores__ + 0x00000dc0 . = ALIGN (0x2) + *(.fini9) + .fini9 0x00000dc0 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + 0x00000dc0 _exit + 0x00000dc0 exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x00000dc0 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + *(.fini0) + 0x00000dc4 _etext = . + +.data 0x00800100 0x3e load address 0x00000dc4 + 0x00800100 PROVIDE (__data_start, .) + *(.data) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .data 0x00800100 0x0 led.o + .data 0x00800100 0x0 Mainboard.o + .data 0x00800100 0xe rs232.o + .data 0x0080010e 0x0 usb.o + .data 0x0080010e 0x1 usb_user.o + .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulhi3.o) + .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_exit.o) + .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_copy_data.o) + .data 0x0080010f 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_clear_bss.o) + .data 0x0080010f 0x6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + 0x0080010f __malloc_heap_end + 0x00800111 __malloc_heap_start + 0x00800113 __malloc_margin + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_mulqi3.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_prologue.o) + .data 0x00800115 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr35\libgcc.a(_epilogue.o) + *(.data*) + *(.rodata) + .rodata 0x00800115 0x10 usb.o + .rodata 0x00800125 0x18 usb_user.o + *(.rodata*) + *(.gnu.linkonce.d*) + 0x0080013e . = ALIGN (0x2) + *fill* 0x0080013d 0x1 + 0x0080013e _edata = . + 0x0080013e PROVIDE (__data_end, .) + +.bss 0x0080013e 0x6 + 0x0080013e PROVIDE (__bss_start, .) + *(.bss) + .bss 0x0080013e 0x2 usb_user.o + *(.bss*) + *(COMMON) + COMMON 0x00800140 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + 0x00800140 __brkval + 0x00800142 __flp + 0x00800144 PROVIDE (__bss_end, .) + 0x00000dc4 __data_load_start = LOADADDR (.data) + 0x00000e02 __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x00800144 0x0 + 0x00800144 PROVIDE (__noinit_start, .) + *(.noinit*) + 0x00800144 PROVIDE (__noinit_end, .) + 0x00800144 _end = . + 0x00800144 PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab 0x00000000 0xd2c + *(.stab) + .stab 0x00000000 0x6cc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + .stab 0x000006cc 0x90 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strupr.o) + 0x9c (size before relaxing) + .stab 0x0000075c 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen_P.o) + 0xa8 (size before relaxing) + .stab 0x000007f8 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(strnlen.o) + 0xa8 (size before relaxing) + .stab 0x00000894 0x498 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(ultoa_invert.o) + 0x4a4 (size before relaxing) + +.stabstr 0x00000000 0x209 + *(.stabstr) + .stabstr 0x00000000 0x209 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35/crtm32u2.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x00000000 0x2f + *(.comment) + .comment 0x00000000 0x2f led.o + 0x30 (size before relaxing) + .comment 0x00000000 0x30 Mainboard.o + .comment 0x00000000 0x30 rs232.o + .comment 0x00000000 0x30 usb.o + .comment 0x00000000 0x30 usb_user.o + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges 0x00000000 0x208 + *(.debug_aranges) + .debug_aranges + 0x00000000 0x38 led.o + .debug_aranges + 0x00000038 0x28 Mainboard.o + .debug_aranges + 0x00000060 0x30 rs232.o + .debug_aranges + 0x00000090 0x48 usb.o + .debug_aranges + 0x000000d8 0x90 usb_user.o + .debug_aranges + 0x00000168 0x28 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_aranges + 0x00000190 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_aranges + 0x000001b0 0x18 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .debug_aranges + 0x000001c8 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_aranges + 0x000001e8 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x00000000 0x226a + *(.debug_info) + .debug_info 0x00000000 0x294 led.o + .debug_info 0x00000294 0x237 Mainboard.o + .debug_info 0x000004cb 0x232 rs232.o + .debug_info 0x000006fd 0x481 usb.o + .debug_info 0x00000b7e 0xaa8 usb_user.o + .debug_info 0x00001626 0x23d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_info 0x00001863 0x1fc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_info 0x00001a5f 0x14e c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .debug_info 0x00001bad 0x549 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_info 0x000020f6 0x174 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + *(.gnu.linkonce.wi.*) + +.debug_abbrev 0x00000000 0xe59 + *(.debug_abbrev) + .debug_abbrev 0x00000000 0x112 led.o + .debug_abbrev 0x00000112 0x14b Mainboard.o + .debug_abbrev 0x0000025d 0x181 rs232.o + .debug_abbrev 0x000003de 0x1fb usb.o + .debug_abbrev 0x000005d9 0x2c6 usb_user.o + .debug_abbrev 0x0000089f 0xf9 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_abbrev 0x00000998 0x139 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_abbrev 0x00000ad1 0xc1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .debug_abbrev 0x00000b92 0x1d6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_abbrev 0x00000d68 0xf1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_line 0x00000000 0x11b9 + *(.debug_line) + .debug_line 0x00000000 0x150 led.o + .debug_line 0x00000150 0x1ba Mainboard.o + .debug_line 0x0000030a 0x107 rs232.o + .debug_line 0x00000411 0x164 usb.o + .debug_line 0x00000575 0x499 usb_user.o + .debug_line 0x00000a0e 0x1c8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_line 0x00000bd6 0x14a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_line 0x00000d20 0xc1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + .debug_line 0x00000de1 0x2fe c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_line 0x000010df 0xda c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_frame 0x00000000 0x540 + *(.debug_frame) + .debug_frame 0x00000000 0xb0 led.o + .debug_frame 0x000000b0 0x34 Mainboard.o + .debug_frame 0x000000e4 0x5c rs232.o + .debug_frame 0x00000140 0x94 usb.o + .debug_frame 0x000001d4 0x254 usb_user.o + .debug_frame 0x00000428 0x68 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_frame 0x00000490 0x2c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_frame 0x000004bc 0x4c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_frame 0x00000508 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_str 0x00000000 0x7d4 + *(.debug_str) + .debug_str 0x00000000 0xb5 led.o + 0xe9 (size before relaxing) + .debug_str 0x000000b5 0x7b Mainboard.o + 0x13a (size before relaxing) + .debug_str 0x00000130 0x5b rs232.o + 0x136 (size before relaxing) + .debug_str 0x0000018b 0x1a2 usb.o + 0x280 (size before relaxing) + .debug_str 0x0000032d 0x218 usb_user.o + 0x450 (size before relaxing) + .debug_str 0x00000545 0xcd c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + 0x167 (size before relaxing) + .debug_str 0x00000612 0x79 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + 0x12e (size before relaxing) + .debug_str 0x0000068b 0x4b c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(iob.o) + 0xf8 (size before relaxing) + .debug_str 0x000006d6 0xb1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + 0x198 (size before relaxing) + .debug_str 0x00000787 0x4d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + 0xf8 (size before relaxing) + +.debug_loc 0x00000000 0x19f5 + *(.debug_loc) + .debug_loc 0x00000000 0x2a5 led.o + .debug_loc 0x000002a5 0x67 Mainboard.o + .debug_loc 0x0000030c 0xee rs232.o + .debug_loc 0x000003fa 0x1a9 usb.o + .debug_loc 0x000005a3 0x92b usb_user.o + .debug_loc 0x00000ece 0x4f8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_loc 0x000013c6 0x21 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_loc 0x000013e7 0x51b c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_loc 0x00001902 0xf3 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_macinfo + *(.debug_macinfo) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges 0x00000000 0x1a8 + *(.debug_ranges) + .debug_ranges 0x00000000 0x70 led.o + .debug_ranges 0x00000070 0x18 Mainboard.o + .debug_ranges 0x00000088 0x20 rs232.o + .debug_ranges 0x000000a8 0x38 usb.o + .debug_ranges 0x000000e0 0x80 usb_user.o + .debug_ranges 0x00000160 0x18 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(malloc.o) + .debug_ranges 0x00000178 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fprintf.o) + .debug_ranges 0x00000188 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(vfprintf_std.o) + .debug_ranges 0x00000198 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr35\libc.a(fputc.o) + +.debug_macro + *(.debug_macro) +OUTPUT(Mainboard.elf elf32-avr) +LOAD linker stubs diff --git a/Mainboard_/Mainboard/Debug/Mainboard.srec b/Mainboard_/Mainboard/Debug/Mainboard.srec new file mode 100644 index 0000000..c996f62 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Mainboard.srec @@ -0,0 +1,227 @@ +S01100004D61696E626F6172642E7372656386 +S11300000C9469000C9486000C9486000C94860071 +S11300100C9486000C9486000C9486000C94860044 +S11300200C9486000C9486000C9486000C948F0229 +S11300300C94B7020C9486000C9486000C948600F1 +S11300400C9486000C9486000C9486000C94860014 +S11300500C9486000C9486000C9486000C94860004 +S11300600C9486000C9486000C9486000C948600F4 +S11300700C94860012010002FF000010ADDEEEBEFB +S113008000010102030104030904140342006C008B +S11300907500620062004600690073006800000099 +S11300A020034800610063006B00650072002D00AE +S11300B04A0065006F0070006100720064007900FE +S11300C000000E03300030003000300030003100FA +S11300D0000011241FBECFEFD4E0DEBFCDBF11E07E +S11300E0A0E0B1E0E4ECFDE002C005900D92AE3377 +S11300F0B107D9F721E0AEE3B1E001C01D92A43409 +S1130100B207E1F70E949E000C94E0060C940000F4 +S11301108EBD0DB407FC10C090E485B1892785B964 +S11301202FEF31EE84E0215030408040E1F700C0F1 +S113013000000DB407FEF1CF8EB5089586ED84B9A5 +S113014080E185B91DBC83E58CBD8FE39CE90197F3 +S1130150F1F700C000002C9880EC0E9488008FE921 +S11301609FE00197F1F700C000002C9A2C9880ECD6 +S11301700E9488008FE99FE00197F1F700C000001A +S11301802C9A2F9AFFCFCF93C82F8A3019F48DE081 +S11301900E94C300E8ECF0E0908195FFFDCFC0938E +S11301A0CE0080E090E0CF910895CF93DF93CDB758 +S11301B0DEB760970FB6F894DEBF0FBECDBF2CE05C +S11301C0E5E1F1E0DE01119601900D922A95E1F747 +S11301D01D861E861F86188AFC012081233C51F44B +S11301E08181813049F460E1CE0101960E943D0293 +S11301F081E003C080E001C080E060960FB6F8940F +S1130200DEBF0FBECDBFDF91CF910895CF93DF93B3 +S1130210CDB7DEB7A0970FB6F894DEBF0FBECDBF43 +S11302208130A1F440E2BE016F5F7F4F0E9418024B +S1130230882361F018A2CE0101960E94BB0640E219 +S1130240BE016F5F7F4F82E80E946002A0960FB6E6 +S1130250F894DEBF0FBECDBFDF91CF9108952F92EA +S11302603F924F925F927F928F929F92AF92CF92E2 +S1130270DF92EF92FF920F931F93CF93DF93282F78 +S113028090E06CE070E00E947105FC01EB5DFE4FB4 +S1130290822F90E06CE070E00E947105895D9E4FB2 +S11302A041E00F2EF9EECF2ED12CF02D0F2EFBEEC8 +S11302B0EF2EF12CF02DAA24A3940CEE10E06DEE99 +S11302C070E00F2EF0EF4F2E512CF02D68949924EE +S11302D092F8812C6894772474F8DF0120812F3FF1 +S11302E059F1E6014883E701A8822081E8012883C7 +S11302F01C019C0121503109E9012881203841F079 +S1130300203441F0203241F0203141F4372D07C030 +S113031030E405C030E303C030E201C0382DE10110 +S11303202881232BEB0128832C9120FF03C0D201C9 +S11303301C9202C0E20198824F5F339603964530C7 +S113034061F6EAEEF0E08EE180831082DF91CF91D6 +S11303501F910F91FF90EF90DF90CF90AF909F90FF +S11303608F907F905F904F903F902F900895E8EE8C +S1130370F0E080818570E9F30895AF92BF92CF9247 +S1130380DF92EF92FF920F931F93CF93DF93D82EB8 +S1130390D62FC72FE42FF0E02E173F0710F4C22EFC +S11303A001C0C42E0E94B7010D2F1C2F6894AA24EB +S11303B0A4F80F2EF8EEEF2EF12CF02D0F2EFEEFF9 +S11303C0BF2EF02DC1EFD0E02C2D80E18C1508F468 +S11303D02A2D2223D9F0F801922FDD2011F08081FB +S11303E001C084918883915031969111F6CF622F88 +S11303F0615070E06F5F7F4F060F171FC21AF7013D +S1130400B082C11007C0203129F007C0F701B082C3 +S1130410CC2019F00E94B701D7CFDF91CF911F9163 +S11304200F91FF90EF90DF90CF90BF90AF90089521 +S11304308093E9009091F200941708F4492F442323 +S1130440D1F0362FE62FF72FA1EFB0E09C919193D6 +S11304509E2F931B9417D0F39091F20091110BC02F +S113046021E030E002C0220F331F8A95E2F7EAEE62 +S1130470F0E020831082842F08956623E9F010921F +S1130480E900E8EEF0E0208120FFFDCF2091F200AA +S1130490211114C0282FE82FF92FA1EFB0E081918A +S11304A08C938E2F821B8617D0F3E8EEF0E08081C8 +S11304B08E7F808381E0089580E0089580E0089530 +S11304C0CF93DF93442329F18093E900E8EEF0E031 +S11304D0808180FFFDCF8091F20081111CC0962F96 +S11304E0E62FF72FA8EEB0E0C1EFD0E08C9185FFA6 +S11304F002C08081888331968E2F891B8417B0F3C4 +S1130500E8EEF0E080818E7F80838FE7808381E056 +S113051003C080E001C080E0DF91CF9108951F9275 +S11305200F920FB60F9211248F93EF93FF93E1EE86 +S1130530F0E08081108283FF12C01092E90081E014 +S11305408093EB001092EC0082E18093ED0088E050 +S11305508093F00010923E018FEF80930E01FF9183 +S1130560EF918F910F900FBE0F901F9018951F92CF +S11305700F920FB60F9211243F924F925F926F9297 +S11305807F928F929F92AF92BF92CF92DF92EF921F +S1130590FF920F931F932F933F934F935F936F9308 +S11305A07F938F939F93AF93BF93EF93FF93CF93D7 +S11305B0DF93CDB7DEB72A97DEBFCDBF8091F400BD +S11305C080FF58C21092E9008091E80083FF1FC2A7 +S11305D0E1EFF0E08081898380818A83208130E0AB +S11305E03C832B834081942F80E0822B932B9C832C +S11305F08B83208130E03E832D834081942F80E0E3 +S1130600822B932B9E838D83208130E038872F8328 +S11306104081942F80E0822B932B98878F8382EFE5 +S11306208093E8008A81863009F030C18B819C81F7 +S1130630811523E0920709F4FDC048F4811551E0C7 +S1130640950789F08115924009F01CC126C08230BB +S1130650B3E09B0709F402C108F4F6C08330934069 +S113066009F010C105C1E4E7F0E044912F81388519 +S1130670BF0180E00E94BD010CC29A2F50815F3FF0 +S113068009F49B2F490F815033968111F6CF2F5FC8 +S11306903F4F2230310539F410C020E030E040E013 +S11306A014E0A1E0B0E0C9016CE070E00E947105C3 +S11306B0FC01EB5DFE4F812FE0CF842F880F880F64 +S11306C0880F841B0F2EFBE1EF2EF02DE80E8E2DEC +S11306D090E00E948305082F192F89E0D8018C939C +S11306E082E011968C9311971296EC9212971396BE +S11306F01C92139714968C93149781E015968C93FF +S1130700159716961C92169780EC17968C9317974C +S11307108AEF18968C93F80139961A86198644E064 +S1130720A12C88248394F82C9A2C0F2EF9E07F2E88 +S1130730F02DBB24BA940F2EF7E0CF2EF02D0F2E00 +S1130740F5E0DF2EF02D6894662461F80F2EF3E0B7 +S11307505F2EF02D56C07F2DDC012C912F3F09F424 +S1130760792D670F515003965111F5CF7082418353 +S1130770428213826483B5821682B78210863996C8 +S11307806623C1F1832F932D6CE070E00E94710504 +S11307909C012A5D3E4F482CC901B9016150710981 +S11307A0DB015C915F3F01F1C082D182652F6795C7 +S11307B06627679564296283513441F0503441F0CF +S11307C0513841F0503841F4562D07C05F2D05C013 +S11307D05F2D03C0562D01C0552D5383DC018C9130 +S11307E0848315821682379643942D5F3F4FB5E07C +S11307F04B12D2CFA985BA851196BA87A9871297C9 +S113080071F04984342D3A84842D932D6CE070E08A +S11308100E9471058B5D9E4F542F6A2D9CCF2F81B2 +S113082038854E2DB80181E00E94BD01C8010E94A7 +S11308301E062FC1E6E8F0E044912F813885BF0100 +S113084080E00E94BD0125C1EAE8F0E044912F81D7 +S11308503885BF0180E00E94BD011BC1E0EAF0E0E1 +S113086044912F813885BF0180E00E94BD0111C1F0 +S1130870E2ECF0E044912F813885BF0180E00E94D2 +S1130880BD0107C181E28093EB0003C1853071F49F +S11308908EEF8093E800E8EEF0E0808180FFFDCFEA +S11308A08B819C8180688093E300F3C08930C1F41C +S11308B09981911160C08B819C81019769F481E0D9 +S11308C080933E018EEF8093E80010920E01809198 +S11308D00E010E942F01DDC081E28093EB00D9C09C +S11308E0883089F49981903809F057C0E8EEF0E037 +S11308F0808180FFFDCF80913E018093F1008EEFD7 +S11309008093E800C6C081111CC0E8EEF0E080814D +S113091080FFFDCF8981823859F48D81E9EEF0E0C2 +S113092080838091EB0085FB882780F9108201C0C9 +S113093080E0E1EFF0E0808310828EEF8093E800A6 +S1130940A8C08B30C1F48981803211F0811155C067 +S11309508D819E818230910550F480930E018EEF3B +S11309608093E80080910E010E942F0192C081E2E1 +S11309708093EB008EC08A3081F489818038E9F558 +S1130980E8EEF0E0808180FFFDCF80910E0180933E +S1130990F1008EEF8093E8007CC0813011F0833049 +S11309A061F58981823049F58B819C81892B29F5F8 +S11309B08D819E818F779927382F31503430E8F418 +S11309C03EEF3093E8008093E9002A81233021F43C +S11309D081E28093EB005DC099E19093EB0021E00C +S11309E030E0F90102C0EE0FFF1F8A95E2F7CF0154 +S11309F0EAEEF0E0808310824CC0CE0101960E94A2 +S1130A00D500811146C081E28093EB0042C081E2AF +S1130A108093EB002FC0F22E408150E0022E02C0E2 +S1130A20559547950A94E2F740FF1BC0DB012C93D0 +S1130A30D6018C9182FF13C08091F200882341F08B +S1130A406091F20070E0822F0E940601F092E900AA +S1130A50E8EEF0E089EF80838FE780831AC0D80145 +S1130A609C932F5F3F4F25303105A9F681E2809397 +S1130A70EB000FC021E030E0E4EFF0E069EE70E05D +S1130A800F2EF8EECF2ED12CF02D0BEE10E091E2CC +S1130A90C2CF2A960FB6F894DEBF0FBECDBFDF914A +S1130AA0CF91FF91EF91BF91AF919F918F917F91E2 +S1130AB06F915F914F913F912F911F910F91FF90F3 +S1130AC0EF90DF90CF90BF90AF909F908F907F90EA +S1130AD06F905F904F903F900F900FBE0F901F90BC +S1130AE018955527002480FF02C0060E571F660F75 +S1130AF0771F6115710521F096958795009799F7F1 +S1130B00952F802D08950F931F93CF93DF938230F9 +S1130B10910510F482E090E0E0914201F0914301EC +S1130B2020E030E0C0E0D0E023C04081518148178C +S1130B305907A8F04817590761F4828193812097D7 +S1130B4019F09B838A832EC09093430180934201C2 +S1130B5029C02115310529F04217530710F0A901C6 +S1130B6002C0BE01DF0102811381EF019A01F80185 +S1130B703097D9F62115310509F1281B390B24309A +S1130B80310590F412968D919C911397611571051E +S1130B9021F0FB019383828304C0909343018093EB +S1130BA04201FD01329644C0FD01E20FF31F81931F +S1130BB09193225031092D933C933AC020914001E6 +S1130BC030914101232B41F4209111013091120104 +S1130BD0309341012093400120910F013091100185 +S1130BE02115310541F42DB73EB7409113015091C1 +S1130BF01401241B350BE0914001F0914101E217EF +S1130C00F307A0F42E1B3F0B2817390778F0AC012B +S1130C104E5F5F4F2417350748F04E0F5F1F509308 +S1130C204101409340018193919302C0E0E0F0E0E0 +S1130C30CF01DF91CF911F910F910895EF92FF9211 +S1130C400F931F93CF93DF93009709F48FC0DC01B8 +S1130C50129713961C921E921297E0904201F09004 +S1130C604301E114F10489F42D913C911197280F6B +S1130C70391F80914001909141018217930789F5B2 +S1130C80B0934101A093400171C0E70120E030E03E +S1130C9001C0EA01CA17DB0738F44A815B819E016F +S1130CA041155105B1F722C0BC0162507109FB0125 +S1130CB0D383C28300811181AC01400F511F4C17B3 +S1130CC05D0761F448815981400F511F4E5F5F4FAA +S1130CD0518340834A815B815383428321153105CB +S1130CE029F4B0934301A093420140C0F901B383B6 +S1130CF0A283E90169917991C60FD71FAC17BD078B +S1130D0079F4DC015E914E91460F571F4E5F5F4FA1 +S1130D105183408312968D919C9113979383828380 +S1130D20A0E0B0E002C0D7017C01F7018281938189 +S1130D300097C9F7C701029620813181820F931F62 +S1130D4020914001309141012817390779F4109717 +S1130D5029F4109243011092420104C013961C928C +S1130D601E921297F0924101E0924001CDB7DEB796 +S1130D70E6E00C94D106DC016C9161566A3108F00E +S1130D80605E6F5B6D93C1F708952A88398848883F +S1130D905F846E847D848C849B84AA84B984C88493 +S1130DA0DF80EE80FD800C811B81AA81B981CE0F8A +S1130DB0D11D0FB6F894DEBF0FBECDBFED0108956F +S1070DC0F894FFCFD1 +S1130DC40000000200000000C30000000000FF0057 +S1130DD4004401200056657273696F6E20312E3011 +S1130DE40000000000802002812002FF2002FF2076 +S1110DF402C12002FF2002FF2002FF200200A5 +S9030000FC diff --git a/Mainboard_/Mainboard/Debug/Makefile b/Mainboard_/Mainboard/Debug/Makefile new file mode 100644 index 0000000..853cef5 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/Makefile @@ -0,0 +1,154 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +SHELL := cmd.exe +RM := rm -rf + +USER_OBJS := + +LIBS := +PROJ := + +O_SRCS := +C_SRCS := +S_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +PREPROCESSING_SRCS := +OBJS := +OBJS_AS_ARGS := +C_DEPS := +C_DEPS_AS_ARGS := +EXECUTABLES := +OUTPUT_FILE_PATH := +OUTPUT_FILE_PATH_AS_ARGS := +AVR_APP_PATH :=$$$AVR_APP_PATH$$$ +QUOTE := " +ADDITIONAL_DEPENDENCIES:= +OUTPUT_FILE_DEP:= +LIB_DEP:= + +# Every subdirectory with source files must be described here +SUBDIRS := + + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../led.c \ +../Mainboard.c \ +../rs232.c \ +../usb.c \ +../usb_user.c + + +PREPROCESSING_SRCS += + + +ASM_SRCS += + + +OBJS += \ +led.o \ +Mainboard.o \ +rs232.o \ +usb.o \ +usb_user.o + + +OBJS_AS_ARGS += \ +led.o \ +Mainboard.o \ +rs232.o \ +usb.o \ +usb_user.o + + +C_DEPS += \ +led.d \ +Mainboard.d \ +rs232.d \ +usb.d \ +usb_user.d + + +C_DEPS_AS_ARGS += \ +led.d \ +Mainboard.d \ +rs232.d \ +usb.d \ +usb_user.d + + +OUTPUT_FILE_PATH +=Mainboard.elf + +OUTPUT_FILE_PATH_AS_ARGS +=Mainboard.elf + +ADDITIONAL_DEPENDENCIES:= + +OUTPUT_FILE_DEP:= ./makedep.mk + +LIB_DEP+= + +# AVR32/GNU C Compiler + + + + + + + + + + + +./%.o: .././%.c + @echo Building file: $< + @echo Invoking: AVR/GNU C Compiler : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega32u2 -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" + @echo Finished building: $< + + + +# AVR32/GNU Preprocessing Assembler + + + +# AVR32/GNU Assembler + + + + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) + +$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) + @echo Building target: $@ + @echo Invoking: AVR/GNU Linker : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Mainboard.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega32u2 + @echo Finished building target: $@ + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "Mainboard.elf" "Mainboard.hex" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "Mainboard.elf" "Mainboard.eep" || exit 0 + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "Mainboard.elf" > "Mainboard.lss" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "Mainboard.elf" "Mainboard.srec" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-size.exe" "Mainboard.elf" + + + + + + +# Other Targets +clean: + -$(RM) $(OBJS_AS_ARGS)$(C_DEPS_AS_ARGS) $(EXECUTABLES) + rm -rf "Mainboard.elf" "Mainboard.a" "Mainboard.hex" "Mainboard.lss" "Mainboard.eep" "Mainboard.map" "Mainboard.srec" + \ No newline at end of file diff --git a/Mainboard/Mainboard/Debug/led.d b/Mainboard_/Mainboard/Debug/led.d similarity index 100% rename from Mainboard/Mainboard/Debug/led.d rename to Mainboard_/Mainboard/Debug/led.d diff --git a/Mainboard_/Mainboard/Debug/makedep.mk b/Mainboard_/Mainboard/Debug/makedep.mk new file mode 100644 index 0000000..0492e81 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/makedep.mk @@ -0,0 +1,14 @@ +################################################################################ +# Automatically-generated file. Do not edit or delete the file +################################################################################ + +led.c + +Mainboard.c + +rs232.c + +usb.c + +usb_user.c + diff --git a/Mainboard_/Mainboard/Debug/rs232.d b/Mainboard_/Mainboard/Debug/rs232.d new file mode 100644 index 0000000..37c4dcc --- /dev/null +++ b/Mainboard_/Mainboard/Debug/rs232.d @@ -0,0 +1,66 @@ +rs232.d rs232.o: .././rs232.c .././config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h \ + .././rs232.h + +.././config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h: + +.././rs232.h: diff --git a/Mainboard_/Mainboard/Debug/usb.d b/Mainboard_/Mainboard/Debug/usb.d new file mode 100644 index 0000000..2faead5 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/usb.d @@ -0,0 +1,74 @@ +usb.d usb.o: .././usb.c .././config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h \ + .././usb_user_config.h .././usb_user.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h \ + .././usb.h + +.././config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h: + +.././usb_user_config.h: + +.././usb_user.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h: + +.././usb.h: diff --git a/Mainboard_/Mainboard/Debug/usb_user.d b/Mainboard_/Mainboard/Debug/usb_user.d new file mode 100644 index 0000000..f914295 --- /dev/null +++ b/Mainboard_/Mainboard/Debug/usb_user.d @@ -0,0 +1,70 @@ +usb_user.d usb_user.o: .././usb_user.c \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdlib.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h \ + .././usb_user_config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + .././config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h \ + .././usb_user.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdlib.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdbool.h: + +.././usb_user_config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +.././config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom32u2.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/string.h: + +.././usb_user.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/pgmspace.h: diff --git a/Mainboard_/Mainboard/Mainboard.c b/Mainboard_/Mainboard/Mainboard.c new file mode 100644 index 0000000..3ca18ff --- /dev/null +++ b/Mainboard_/Mainboard/Mainboard.c @@ -0,0 +1,126 @@ +/* + * Mainboard.c + * + * Created: 06.10.2013 19:12:35 + * Author: netz + */ + +#define F_CPU 16000000 +//#define F_CPU 8000000 +//#define F_CPU 2000000 + +#include +#include + +//#include "config.h" +//#include +//#include "led.h" +//#include "rs232.h" +//#include "usb.h" + +/*void wait_for_usb() { + while(true) { + if(usb_getstatus() == USB_STATUS_DISCONNECTED) { + led(YELLOW); + if(!(PINC & (1<= 29) { + text[29] = 13; + text[30] = 10; + text[31] = 0; + } else { + text[l] = 13; + text[l+1] = 10; + text[l+2] = 0; + } + led(MAGENTA); + rs232_send(text); + if(usb_getstatus() == USB_STATUS_CONFIGURED && usb_ready()) { + usb_send(text); + } + led(GREEN); +} + +void resi(char * text) { + _delay_ms(10); + send("Nachricht bekommen!"); + //send(text); + led(RED); + _delay_ms(2000); +}*/ + +uint8_t spi_putc( uint8_t data ) { + SPDR = data; + + while(!(SPSR & (1< + + + 2.0 + 6.1 + com.Atmel.AVRGCC8.C + {839c4697-ab18-4132-8e80-f57ddb26adeb} + ATmega32U2 + none + Executable + C + $(MSBuildProjectName) + .elf + $(MSBuildProjectDirectory)\$(Configuration) + Mainboard + Mainboard + Mainboard + Native + true + false + exception_table + 0 + true + 0x20000000 + true + + 0 + + + + + + + + + + + + ISP + com.atmel.avrdbg.tool.ispmk2 + + com.atmel.avrdbg.tool.ispmk2 + AVRISP mkII + 0000000000000 + + 127.0.0.1 + 63239 + False + + + ISP + + 249000 + 1000000 + 150000 + false + false + 0 + 0 + 0 + 0 + + + + + + + + True + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + + + libm + + + + + + + + + True + True + True + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + Default (-Wa,-g) + + + + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + + \ No newline at end of file diff --git a/Mainboard_/Mainboard/UserDevice.hex b/Mainboard_/Mainboard/UserDevice.hex new file mode 100644 index 0000000..676fded --- /dev/null +++ b/Mainboard_/Mainboard/UserDevice.hex @@ -0,0 +1,184 @@ +:100000000C9486000C94A3000C94A3000C94A30001 +:100010000C94A3000C94A3000C94A3000C94A300D4 +:100020000C94A3000C94A3000C94DC010C94FD012F +:100030000C94A3000C94A3000C94A3000C94A300B4 +:100040000C94A3000C94A3000C94A3000C94A300A4 +:100050000C94A3000C94A3000C94A3000C94A30094 +:100060000C94A3000C94A3000C94A3000C94A30084 +:100070000C94A3000C94A3000C94A3000C94A30074 +:100080000C94A3000C94A3000C94A3000C94A30064 +:100090000C94A3000C94A3000C94A3000C94A30054 +:1000A0000C94A3000C94A3000C94A3001201000272 +:1000B000FF00001001000100000101020301040320 +:1000C0000904240352006500750073006300680092 +:1000D000200045006C0065006B00740072006F002A +:1000E0006E0069006B00000022035500730065007C +:1000F000720020004400650076006900630065001E +:100100002000440065006D006F00000011241FBE38 +:10011000CFEFDAE0DEBFCDBF11E0A0E0B1E0E0E478 +:10012000FBE002C005900D92A832B107D9F711E0AB +:10013000A8E2B1E001C01D92AD32B107E1F70E9423 +:10014000DC030C949E050C94000081E08093D700A2 +:1001500080EA8093D80082E189BD09B400FEFDCF1A +:1001600080E98093D8001092E0001092280188E086 +:100170008093E2000895E0E0F1E091E051E044E096 +:1001800020812F3F09F19093E9005093EB002093D9 +:10019000EC008181803811F480E40BC0803411F4CC +:1001A00080E307C0803229F0803111F080E001C087 +:1001B00080E13281382B3093ED0020FF03C0109294 +:1001C000F00002C04093F0009F5F33969730C1F675 +:1001D0008EE78093EA001092EA0008958091D9009A +:1001E00080FD02C080E008958091E30087FD02C099 +:1001F00081E0089580912801882311F083E008951B +:1002000082E008958091280108958091E80085702A +:10021000E1F30895E42FF0E02E173F0708F4422F92 +:10022000262F372F7EEF9091E8009570E1F3942F01 +:10023000413108F090E1F901592F09C0882311F0EC +:10024000608101C064916093F10051503196552353 +:10025000A9F7290F311D491B7093E800442319F7B2 +:10026000903109F308958093E90021E030E002C065 +:10027000220F331F8A95E2F7EAEEF0E02083108226 +:1002800008958093E9009091F3008091F200392F56 +:1002900020E0280F311DC90108958093E900909155 +:1002A000F300E091F200392F20E0D901AE0FB11D2B +:1002B000FD01242F352FE217F30708F49F012115C4 +:1002C000310519F140E050E09091F100FB01E40F9D +:1002D000F51F90834F5F5F4F42175307A8F360915C +:1002E000F3009091F200562F40E0490F511D411547 +:1002F000510559F441E050E002C0440F551F8A9562 +:10030000E2F74093EA001092EA00C90108956623DB +:1003100009F11092E9002091E80020FFFCCF5091F4 +:10032000F3004091F200352F20E0240F311D2115FC +:10033000310581F4FC0180E004C091919093F100BB +:100340008F5F8617D0F38091E8008E7F8093E8005E +:1003500081E0089580E008954115510559F1809399 +:10036000E9008091E80080FFFCCF3091F3002091FC +:10037000F200932F80E0820F911D0097D9F480E066 +:1003800090E00BC02091E80025FF06C0FB01E80FBC +:10039000F91F20812093F10001968417950790F3AF +:1003A0008091E8008E7F8093E8008FE78093E800DB +:1003B00081E0089580E008951F920F920FB60F928A +:1003C00011248F938091E1001092E10083FF0FC010 +:1003D0001092E90081E08093EB001092EC0082E142 +:1003E0008093ED0088E08093F000109228018F91B7 +:1003F0000F900FBE0F901F9018951F920F920FB67F +:100400000F921124DF92EF92FF920F931F932F937D +:100410003F934F935F936F937F938F939F93AF938C +:10042000BF93EF93FF93DF93CF93CDB7DEB72997B9 +:10043000DEBFCDBF8091F40080FF66C11092E9005D +:100440008091E80083FF5DC15091F1005983409194 +:10045000F1004A838091F1009091F100392F20E062 +:1004600090E0822B932B9C838B836091F1007091A1 +:10047000F100372F20E070E0622B732B7E836D83B9 +:100480002091F1003091F100F32FE0E030E02E2BCD +:100490003F2B38872F83E2EFE093E800463009F0E6 +:1004A000BAC043E08030940709F4A3C063E0813010 +:1004B000960750F471E08030970789F0A2E0803011 +:1004C0009A0709F05BC110C0B3E081309B0709F4C3 +:1004D00098C0E3E082309E0709F050C197C06CEAF3 +:1004E00070E0FB01449189C030E0E32E31E0F32E4F +:1004F000F701DD2480E090819F3F09F081E0D80E74 +:10050000339621E0E231F207A9F747E0D49E402D6F +:1005100011244E5E842F90E049870E9440048C0194 +:1005200089E0D8018C9392E011969C9311974985AC +:1005300012964C93129713961C92139791E014966F +:100540009C93149715969C93159716961C92169744 +:1005500090E817969C93179799E118969C93189793 +:10056000F801399619968C93199784E08183128249 +:100570001382D4828FEF8583168287831086DD20D5 +:1005800071F1F801729691E057E035E0D7018C9156 +:100590008F3FF1F050833183282F2795222727950D +:1005A000292B2283813441F0803431F0813831F0BD +:1005B000803821F083E003C081E001C082E08383C2 +:1005C000D70111968C9111978483158216823796E4 +:1005D0009F5F63E070E0E60EF71E9730B9F62F815B +:1005E000388581E0B8010E940A01C8010E94E20436 +:1005F000C8C06EEB70E0FB01449180E00E940A01EC +:10060000C0C062EC70E0FB014491F7CF68EE70E08F +:10061000FB014491F2CF453059F42EEF2093E800CE +:100620002091E80020FFFCCF80688093E300A9C000 +:10063000493081F4552309F05CC08130910509F0FF +:100640009DC081E0809328018EEF8093E8000E9496 +:10065000BB0097C0483061F4503809F04AC080911F +:10066000E80080FFFCCF809128018093F1001BC03F +:100670004423D9F48091E80080FFFCCF523811F078 +:1006800080E00DC06093E9008091EB0090E025E0F0 +:10069000969587952A95E1F781701092E9008093ED +:1006A000F1001092F1008EEF61C0413011F0433043 +:1006B00001F55230F1F40097E1F46F77862F815005 +:1006C0008630B8F48EEF8093E8006093E900433001 +:1006D00009F454C089E18093EB0081E090E002C00E +:1006E000880F991F6A95E2F78093EA001092EA005A +:1006F00048C0CE0101960E940D04882309F041C034 +:100700003DC081E28093EB0080E090E041E2082F61 +:100710000F5F2091F400019630E0082E02C035955D +:1007200027950A94E2F720FF26C00093E900209164 +:10073000E80022FF1EC03091F3002091F200932FB9 +:1007400080E0820F911D009769F09091F3008091F5 +:10075000F200792F60E0680F711D802F0E94E00386 +:100760000093E90089EF8093E8008FE78093E80029 +:1007700008C04093EB008630910549F681E28093F2 +:10078000EB002996DEBFCDBFCF91DF91FF91EF91B6 +:10079000BF91AF919F918F917F916F915F914F9199 +:1007A0003F912F911F910F91FF90EF90DF900F904D +:1007B0000FBE0F901F9018950E94A5007894FFCF50 +:1007C0000F931F93DF93CF93CDB7DEB7A0970FB6EC +:1007D000F894DEBF0FBECDBF8130A1F48E010F5F54 +:1007E0001F4FB80140E250E00E944D01882351F0B4 +:1007F00018A2C8010E94790582E8B80140E250E0E1 +:100800000E94AC01A0960FB6F894DEBF0FBECDBF1C +:10081000CF91DF911F910F910895DF93CF93CDB7C3 +:10082000DEB760970FB6F894DEBF0FBECDBFAC0148 +:100830009E012F5F3F4FA2E1B1E09CE00D90F901D6 +:1008400001929F019150D1F71D861E861F86188A3E +:10085000FA018081833C51F48181813039F4CE01E9 +:10086000019660E10E94870181E001C080E060960E +:100870000FB6F894DEBF0FBECDBFCF91DF910895C4 +:10088000EF92FF920F931F93CF93DF9382309105E6 +:1008900010F482E090E0C0912B01D0912C0120E077 +:1008A00030E040E050E029C068817981681779071D +:1008B000D8F06817790779F48A819B812115310571 +:1008C00021F0F9019383828304C090932C018093DB +:1008D0002B01DE012AC04115510519F06417750777 +:1008E00018F4FE01AB01D9019E017A816B81E72EDC +:1008F000E7017E01062FF62EE7012097A9F64115A4 +:100900005105F9F0481B590B4430510580F48281A0 +:100910009381109729F013969C938E93129704C09D +:1009200090932C0180932B01DF01129645C0DF01CB +:10093000A40FB51F8D939D93425050405183408327 +:100940003BC02091290130912A012115310541F444 +:10095000209124013091250130932A01209329010F +:1009600020912601309127012115310541F42DB741 +:100970003EB74091220150912301241B350BA091D9 +:100980002901B0912A01A217B307A0F42A1B3B0B3F +:100990002817390778F0AC014E5F5F4F24173507F1 +:1009A00048F04A0F5B1F50932A01409329018D9311 +:1009B0009D9302C0A0E0B0E0CD01CDB7DEB7E6E088 +:1009C0000C948F05CF93DF93009709F48FC0FC013F +:1009D00032971382128260912B0170912C01611564 +:1009E000710581F420813181280F391F80912901FF +:1009F00090912A018217930761F5F0932A01E09301 +:100A0000290174C0EB0180E090E0CE17DF0740F4CD +:100A10002A813B81CE012115310501F1E901F5CF94 +:100A2000D383C283DF014D915D919D01240F351F5A +:100A3000C217D30761F428813981240F351F2E5F37 +:100A40003F4F318320832A813B8133832283009768 +:100A500029F4F0932C01E0932B0148C0DC0113969C +:100A6000FC93EE931297EC0149915991C40FD51F55 +:100A7000EC17FD0779F420813181240F351F2E5F9B +:100A80003F4F11963C932E932281338113963C93D2 +:100A90002E931297E0E0F0E0DB0112968D919C918D +:100AA0001397009721F0E62FF72FBC01F5CF9B019C +:100AB0002E5F3F4FDB018D919C911197820F931F09 +:100AC0004091290150912A014817590779F430972C +:100AD00029F410922C0110922B0102C01382128271 +:100AE0002250304030932A0120932901DF91CF9189 +:100AF0000895DC016C9161566A3108F0605E6F5BAD +:100B00006D93C1F708952A88398848885F846E8478 +:100B10007D848C849B84AA84B984C884DF80EE8021 +:100B2000FD800C811B81AA81B981CE0FD11D0FB62A +:100B3000F894DEBF0FBECDBFED010895F894FFCF4E +:100B4000802002812002FF2002FF2002FF2002FFFE +:100B5000200256657273696F6E20312E30000000DE +:080B6000000020002D0100003F +:00000001FF diff --git a/Mainboard_/Mainboard/config.h b/Mainboard_/Mainboard/config.h new file mode 100644 index 0000000..0c79d07 --- /dev/null +++ b/Mainboard_/Mainboard/config.h @@ -0,0 +1,22 @@ +/* + * config.h + * + * Created: 06.10.2013 17:05:43 + * Author: netz + */ + + +#ifndef CONFIG_H_ +#define CONFIG_H_ + + +#define F_CPU 16000000 +#define BAUD_RATE 9600 + +#include +#include +#include +#include + + +#endif /* CONFIG_H_ */ \ No newline at end of file diff --git a/Mainboard_/Mainboard/led.c b/Mainboard_/Mainboard/led.c new file mode 100644 index 0000000..50dba5f --- /dev/null +++ b/Mainboard_/Mainboard/led.c @@ -0,0 +1,49 @@ +/* + * led.c + * + * Created: 06.10.2013 16:32:15 + * Author: netz + */ + +#include +#include "led.h" + +void led(int mask) { + int rgb = 0; + rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); + rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); + rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); + + PORTB &= ~((1< +#include +#include "rs232.h" + +int uart_putchar(char c, FILE *stream); +static FILE rs232 = FDEV_SETUP_STREAM(uart_putchar, NULL, _FDEV_SETUP_WRITE); + + +int uart_putchar(char c, FILE *stream) +{ + if (c == '\n') { + uart_putchar('\r', stream); //Warten solange bis Zeichen gesendet wurde + } + loop_until_bit_is_set(UCSR1A, UDRE1); //Ausgabe des Zeichens + UDR1 = c; + return (0); +} + +void init_rs232() +{ + UCSR1C = (1 << UCSZ11) |(1 << UCSZ10); //8N1 + UCSR1B |= /*(1< + +#ifndef RS232_H_ +#define RS232_H_ + +void init_rs232(); +void rs232_send(char * text); + +#endif /* RS232_H_ */ \ No newline at end of file diff --git a/Mainboard_/Mainboard/usb.c b/Mainboard_/Mainboard/usb.c new file mode 100644 index 0000000..32792ec --- /dev/null +++ b/Mainboard_/Mainboard/usb.c @@ -0,0 +1,81 @@ +/* + * usb.c + * + * Created: 06.10.2013 21:42:35 + * Author: netz + */ + +#include "config.h" +#include +#include +#include +#include "usb_user_config.h" // USB configuration +#include "usb_user.h" // USB functions +#include "usb.h" + +#ifdef USERDEFCONTROLS // see usbconfig.h +//----------------------------------------------------------------------------- +// Handle user defined control requests +// "ucr" contains the data of the control request +// function has to return "true", if request is handled (otherwise "false") +bool usb_controlrequest(struct usb_control_request *ucr) { + #define USER_REQUESTTYPE 0xC3 // a user defined request type (means, no standard request) + #define USER_REQUESTVERSION 0x01 // a self defined request: get version info + bool Result; + const char VersionInfo[ENDPOINT0_SIZE] = {"Version 1.0"}; + + Result=false; + if (ucr->bmRequestType == USER_REQUESTTYPE) { + // handle the requests (only one defined in this example) + switch (ucr->bRequest) { + case USER_REQUESTVERSION: // request for version info) + usb_txdata_control((uint8_t *)VersionInfo,sizeof(VersionInfo)); + Result=true; + break; + } + } + return Result; // true means, request is handled +} +#endif + +//----------------------------------------------------------------------------- +// handle of endpoint interrupt for incoming data +// "datasize" contains the number of bytes in the USB FIFO buffer +void usb_ep(uint8_t endpoint, uint16_t datasize) { + #define RXENDPOINT 0x01 // endpoint, used for data transfer host->device (defined in "usb_user_config.h") + #define TXENDPOINT 0x82 // endpoint, used for data transfer device->host + #define BUFSIZE 32 // USB FIFO buffer size (see usb_user_config.h at "endpoints") + + char buf[BUFSIZE]; // buffer for received data from host and data to transmit to host + uint8_t n; + + if (endpoint == RXENDPOINT) { // data from host by our defined data receive endpoint + n=usb_rxdata(endpoint, (uint8_t *)buf, sizeof(buf)); // read data into buffer + if (n) { // data read into local buffer + buf[BUFSIZE-1]=0; // for security: terminate string + //resi(buf); + strupr(buf); // upper case string + // response to host with converted string + usb_txdata(TXENDPOINT, (uint8_t *)buf, sizeof(buf)); // transfer data to host*/ + } + } +} + +void init_usb() { + usb_init(); +} + +void usb_send(char* text) { + #define RXENDPOINT 0x01 + #define TXENDPOINT 0x82 + #define ITENDPOINT 0x83 + usb_txdata(TXENDPOINT, (uint8_t *)text, strlen(text)); +} + +uint8_t usb_getstatus() { + return usb_status(); +} + +uint8_t usb_ready() { + return usb_is_ready(); +} \ No newline at end of file diff --git a/Mainboard_/Mainboard/usb.h b/Mainboard_/Mainboard/usb.h new file mode 100644 index 0000000..c1b357f --- /dev/null +++ b/Mainboard_/Mainboard/usb.h @@ -0,0 +1,21 @@ +/* + * usb.h + * + * Created: 06.10.2013 21:42:01 + * Author: netz + */ + + +#ifndef USB_H_ +#define USB_H_ + +#include "usb_user.h" + + +void init_usb(); +void usb_send(char * text); +uint8_t usb_getstatus(); +uint8_t usb_ready(); +void resi(char * text); + +#endif /* USB_H_ */ \ No newline at end of file diff --git a/Mainboard_/Mainboard/usb_user.c b/Mainboard_/Mainboard/usb_user.c new file mode 100644 index 0000000..adf7226 --- /dev/null +++ b/Mainboard_/Mainboard/usb_user.c @@ -0,0 +1,687 @@ +/***************************************************************************** + +USB-Template: User defined USB device +V1.1.1 + +(c) 2010-2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Supported devices: +- AT90USB82, AT90USB162 +- ATMEGA8U2, ATMEGA16U2, ATMEGA32U2 +- ATMEGA8U4, ATMEGA16U4, ATMEGA32U4 +- AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 + +Supported modules: +- U2DIL-AT90USB162 +- U2DIL-ATMEGA32U2 +- U4DIL-ATMEGA32U4 +- U6DIL-AT90USB1286 + +USB Function Implementation + +Created: 2010-01-07 +Changed: 2011-08-02 + +*****************************************************************************/ + +// Usually no changes are necessary in this file! + +#include +#include +#include "usb_user_config.h" +#include "usb_user.h" + +//----------------------------------------------------------------------------- +// Internal Variables +//----------------------------------------------------------------------------- + +// USB State +static volatile uint8_t usb_stat = USB_STATUS_DISCONNECTED; + +// USB configuration, selected by host (0=none) +// In this version only 0 or 1 is possible (support of only one configuration) +static volatile uint8_t usb_conf = 0; + +// USB interface, selected by host +// In this version the value 0 and optional more cfgs are possible (see usbconfig.h) +#if (NUMINTERFACES>1) +static volatile uint8_t usb_if = 0xFF; // 0xFF: no interface selected +#endif + +//----------------------------------------------------------------------------- +// Descriptors +//----------------------------------------------------------------------------- + +// configuration descriptor +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t wTotalLength; + uint8_t bNumInterfaces; + uint8_t bConfigurationValue; + uint8_t iConfiguration; + uint8_t bmAttributes; + uint8_t bMaxPower; +} cfg_desc; + +// interface descriptor +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bInterfaceNumber; + uint8_t bAlternateSetting; + uint8_t bNumEndpoints; + uint8_t bInterfaceClass; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; + uint8_t iInterface; +} if_desc; + +// endpoint descriptor +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bEndpointAddress; + uint8_t bmAttributes; + uint16_t wMaxPacketSize; + uint8_t bInterval; +} ep_desc; + +//----------------------------------------------------------------------------- +// USB Initializing +//----------------------------------------------------------------------------- + +#if defined (__AVR_AT90USB1286__) || (__AVR_AT90USB1287__) +#define AT128X +#endif + +void usb_init(void) +{ + #ifdef MEGA4 + UHWCON = _BV(UVREGE); // enable PAD regulator + #endif + #ifdef MEGA6 + UHWCON = _BV(UIMOD)|_BV(UVREGE); // set device mode, enable PAD regulator + #endif + USBCON = _BV(USBE) | _BV(FRZCLK); // enable USB + #if (F_CPU==16000000) + // 16MHz + #ifdef MEGA2 + PLLCSR = _BV(PLLE) | _BV(PLLP0); // config PLL, 16 MHz xtal + #endif + #ifdef MEGA4 + PLLCSR = _BV(PINDIV) | _BV(PLLE); // config PLL, 16 MHz xtal + #endif + + #ifdef MEGA6 + #ifdef AT128X + PLLCSR = _BV(PLLP2) | _BV(PLLP0) | _BV(PLLE); // config PLL, 16 MHz xtal (AT90USB128x) + #else + PLLCSR = _BV(PLLP2) | _BV(PLLP1) | _BV(PLLE); // config PLL, 16 MHz xtal (AT90USB64x and ATMEGA32U6) + #endif + #endif + + #else + + // 8MHz + #ifdef MEGA6 + PLLCSR = _BV(PLLP1) | _BV(PLLP0) |_BV(PLLE); // config PLL, 8 MHz xtal + #else + PLLCSR = _BV(PLLE); // config PLL, 8 MHz xtal + #endif + + #endif + + while (!(PLLCSR & _BV(PLOCK))) ; // wait for PLL lock + #ifdef MEGA4_6 + USBCON = _BV(USBE)|_BV(OTGPADE); // start USB clock + #else + USBCON = _BV(USBE); // start USB clock + #endif + UDCON = 0; // enable attach resistor + usb_conf = 0; + #if (NUMINTERFACES>1) + usb_if = 0xFF; + #endif + #ifdef MEGA2 + // port for VBUS detection + VBUSDIR &= ~_BV(VBUSPIN); // port as input + #endif + UDIEN = _BV(EORSTE); // enable "end of reset" interrupt +} + +//----------------------------------------------------------------------------- +// Initializing Endpoints +//----------------------------------------------------------------------------- + +#if (NUMINTERFACES>1) +void usb_endpoints(uint8_t ifnumber) // with interface number +#else +void usb_endpoints(void) +#endif +{ + #if (NUMINTERFACES>1) + #define EPC EP_CONFIG[ifnumber][i] + #define IN_TRANSFER EP_CONFIG[ifnumber][i].ep_type & 0x01 + #else + #define EPC EP_CONFIG[i] + #define IN_TRANSFER EP_CONFIG[i].ep_type & 0x01 + #endif + uint8_t i; + + for (i=0; i1) +uint8_t usb_interface(void) +{ + return usb_if; +} +#endif + +//----------------------------------------------------------------------------- +// Internal used USB routines and macros +//----------------------------------------------------------------------------- + +#define USB_SEND_IN UEINTX = ~(1<maxsize) len=maxsize; + do { + usb_wait_in(); + if (i & _BV(RXOUTI)) return; // cancel + // send IN package + n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; + for (i = n; i; i--) + UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); + len -= n; + USB_SEND_IN; + } while (len || n == ENDPOINT0_SIZE); +} + +//----------------------------------------------------------------------------- +// Free FIFO Buffer +//----------------------------------------------------------------------------- + +void usb_freebuffer(uint8_t endpoint) +{ + UENUM = endpoint; // select endpoint + UERST = _BV(endpoint); // endpoint FIFO reset + UERST = 0; +} + +//----------------------------------------------------------------------------- +// Data Check (Host to Device) +//----------------------------------------------------------------------------- + +#ifdef MEGA4_6 +uint16_t usb_rxavail(uint8_t endpoint) +#else +uint8_t usb_rxavail(uint8_t endpoint) +#endif +{ + UENUM = endpoint; // select endpoint + #ifdef MEGA4_6 + return ((uint16_t)(UEBCHX)<<8)+UEBCLX; + #else + return UEBCLX; + #endif +} + +//----------------------------------------------------------------------------- +// Data Receive (Host to Device) +//----------------------------------------------------------------------------- + +#ifdef MEGA4_6 +uint16_t usb_rxdata(uint8_t endpoint, uint8_t *buffer, uint16_t maxdatasize) +#else +uint8_t usb_rxdata(uint8_t endpoint, uint8_t *buffer, uint8_t maxdatasize) +#endif +{ + #ifdef MEGA4_6 + uint16_t r, i; + #else + uint8_t r, i; + #endif + + UENUM = endpoint; // select endpoint + #ifdef MEGA4_6 + r = ((uint16_t)(UEBCHX)<<8)+UEBCLX; + #else + r = UEBCLX; + #endif + if (r>maxdatasize) r = maxdatasize; + if (r) { // data available in input endpoint + for (i=0; i1) + usb_if = 0xFF; + #endif + } +} + +//----------------------------------------------------------------------------- +// Endpoint Interrupts +//----------------------------------------------------------------------------- +// Interrupts, triggered by incoming data in an endpoint, are handled here. + +ISR(USB_COM_vect) +{ + #if (NUMINTERFACES>1) + #define EPCO EP_CONFIG[j][i] + #else + #define EPCO EP_CONFIG[i] + #endif + + uint8_t intbits; + uint8_t i, j, n, s; + cfg_desc *cfg; + if_desc *ifp; + ep_desc *epp; + #if (USESN==2) // serial number in RAM + struct usb_string_descriptor_ram buf; + #endif + struct usb_control_request ucr; + + if (UEINT & 0x01) { + // handle interrupts of endpoint 0 (control transfers) + UENUM = 0; + intbits = UEINTX; // save interrupt flags of the endpoint + if (intbits & _BV(RXSTPI)) { // control transfer, setup + ucr.bmRequestType = UEDATX; + ucr.bRequest = UEDATX; + ucr.wValue = UEDATX; + ucr.wValue |= (UEDATX << 8); + ucr.wIndex = UEDATX; + ucr.wIndex |= (UEDATX << 8); + ucr.wLength = UEDATX; + ucr.wLength |= (UEDATX << 8); + UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); + if (ucr.bRequest == GET_DESCRIPTOR) { + switch (ucr.wValue) { + case 0x0100: // device descriptor + usb_desc_out(false,&device_descriptor[0],pgm_read_byte(&device_descriptor[0]),ucr.wLength); + break; + case 0x0200: // configuration descriptor + // get number of activated endpoints + n=0; + #if (NUMINTERFACES>1) + for (j=0; jbLength = sizeof(cfg_desc); + cfg->bDescriptorType = 2; + cfg->wTotalLength = s; + cfg->bNumInterfaces = NUMINTERFACES; + cfg->bConfigurationValue = 1; + cfg->iConfiguration = 0; + cfg->bmAttributes = POWERING; + cfg->bMaxPower = MAXPOWER>>1; + // initialize interface descriptor + ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); + #if (NUMINTERFACES>1) + for (j=0; jbLength = sizeof(if_desc); + ifp->bDescriptorType = 4; + ifp->bInterfaceNumber = j; + ifp->bAlternateSetting = 0; + ifp->bNumEndpoints = n; + ifp->bInterfaceClass = 0xFF; + ifp->bInterfaceSubClass = 0x00; + ifp->bInterfaceProtocol = 0xFF; + ifp->iInterface = 0; + epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); + if (n) { // endpoints + for (i=0; ibLength = sizeof(ep_desc); + epp->bDescriptorType = 5; + epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); + epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); + epp->wMaxPacketSize = EPCO.ep_size; + epp->bInterval = 0; + epp = (ep_desc *)((uint16_t)(epp)+sizeof(ep_desc)); + } + } + } + #if (NUMINTERFACES>1) + ifp = (if_desc *)epp; + } + #endif + // finally + usb_desc_out(true,(uint8_t *)cfg,s,ucr.wLength); + free(cfg); + break; + case 0x0300: // String 0 + usb_desc_out(false,(uint8_t *)&string0.bLength,pgm_read_byte(&string0.bLength),ucr.wLength); + break; + case 0x0301: // String 1 + usb_desc_out(false,(uint8_t *)&string1.bLength,pgm_read_byte(&string1.bLength),ucr.wLength); + break; + case 0x0302: // String 2 + usb_desc_out(false,(uint8_t *)&string2.bLength,pgm_read_byte(&string2.bLength),ucr.wLength); + break; + #if (USESN>0) + case 0x0303: // String 3, serial number + #if (USESN==1) // Seriennummer im Flash + usb_desc_out(false,(uint8_t *)&string3.bLength,pgm_read_byte(&string3.bLength),ucr.wLength); + #endif + #if (USESN==2) // serial number in the RAM + buf.bDescriptorType=3; // has to be 3 always + i = 0; + while (RAMSN[i]) { + buf.wString[i] = RAMSN[i]; + i++; + } + buf.bLength=2*i+2; // total length of the data set + usb_desc_out(true,(uint8_t *)&buf,buf.bLength,ucr.wLength); + #endif + break; + #endif + default: + STALL; // stall + } + return; + } + if (ucr.bRequest == SET_ADDRESS) { + USB_SEND_IN; + usb_wait_in_ready(); + UDADDR = ucr.wValue | _BV(ADDEN); + return; + } + if (ucr.bRequest == SET_CONFIGURATION && ucr.bmRequestType == 0) { // another configuration will be chosen + if (ucr.wValue==1) { // configuration 1 will be chosen + usb_conf = ucr.wValue; + USB_SEND_IN; + #if (NUMINTERFACES==1) + usb_endpoints(); // initialize endpoints + #else + usb_if = 0; // select interface 0 + usb_endpoints(usb_if); // initialize endpoints + #endif + } else { // other configurations are not supported in this version + STALL; // stall + } + return; + } + if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { + usb_wait_in_ready(); + UEDATX = usb_conf; + USB_SEND_IN; + return; + } + if (ucr.bRequest == GET_STATUS) { + usb_wait_in_ready(); + i = 0; + #ifdef SUPPORT_ENDPOINT_HALT + if (ucr.bmRequestType == 0x82) { + UENUM = ucr.wIndex; + if (UECONX & _BV(STALLRQ)) i = 1; + UENUM = 0; + } + #endif + UEDATX = i; + UEDATX = 0; + USB_SEND_IN; + return; + } + #if (NUMINTERFACES>1) + if (ucr.bRequest == SET_INTERFACE && (ucr.bmRequestType == 0x20 || ucr.bmRequestType == 0)) { // another interface will be chosen + if (ucr.wIndex= 1 && i <= MAX_ENDPOINT) { + USB_SEND_IN; + UENUM = i; + if (ucr.bRequest == SET_FEATURE) { + UECONX = _BV(STALLRQ)|_BV(EPEN); + } else { + UECONX = _BV(STALLRQC)|_BV(RSTDT)|_BV(EPEN); + UERST = _BV(i); + UERST = 0; + } + return; + } + } + #endif + #ifdef USERDEFCONTROLS + // handle user defined control requests + if (!usb_controlrequest(&ucr)) + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + return; + #endif + } + UECONX = _BV(STALLRQ) | _BV(EPEN); // stall + } + + // handle interrupts for further endpoints + for (i=1; i<=MAX_ENDPOINT; i++) { + if (UEINT & _BV(i)) { + UENUM=i; // select endpoint + intbits = UEINTX; // save interrupt bits of the endpoint + if (intbits & _BV(RXOUTI)) { // interrupt occured by incoming data + #ifdef MEGA4_6 + if (((uint16_t)(UEBCHX)<<8)+UEBCLX) { // data available in input endpoint + usb_ep(i,((uint16_t)(UEBCHX)<<8)+UEBCLX); + #else + if (UEBCLX) { // data available in input endpoint + usb_ep(i,UEBCLX); + #endif + UENUM=i; // reselect endpoint (if changed by handling routine) + } + UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags + UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! + return; + } + STALL; // stall + } + } + STALL; // stall +} diff --git a/Mainboard_/Mainboard/usb_user.h b/Mainboard_/Mainboard/usb_user.h new file mode 100644 index 0000000..825c725 --- /dev/null +++ b/Mainboard_/Mainboard/usb_user.h @@ -0,0 +1,254 @@ +/***************************************************************************** + +USB-Template: User defined USB device +V1.1.0 + +(c) 2010-2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Supported devices: +- AT90USB82, AT90USB162 +- ATMEGA8U2, ATMEGA16U2, ATMEGA32U2 +- ATMEGA8U4, ATMEGA16U4, ATMEGA32U4 +- AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 + +Supported modules: +- U2DIL-AT90USB162 +- U2DIL-ATMEGA32U2 +- U4DIL-ATMEGA32U4 +- U6DIL-AT90USB1286 + +USB Header File + +Created: 2010-01-07 +Changed: 2011-03-12 + +*****************************************************************************/ + +// Usually no changes are necessary in this file! + +#ifndef usb_h__ +#define usb_h__ + +#include +#include +#include +#include "usb_user_config.h" + +//----------------------------------------------------------------------------- +// USB Strings +//----------------------------------------------------------------------------- + +struct usb_string_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + int16_t wString[]; +}; + +static const struct usb_string_descriptor PROGMEM string0 = { + 4, + 3, + {0x0409} +}; + +static const struct usb_string_descriptor PROGMEM string1 = { + sizeof(STR_MANUFACTURER), + 3, + STR_MANUFACTURER +}; + +static const struct usb_string_descriptor PROGMEM string2 = { + sizeof(STR_PRODUCT), + 3, + STR_PRODUCT +}; + +#if (USESN==1) +static const struct usb_string_descriptor PROGMEM string3 = { + sizeof(STR_SERIAL_NUMBER), + 3, + STR_SERIAL_NUMBER +}; +#endif + +#if (USESN==2) +// Your USB serial numebr in RAM. Must be set into RAMSN before calling usb_init! +// Descriptor size, descriptor ID and conversion into widechars wil be done automatically. + +#define RAMSNLEN 16 // maximum length of the serial number + +struct usb_string_descriptor_ram { + uint8_t bLength; + uint8_t bDescriptorType; + int16_t wString[RAMSNLEN]; +}; + +char RAMSN[RAMSNLEN]; // save the S/N as string here (e.g. read from EEPROM) +#endif + +//----------------------------------------------------------------------------- +// Endpoints +//----------------------------------------------------------------------------- + +// buffer sizes of an endpoint +// Hint: For 64 byte and more only two endpoints must be activated! +#define EP_SIZE(s) ((s) == 512 ? 0x60 : \ + ((s) == 256 ? 0x50 : \ + ((s) == 128 ? 0x40 : \ + ((s) == 64 ? 0x30 : \ + ((s) == 32 ? 0x20 : \ + ((s) == 16 ? 0x10 : \ + 0x00)))))) + +// endpoint attributes +#define EP_TRANSFER(t) ((t) == EP_TYPE_ISOCHRONOUS_IN ? 1 : \ + ((t) == EP_TYPE_ISOCHRONOUS_OUT ? 1 : \ + ((t) == EP_TYPE_BULK_IN ? 2 : \ + ((t) == EP_TYPE_BULK_OUT ? 2 : \ + 3)))) + +//----------------------------------------------------------------------------- +// Device Descriptor +//----------------------------------------------------------------------------- + +#define LSB(n) (n & 255) +#define MSB(n) ((n >> 8) & 255) + +static const uint8_t PROGMEM device_descriptor[] = { + 18, // bLength + 1, // bDescriptorType + 0x00, 0x02, // bcdUSB + USBDEVICECLASS, // bDeviceClass + 0, // bDeviceSubClass + 0, // bDeviceProtocol + ENDPOINT0_SIZE, // bMaxPacketSize0 + LSB(VENDOR_ID), MSB(VENDOR_ID), // idVendor + LSB(PRODUCT_ID), MSB(PRODUCT_ID), // idProduct + 0x00, 0x01, // bcdDevice + 1, // iManufacturer + 2, // iProduct + 3, // iSerialNumber + 1 // bNumConfigurations +}; + +//----------------------------------------------------------------------------- +// Standard Commands for Control Transfers +//----------------------------------------------------------------------------- + +#define GET_STATUS 0 +#define CLEAR_FEATURE 1 +#define SET_FEATURE 3 +#define SET_ADDRESS 5 +#define GET_DESCRIPTOR 6 +#define GET_CONFIGURATION 8 +#define SET_CONFIGURATION 9 +#define GET_INTERFACE 10 +#define SET_INTERFACE 11 + +//============================================================================= +// USB Functions +//============================================================================= + +//----------------------------------------------------------------------------- +// USB Initializing +//----------------------------------------------------------------------------- +// Has to be called one time before any USB actions. +// Interrupts has to be enabled (call of sei macro) + +void usb_init(void); + +//----------------------------------------------------------------------------- +// USB State +//----------------------------------------------------------------------------- +// Request of the USB state. +// State is determined with function call. +// Hint: For AT90USB82/162 and ATMEGAxxU2 without VBUSDETECT option, state will +// not change, if USB connector will be unplugged! +// Possible return values: +#define USB_STATUS_DISCONNECTED 0 // not connected (for self powered devices) +#define USB_STATUS_CONNECTED 1 // connected (for AT90USB82/162 and ATMEGAxxU2 only with option VBUSDETECT) +#define USB_STATUS_ENUMERATED 2 // USB address assigned (USB connection established) +#define USB_STATUS_CONFIGURED 3 // a valid configuration were selected (USB device usable) + +uint8_t usb_status(void); + +//----------------------------------------------------------------------------- +// USB Configuration +//----------------------------------------------------------------------------- +// Returns the configuration number, set by the host +// If the value is 0, no configuration were selected by the host. No endpoint +// (except ep0 for control transfers) can be used in this case. + +uint8_t usb_configuration(void); + +//----------------------------------------------------------------------------- +// USB Interface +//----------------------------------------------------------------------------- +// Returns the number of the interface, selected by the host. + +uint8_t usb_interface(void); + +//----------------------------------------------------------------------------- +// Data Check (Host to Device) +//----------------------------------------------------------------------------- +// This function returns the number of data bytes, contained in the FIFO +// input buffer, for the specified endpoint. + +#ifdef MEGA4_6 +uint16_t usb_rxavail(uint8_t endpoint); +#else +uint8_t usb_rxavail(uint8_t endpoint); +#endif + +//----------------------------------------------------------------------------- +// Data Receive (Host to Device) +//----------------------------------------------------------------------------- +// "endpoint" has to specify an "OUT" endpoint (1..4 or 1..6)! +// Data will be stored into "buffer". +// Returns number of bytes, transfered into buffer +#ifdef MEGA4_6 +uint16_t usb_rxdata(uint8_t endpoint, uint8_t *buffer, uint16_t maxdatasize); +#else +uint8_t usb_rxdata(uint8_t endpoint, uint8_t *buffer, uint8_t maxdatasize); +#endif + +//----------------------------------------------------------------------------- +// Data Return (Device to Host), Control Transfer +//----------------------------------------------------------------------------- +// Data return for control transfers (endpoint 0) +// "datasize" not greater than size of FIFO buffer (no check!) +// Result is always "true", if no connection to host. +// When a connection is established, result is "false", if data block, +// stored before, is not read from the FIFO buffer. + +bool usb_txdata_control(uint8_t *buffer, uint8_t datasize); + +//----------------------------------------------------------------------------- +// Data Return (Device to Host) +//----------------------------------------------------------------------------- +// "endpoint" must specify a valid endpoint number (1..4 or 1..6)! +// "datasize" not greater than size of FIFO buffer (no check!) +// Result is always "true", if no connection to host. +// When a connection is established, result is "false", if data block, +// stored before, is not read from the FIFO buffer. + +#ifdef MEGA4_6 +bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint16_t datasize); +#else +bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint8_t datasize); +#endif + +//----------------------------------------------------------------------------- +// Free FIFO Buffer +//----------------------------------------------------------------------------- +// Free the FIFO buffer for one endpoint +// Data contained in the buffer will be lost. +// Endpoint usable for new data transfer. +// It is not necessary, to call this routine after read of buffer data with +// read routine. Routine can be used to clear buffer before writing new data. + +void usb_freebuffer(uint8_t endpoint); + +uint8_t usb_is_ready(); + +#endif diff --git a/Mainboard_/Mainboard/usb_user_config.h b/Mainboard_/Mainboard/usb_user_config.h new file mode 100644 index 0000000..0243824 --- /dev/null +++ b/Mainboard_/Mainboard/usb_user_config.h @@ -0,0 +1,244 @@ +/***************************************************************************** + +USB-Template: User defined USB device +V1.1.0 + +(c) 2010-2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Supported devices: +- AT90USB82, AT90USB162 +- ATMEGA8U2, ATMEGA16U2, ATMEGA32U2 +- ATMEGA8U4, ATMEGA16U4, ATMEGA32U4 +- AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 + +Supported modules: +- U2DIL-AT90USB162 +- U2DIL-ATMEGA32U2 +- U4DIL-ATMEGA32U4 +- U6DIL-AT90USB1286 + +USB Configuration + +Created: 2010-01-07 +Changed: 2011-03-12 + +*****************************************************************************/ + +// in this file you will make changes for your purposes + +#ifndef usbconfig_h__ +#define usbconfig_h__ + +#if defined (__AVR_AT90USB82__) || (__AVR_AT90USB162__) || (__AVR_ATmega8U2__) || (__AVR_ATmega32U2__) +#define MEGA2 // AT90USB82/162, ATMEGAxxU2 +#endif +#if defined (__AVR_ATmega16U4__) || (__AVR_ATmega32U4__) +#define MEGA4 // ATMEGAxxU4 +#define MEGA4_6 +#endif +#if defined (__AVR_AT90USB646__) || (__AVR_AT90USB647__) || (__AVR_AT90USB1286__) || (__AVR_AT90USB1287__) +#define MEGA6 // AT90USB646, -647, -1286, -1287 +#define MEGA4_6 +#endif + +#include +#include +#include "config.h" + +#if (F_CPU==8000000) +#define FREQ_OK +#endif +#if (F_CPU==16000000) +#define FREQ_OK +#endif +#ifndef FREQ_OK +#error "Invalid clock frequency (only 8 or 16MHz)!" +#endif + +//----------------------------------------------------------------------------- +// General USB commitments +//----------------------------------------------------------------------------- + +// Vendor Name +// will be a part of the descriptor and can be requested by the host +#define STR_MANUFACTURER L"BlubbFish" + +// Product Name +// will be a part of the descriptor and can be requested by the host +#define STR_PRODUCT L"Hacker-Jeopardy" + +// USB Serial Number (optional) +// will be a part of the descriptor and can be requested by the host +#define USESN 1 // Options: 0= no S/N; 1= S/N inside the flash memory; 2= S/N inside RAM +#if (USESN==1) +#define STR_SERIAL_NUMBER L"000001" // your serial number, stored in flash memory +#endif + +// Vendor ID +// set your vendor ID here +#define VENDOR_ID 0xDEAD // !!! THIS ID IS NOT FOR OFFICIAL USE, FOR YOUR PERSONAL TESTING PURPOSES ONLY !!! + +// Product ID +// set your product ID here +#define PRODUCT_ID 0xBEEE // !!! THIS ID IS NOT FOR OFFICIAL USE, FOR YOUR PERSONAL TESTING PURPOSES ONLY !!! + +// USB device class +// possible settings: +#define USBDEVICECLASS_USER 0xFF // user defined class +// set the class for your purposes +#define USBDEVICECLASS USBDEVICECLASS_USER + +// power supply +#define SELFPOWERED 0x40 +#define BUSPOWERED 0x80 +#define POWERING SELFPOWERED | BUSPOWERED // Alternatives: SELFPOWERED or SELFPOWERED | BUSPOWERED + +// current consumption +// in mA (milliamperes), uses only even values between 2 and 500 +#define MAXPOWER 500 + +#ifdef MEGA2 +// The controllers AT90USB82/162 and ATMEGAxxU2 are not able, to detect a +// plugged USB connector (presence of VBUS voltage). As alternative an input +// port, which is connected with the 5V line of the USB connector, can be +// used. A pull down resistor at the input port is recommended. +// Uncomment the following line, if a port pin is used for this purpose. +//#define VBUSDETECT +#define VBUSDIR DDRC // Data Direction Register of the used port +#define VBUSPORT PINC // used port +#define VBUSPIN PC4 // used pin (PC4 as example) +#endif + +//----------------------------------------------------------------------------- +// Data Set for a USB Control Request +//----------------------------------------------------------------------------- + +// Nothing to change here! + +struct usb_control_request { + uint8_t bmRequestType; + uint8_t bRequest; + uint16_t wValue; + uint16_t wIndex; + uint16_t wLength; +}; + +//----------------------------------------------------------------------------- +// Endpoints +//----------------------------------------------------------------------------- + +// maximum number of endpoints (don't change!) +#ifdef MEGA4_6 +#define MAX_ENDPOINT 6 +#else +#define MAX_ENDPOINT 4 +#endif + +// Constants for endpoint configuration (don't change!) +#define EP_TYPE_DISABLED 0xFF // endpoint not used +#define EP_TYPE_CONTROL 0x00 +#define EP_TYPE_BULK_IN 0x81 +#define EP_TYPE_BULK_OUT 0x80 +#define EP_TYPE_INTERRUPT_IN 0xC1 +#define EP_TYPE_INTERRUPT_OUT 0xC0 +#define EP_TYPE_ISOCHRONOUS_IN 0x41 +#define EP_TYPE_ISOCHRONOUS_OUT 0x40 +#define EP_SINGLE_BUFFER 0x02 +#define EP_DOUBLE_BUFFER 0x06 + +// Endpoint 0 +// (for Control Transfers, must be defined always) +#define ENDPOINT0_SIZE 16 // control endpoint +// uncomment the following line to handle user defined control request +// of endpoint 0 in the main program +#define USERDEFCONTROLS // we will use self defined control transfers in this example +#ifdef USERDEFCONTROLS +// function prototype to handle user defined control requests. +// Function has to return "true", if request is handled. +// If result is "false", a "stall" will be returned to host. +bool usb_controlrequest(struct usb_control_request *ucr); +#endif + +typedef struct { + uint8_t ep_type; // transfer + uint8_t ep_size; // buffer size + uint8_t ep_buffer; // buffer configuration +} ep_config; + +// configuration of the endpoints +// EP_TYPE constant, buffer size (8, 16, 32 or 64 byte), single or double buffer + +// Hint: Use only two endpoints, if buffer size is 64 byte! + +// Additional hints, if more than one USB interfaces are defined: +// - after configuration change (only configuration 1 is possible), +// interface 0 will be selected +// - to chose another interface, the control request command SET_INTERFACE +// with the request type 0x20 has to be executed + +#define NUMINTERFACES 2 // number of supported interfaces (1...3) (Endpoint configurations) + +#if (NUMINTERFACES>1) +static const ep_config EP_CONFIG[NUMINTERFACES][MAX_ENDPOINT] = {{ +#else +static const ep_config EP_CONFIG[MAX_ENDPOINT] = { +#endif + // modify the following lines for your purposes + {EP_TYPE_BULK_OUT, 32, EP_SINGLE_BUFFER}, // one OUT and one IN endpoint with bulk transfer in this example + {EP_TYPE_BULK_IN, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #ifdef MEGA4_6 // the following endpoints are only available on ATMEGAxxU4 and AT90USB64x/128x controllers + , + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #endif + #if (NUMINTERFACES>1) + },{ + // modify the following lines for your purposes + {EP_TYPE_INTERRUPT_IN, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #ifdef MEGA4_6 // the following endpoints are only available on ATMEGAxxU4 and AT90USB64x/128x controllers + , + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #endif + } + // more interfaces... + #if (NUMINTERFACES==3) + ,{ + // modify the following lines for your purposes + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #ifdef MEGA4_6 // the following endpoints are only available on ATMEGAxxU4 and AT90USB64x/128x controllers + , + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER}, + {EP_TYPE_DISABLED, 32, EP_SINGLE_BUFFER} + #endif + } + #endif + #endif +}; + +//----------------------------------------------------------------------------- +// Endpoint Interrupt +//----------------------------------------------------------------------------- +// Function prototype to handle endpoint interrupts for incoming data +// The routine will be a part of the main program + +void usb_ep(uint8_t endpoint, uint16_t datasize); + +//----------------------------------------------------------------------------- +// Functional Purposes +//----------------------------------------------------------------------------- + +// "Endpoint Halt" option +// Comment the following to save code memory. But USB conformity is lost. +#define SUPPORT_ENDPOINT_HALT + +#endif diff --git a/Mainboard_/Windows/UnitMain.cpp b/Mainboard_/Windows/UnitMain.cpp new file mode 100644 index 0000000..73574b4 --- /dev/null +++ b/Mainboard_/Windows/UnitMain.cpp @@ -0,0 +1,167 @@ +/***************************************************************************** + +USB-Example: User defined USB device +V1.0.0 + +(c) 2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Main Form + +Borland C++Builder 6 + +Created: 2011-05-30 +Changed: 2011-05-30 + +*****************************************************************************/ + +/* +This example uses the "LibUSB-Win32" library and driver collection, to communicate +with the USB device. +The example shows, how to use control transfers for the own usage. +It defines two additional endpoints for bulk transfer (write and read) of data. +*/ + +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "UnitMain.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TFormMain *FormMain; +//--------------------------------------------------------------------------- + +__fastcall TFormMain::TFormMain(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + +usb_dev_handle * TFormMain::open_dev(void) +// open USB device with defined VID and PID +{ + struct usb_bus *bus; + struct usb_device *dev; + + for (bus = usb_get_busses(); bus; bus = bus->next) { + for (dev = bus->devices; dev; dev = dev->next) { + if ((dev->descriptor.idVendor==MY_VID)&&(dev->descriptor.idProduct==MY_PID)) { + return usb_open(dev); + } + } + } + return NULL; +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::FormCreate(TObject *Sender) +{ + // USB initializations + dev=0; + usb_init(); // initialize the library + usb_find_busses(); // find all busses + usb_find_devices(); // find all connected devices +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + ButtonCloseClick(Sender); + CanClose=true; +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::FormDestroy(TObject *Sender) +{ + // +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::ButtonOpenClick(TObject *Sender) +// open USB device +{ + dev=open_dev(); + if (dev) { + usb_set_configuration(dev, 1); // select 1st USB configuration + StatusBar1->SimpleText="USB device opened"; + } else + StatusBar1->SimpleText="opening failed"; +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::ButtonVersionClick(TObject *Sender) +// user defined control transfer +{ + #define CONTROLBUFSIZE 16 // USB buffer size for control transfers + #define USER_REQUESTTYPE 0xC3 // a user defined request type with response (means, no standard request) + #define USER_REQUESTVERSION 0x01 // a self defined request: get version info + int r; + char buf[CONTROLBUFSIZE]; + AnsiString s; + + if (dev) { + r=usb_control_msg(dev,USER_REQUESTTYPE,USER_REQUESTVERSION,0,1,(char *)(&buf),sizeof(buf),100); + if (r>0) { + s.SetLength(strlen(buf)); + strcpy(s.c_str(),buf); + LabelVersion->Caption=s; + StatusBar1->SimpleText="version info received"; + } + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::ButtonTransferClick(TObject *Sender) +// transfer data to device and receive response +// (bulk transfer via user defined endpoints) +{ + #define BUFSIZE 32 // USB buffer size (= max. data size for one data block) + #define EP_TODEVICE 0x01 // endpoint for data to device (OUT) + #define EP_FROMDEVICE 0x82 // endpoint for data from device (IN) + char buf[BUFSIZE]; + int r; + AnsiString s; + + if (dev) { + strcpy(buf,LabeledEdit1->Text.c_str()); + usb_claim_interface(dev, 0); // select interface 0 + r=usb_bulk_write(dev,EP_TODEVICE,buf,sizeof(buf),100); // output data + if (r>0) { // data was transmitted successfully, now wait for response + Sleep(100); + r=usb_bulk_read(dev,EP_FROMDEVICE,(char *)&buf,sizeof(buf),100); + if (r>0) { // data received from device + s.SetLength(strlen(buf)); + strcpy(s.c_str(),buf); + LabelData->Caption=s; + StatusBar1->SimpleText="data sent and received"; + } else { // error + LabelData->Caption="(no response)"; + StatusBar1->SimpleText="no response from device"; + } + } + usb_release_interface(dev, 0); // close pipe + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::ButtonCloseClick(TObject *Sender) +// close USB device +{ + if (dev) { + usb_close(dev); + dev=NULL; + StatusBar1->SimpleText="USB device closed"; + } +} +//--------------------------------------------------------------------------- + +void __fastcall TFormMain::ButtonExitClick(TObject *Sender) +// exit program +{ + Close(); +} +//--------------------------------------------------------------------------- + diff --git a/Mainboard_/Windows/UnitMain.dfm b/Mainboard_/Windows/UnitMain.dfm new file mode 100644 index 0000000..b622deb --- /dev/null +++ b/Mainboard_/Windows/UnitMain.dfm @@ -0,0 +1,121 @@ +object FormMain: TFormMain + Left = 1154 + Top = 299 + BorderStyle = bsSingle + Caption = 'UxDIL - User Device Demo' + ClientHeight = 276 + ClientWidth = 329 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnDestroy = FormDestroy + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 8 + Top = 152 + Width = 256 + Height = 13 + Caption = 'Received (converted) string from device (bulk transfer)' + end + object LabelData: TLabel + Left = 8 + Top = 168 + Width = 45 + Height = 16 + Caption = '(none)' + Font.Charset = DEFAULT_CHARSET + Font.Color = clHotLight + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + end + object LabelVersion: TLabel + Left = 216 + Top = 48 + Width = 9 + Height = 16 + Caption = '?' + Font.Charset = DEFAULT_CHARSET + Font.Color = clHotLight + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + end + object StatusBar1: TStatusBar + Left = 0 + Top = 257 + Width = 329 + Height = 19 + Panels = <> + SimplePanel = True + SimpleText = '(c) 2011 Reusch Elektronik' + end + object ButtonOpen: TButton + Left = 8 + Top = 8 + Width = 193 + Height = 25 + Caption = '&Open Device' + TabOrder = 1 + OnClick = ButtonOpenClick + end + object ButtonVersion: TButton + Left = 8 + Top = 40 + Width = 193 + Height = 25 + Caption = 'Firmware &Version (control transfer)' + TabOrder = 2 + OnClick = ButtonVersionClick + end + object LabeledEdit1: TLabeledEdit + Left = 8 + Top = 88 + Width = 289 + Height = 21 + EditLabel.Width = 77 + EditLabel.Height = 13 + EditLabel.Caption = 'String for device' + LabelPosition = lpAbove + LabelSpacing = 3 + MaxLength = 31 + TabOrder = 3 + end + object ButtonClose: TButton + Left = 8 + Top = 192 + Width = 193 + Height = 25 + Caption = '&Close Device' + TabOrder = 4 + OnClick = ButtonCloseClick + end + object ButtonExit: TButton + Left = 8 + Top = 224 + Width = 193 + Height = 25 + Caption = 'E&xit' + TabOrder = 5 + OnClick = ButtonExitClick + end + object ButtonTransfer: TButton + Left = 8 + Top = 120 + Width = 193 + Height = 25 + Caption = 'Convert &String (bulk transfer)' + TabOrder = 6 + OnClick = ButtonTransferClick + end +end diff --git a/Mainboard_/Windows/UnitMain.h b/Mainboard_/Windows/UnitMain.h new file mode 100644 index 0000000..a25a1e1 --- /dev/null +++ b/Mainboard_/Windows/UnitMain.h @@ -0,0 +1,64 @@ +/***************************************************************************** + +USB-Example: User defined USB device +V1.0.0 + +(c) 2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Main Form + +Borland C++Builder 6 + +Created: 2011-05-30 +Changed: 2011-05-30 + +*****************************************************************************/ + +//--------------------------------------------------------------------------- + +#ifndef UnitMainH +#define UnitMainH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include "usb.h" + +#define MY_VID 0x0001 // Vendor ID of the device +#define MY_PID 0x0001 // Product ID of the device +//--------------------------------------------------------------------------- +class TFormMain : public TForm +{ +__published: // Von der IDE verwaltete Komponenten + TStatusBar *StatusBar1; + TButton *ButtonOpen; + TButton *ButtonVersion; + TLabeledEdit *LabeledEdit1; + TLabel *Label1; + TLabel *LabelData; + TButton *ButtonClose; + TLabel *LabelVersion; + TButton *ButtonExit; + TButton *ButtonTransfer; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall FormDestroy(TObject *Sender); + void __fastcall ButtonOpenClick(TObject *Sender); + void __fastcall ButtonVersionClick(TObject *Sender); + void __fastcall ButtonCloseClick(TObject *Sender); + void __fastcall ButtonExitClick(TObject *Sender); + void __fastcall ButtonTransferClick(TObject *Sender); +private: // Anwender-Deklarationen + struct usb_dev_handle *dev; + usb_dev_handle *open_dev(void); +public: // Anwender-Deklarationen + __fastcall TFormMain(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TFormMain *FormMain; +//--------------------------------------------------------------------------- +#endif diff --git a/Mainboard_/Windows/UserDevice.bpr b/Mainboard_/Windows/UserDevice.bpr new file mode 100644 index 0000000..9de9b9f --- /dev/null +++ b/Mainboard_/Windows/UserDevice.bpr @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..;UxDIL_Examples\UserDevice;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..;UxDIL_Examples\UserDevice;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/Mainboard_/Windows/UserDevice.cpp b/Mainboard_/Windows/UserDevice.cpp new file mode 100644 index 0000000..b8cde53 --- /dev/null +++ b/Mainboard_/Windows/UserDevice.cpp @@ -0,0 +1,51 @@ +/***************************************************************************** + +USB-Example: User defined USB device +V1.0.0 + +(c) 2011 Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch +Homepage: http://products.reworld.eu/index.htm + +Main program + +Borland C++Builder 6 + +Created: 2011-05-30 +Changed: 2011-05-30 + +*****************************************************************************/ + +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEFORM("UnitMain.cpp", FormMain); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->Title = "User Device Demo"; + Application->CreateForm(__classid(TFormMain), &FormMain); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + catch (...) + { + try + { + throw Exception(""); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/Mainboard_/Windows/UserDevice.exe b/Mainboard_/Windows/UserDevice.exe new file mode 100644 index 0000000..03daadf Binary files /dev/null and b/Mainboard_/Windows/UserDevice.exe differ diff --git a/Mainboard_/Windows/UserDevice.res b/Mainboard_/Windows/UserDevice.res new file mode 100644 index 0000000..60cfdc5 Binary files /dev/null and b/Mainboard_/Windows/UserDevice.res differ diff --git a/Mainboard_/Windows/drivers/User_Device_Demo.cat b/Mainboard_/Windows/drivers/User_Device_Demo.cat new file mode 100644 index 0000000..adfc8cc --- /dev/null +++ b/Mainboard_/Windows/drivers/User_Device_Demo.cat @@ -0,0 +1,3 @@ +This file will contain the digital signature of the files to be installed +on the system. +This file will be provided by Microsoft upon certification of your drivers. \ No newline at end of file diff --git a/Mainboard_/Windows/drivers/User_Device_Demo.inf b/Mainboard_/Windows/drivers/User_Device_Demo.inf new file mode 100644 index 0000000..2d1badd Binary files /dev/null and b/Mainboard_/Windows/drivers/User_Device_Demo.inf differ diff --git a/Mainboard_/Windows/drivers/amd64/install-filter-win.exe b/Mainboard_/Windows/drivers/amd64/install-filter-win.exe new file mode 100644 index 0000000..970bc7c Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/install-filter-win.exe differ diff --git a/Mainboard_/Windows/drivers/amd64/install-filter.exe b/Mainboard_/Windows/drivers/amd64/install-filter.exe new file mode 100644 index 0000000..284e5b7 Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/install-filter.exe differ diff --git a/Mainboard_/Windows/drivers/amd64/libusb0.dll b/Mainboard_/Windows/drivers/amd64/libusb0.dll new file mode 100644 index 0000000..a8eb338 Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/libusb0.dll differ diff --git a/Mainboard_/Windows/drivers/amd64/libusb0.sys b/Mainboard_/Windows/drivers/amd64/libusb0.sys new file mode 100644 index 0000000..50bce8d Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/libusb0.sys differ diff --git a/Mainboard_/Windows/drivers/amd64/testlibusb-win.exe b/Mainboard_/Windows/drivers/amd64/testlibusb-win.exe new file mode 100644 index 0000000..fa052b7 Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/testlibusb-win.exe differ diff --git a/Mainboard_/Windows/drivers/amd64/testlibusb.exe b/Mainboard_/Windows/drivers/amd64/testlibusb.exe new file mode 100644 index 0000000..7ad2364 Binary files /dev/null and b/Mainboard_/Windows/drivers/amd64/testlibusb.exe differ diff --git a/Mainboard_/Windows/drivers/ia64/install-filter-win.exe b/Mainboard_/Windows/drivers/ia64/install-filter-win.exe new file mode 100644 index 0000000..63f3e72 Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/install-filter-win.exe differ diff --git a/Mainboard_/Windows/drivers/ia64/install-filter.exe b/Mainboard_/Windows/drivers/ia64/install-filter.exe new file mode 100644 index 0000000..82ad9fc Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/install-filter.exe differ diff --git a/Mainboard_/Windows/drivers/ia64/libusb0.dll b/Mainboard_/Windows/drivers/ia64/libusb0.dll new file mode 100644 index 0000000..9a28423 Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/libusb0.dll differ diff --git a/Mainboard_/Windows/drivers/ia64/libusb0.sys b/Mainboard_/Windows/drivers/ia64/libusb0.sys new file mode 100644 index 0000000..495d906 Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/libusb0.sys differ diff --git a/Mainboard_/Windows/drivers/ia64/testlibusb-win.exe b/Mainboard_/Windows/drivers/ia64/testlibusb-win.exe new file mode 100644 index 0000000..fbf4500 Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/testlibusb-win.exe differ diff --git a/Mainboard_/Windows/drivers/ia64/testlibusb.exe b/Mainboard_/Windows/drivers/ia64/testlibusb.exe new file mode 100644 index 0000000..3f434ad Binary files /dev/null and b/Mainboard_/Windows/drivers/ia64/testlibusb.exe differ diff --git a/Mainboard_/Windows/drivers/installer_x64.exe b/Mainboard_/Windows/drivers/installer_x64.exe new file mode 100644 index 0000000..a923929 Binary files /dev/null and b/Mainboard_/Windows/drivers/installer_x64.exe differ diff --git a/Mainboard_/Windows/drivers/installer_x86.exe b/Mainboard_/Windows/drivers/installer_x86.exe new file mode 100644 index 0000000..90f5331 Binary files /dev/null and b/Mainboard_/Windows/drivers/installer_x86.exe differ diff --git a/Mainboard_/Windows/drivers/libusb-win32-bin-README.txt b/Mainboard_/Windows/drivers/libusb-win32-bin-README.txt new file mode 100644 index 0000000..3d93c4e --- /dev/null +++ b/Mainboard_/Windows/drivers/libusb-win32-bin-README.txt @@ -0,0 +1,27 @@ +libusb-win32-bin v1.2.4.0 (04/08/2011) - [Package Information] + +ALL ARCHITECTURES: + x86\libusb0_x86.dll: x86 32-bit library. Must be renamed to libusb0.dll + On 64 bit, Installs to Windows\syswow64\libusb0.dll. + On 32 bit, Installs to Windows\system32\libusb0.dll. + + x86\inf-wizard.exe: inf-wizard application with embedded libusb-win32 + v1.2.4.0 binaries. + +X86 ONLY ARCHITECTURES: + x86\libusb0.sys: x86 32-bit driver. + Installs to Windows\system32\drivers\libusb0.sys + +AMD64-INTEL64 ONLY ARCHITECTURES: + amd64\libusb0.sys: x64 64-bit driver. + Installs to Windows\system32\drivers\libusb0.sys + + amd64\libusb0.dll: x64 64-bit library. + Installs to Windows\system32\libusb0.dll + +IA64 ONLY ARCHITECTURES: + ia64\libusb0.sys: IA64 64-bit driver. + Installs to Windows\system32\drivers\libusb0.sys + + ia64\libusb0.dll: IA64 64-bit library. + Installs to Windows\system32\libusb0.dll diff --git a/Mainboard_/Windows/drivers/license/libusb-win32/installer_license.txt b/Mainboard_/Windows/drivers/license/libusb-win32/installer_license.txt new file mode 100644 index 0000000..6128be6 --- /dev/null +++ b/Mainboard_/Windows/drivers/license/libusb-win32/installer_license.txt @@ -0,0 +1,851 @@ +Copyright (c) 2002-2004 Stephan Meyer, +Copyright (c) 2000-2004 Johannes Erdfelt, +Copyright (c) 2000-2004 Thomas Sailer, +Copyright (c) 2010 Travis Robinson, + +This software is distributed under the following licenses: +Driver: GNU General Public License (GPL) +Library, Test Files, Installer: GNU Lesser General Public License (LGPL) + +*********************************************************************** + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + diff --git a/Mainboard_/Windows/drivers/x86/install-filter-win.exe b/Mainboard_/Windows/drivers/x86/install-filter-win.exe new file mode 100644 index 0000000..21b4bfd Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/install-filter-win.exe differ diff --git a/Mainboard_/Windows/drivers/x86/install-filter.exe b/Mainboard_/Windows/drivers/x86/install-filter.exe new file mode 100644 index 0000000..cd99165 Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/install-filter.exe differ diff --git a/Mainboard_/Windows/drivers/x86/libusb0.sys b/Mainboard_/Windows/drivers/x86/libusb0.sys new file mode 100644 index 0000000..bf2e8bf Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/libusb0.sys differ diff --git a/Mainboard_/Windows/drivers/x86/libusb0_x86.dll b/Mainboard_/Windows/drivers/x86/libusb0_x86.dll new file mode 100644 index 0000000..2710e96 Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/libusb0_x86.dll differ diff --git a/Mainboard_/Windows/drivers/x86/testlibusb-win.exe b/Mainboard_/Windows/drivers/x86/testlibusb-win.exe new file mode 100644 index 0000000..8b539c6 Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/testlibusb-win.exe differ diff --git a/Mainboard_/Windows/drivers/x86/testlibusb.exe b/Mainboard_/Windows/drivers/x86/testlibusb.exe new file mode 100644 index 0000000..64296ea Binary files /dev/null and b/Mainboard_/Windows/drivers/x86/testlibusb.exe differ diff --git a/Mainboard_/Windows/libusb.lib b/Mainboard_/Windows/libusb.lib new file mode 100644 index 0000000..64b6b51 Binary files /dev/null and b/Mainboard_/Windows/libusb.lib differ diff --git a/Mainboard_/Windows/usb.h b/Mainboard_/Windows/usb.h new file mode 100644 index 0000000..4f814df --- /dev/null +++ b/Mainboard_/Windows/usb.h @@ -0,0 +1,394 @@ +#ifndef __USB_H__ +#define __USB_H__ + +#include +#include + +/* + * 'interface' is defined somewhere in the Windows header files. This macro + * is deleted here to avoid conflicts and compile errors. + */ + +#ifdef interface +#undef interface +#endif + +/* + * PATH_MAX from limits.h can't be used on Windows if the dll and + * import libraries are build/used by different compilers + */ + +#define LIBUSB_PATH_MAX 512 + + +/* + * USB spec information + * + * This is all stuff grabbed from various USB specs and is pretty much + * not subject to change + */ + +/* + * Device and/or Interface Class codes + */ +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_DATA 10 +#define USB_CLASS_VENDOR_SPEC 0xff + +/* + * Descriptor types + */ +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 + +#define USB_DT_HID 0x21 +#define USB_DT_REPORT 0x22 +#define USB_DT_PHYSICAL 0x23 +#define USB_DT_HUB 0x29 + +/* + * Descriptor sizes per descriptor type + */ +#define USB_DT_DEVICE_SIZE 18 +#define USB_DT_CONFIG_SIZE 9 +#define USB_DT_INTERFACE_SIZE 9 +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ +#define USB_DT_HUB_NONVAR_SIZE 7 + + +/* ensure byte-packed structures */ +#include + + +/* All standard descriptors have these 2 fields in common */ +struct usb_descriptor_header { + unsigned char bLength; + unsigned char bDescriptorType; +}; + +/* String descriptor */ +struct usb_string_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wData[1]; +}; + +/* HID descriptor */ +struct usb_hid_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short bcdHID; + unsigned char bCountryCode; + unsigned char bNumDescriptors; +}; + +/* Endpoint descriptor */ +#define USB_MAXENDPOINTS 32 +struct usb_endpoint_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bEndpointAddress; + unsigned char bmAttributes; + unsigned short wMaxPacketSize; + unsigned char bInterval; + unsigned char bRefresh; + unsigned char bSynchAddress; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +#define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ +#define USB_ENDPOINT_DIR_MASK 0x80 + +#define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ +#define USB_ENDPOINT_TYPE_CONTROL 0 +#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 +#define USB_ENDPOINT_TYPE_BULK 2 +#define USB_ENDPOINT_TYPE_INTERRUPT 3 + +/* Interface descriptor */ +#define USB_MAXINTERFACES 32 +struct usb_interface_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bInterfaceNumber; + unsigned char bAlternateSetting; + unsigned char bNumEndpoints; + unsigned char bInterfaceClass; + unsigned char bInterfaceSubClass; + unsigned char bInterfaceProtocol; + unsigned char iInterface; + + struct usb_endpoint_descriptor *endpoint; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +#define USB_MAXALTSETTING 128 /* Hard limit */ + +struct usb_interface { + struct usb_interface_descriptor *altsetting; + + int num_altsetting; +}; + +/* Configuration descriptor information.. */ +#define USB_MAXCONFIG 8 +struct usb_config_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wTotalLength; + unsigned char bNumInterfaces; + unsigned char bConfigurationValue; + unsigned char iConfiguration; + unsigned char bmAttributes; + unsigned char MaxPower; + + struct usb_interface *interface; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/* Device descriptor */ +struct usb_device_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short bcdUSB; + unsigned char bDeviceClass; + unsigned char bDeviceSubClass; + unsigned char bDeviceProtocol; + unsigned char bMaxPacketSize0; + unsigned short idVendor; + unsigned short idProduct; + unsigned short bcdDevice; + unsigned char iManufacturer; + unsigned char iProduct; + unsigned char iSerialNumber; + unsigned char bNumConfigurations; +}; + +struct usb_ctrl_setup { + unsigned char bRequestType; + unsigned char bRequest; + unsigned short wValue; + unsigned short wIndex; + unsigned short wLength; +}; + +/* + * Standard requests + */ +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 +/* 0x02 is reserved */ +#define USB_REQ_SET_FEATURE 0x03 +/* 0x04 is reserved */ +#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_GET_DESCRIPTOR 0x06 +#define USB_REQ_SET_DESCRIPTOR 0x07 +#define USB_REQ_GET_CONFIGURATION 0x08 +#define USB_REQ_SET_CONFIGURATION 0x09 +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C + +#define USB_TYPE_STANDARD (0x00 << 5) +#define USB_TYPE_CLASS (0x01 << 5) +#define USB_TYPE_VENDOR (0x02 << 5) +#define USB_TYPE_RESERVED (0x03 << 5) + +#define USB_RECIP_DEVICE 0x00 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_OTHER 0x03 + +/* + * Various libusb API related stuff + */ + +#define USB_ENDPOINT_IN 0x80 +#define USB_ENDPOINT_OUT 0x00 + +/* Error codes */ +#define USB_ERROR_BEGIN 500000 + +/* + * This is supposed to look weird. This file is generated from autoconf + * and I didn't want to make this too complicated. + */ +#define USB_LE16_TO_CPU(x) + +/* Data types */ +/* struct usb_device; */ +/* struct usb_bus; */ + +struct usb_device { + struct usb_device *next, *prev; + + char filename[LIBUSB_PATH_MAX]; + + struct usb_bus *bus; + + struct usb_device_descriptor descriptor; + struct usb_config_descriptor *config; + + void *dev; /* Darwin support */ + + unsigned char devnum; + + unsigned char num_children; + struct usb_device **children; +}; + +struct usb_bus { + struct usb_bus *next, *prev; + + char dirname[LIBUSB_PATH_MAX]; + + struct usb_device *devices; + unsigned long location; + + struct usb_device *root_dev; +}; + +/* Version information, Windows specific */ +struct usb_version { + struct { + int major; + int minor; + int micro; + int nano; + } dll; + struct { + int major; + int minor; + int micro; + int nano; + } driver; +}; + + +struct usb_dev_handle; +typedef struct usb_dev_handle usb_dev_handle; + +/* Variables */ +#ifndef __USB_C__ +#define usb_busses usb_get_busses() +#endif + + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Function prototypes */ + + /* usb.c */ + usb_dev_handle *usb_open(struct usb_device *dev); + int usb_close(usb_dev_handle *dev); + int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf, + size_t buflen); + int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, + size_t buflen); + + /* descriptors.c */ + int usb_get_descriptor_by_endpoint(usb_dev_handle *udev, int ep, + unsigned char type, unsigned char index, + void *buf, int size); + int usb_get_descriptor(usb_dev_handle *udev, unsigned char type, + unsigned char index, void *buf, int size); + + /* .c */ + int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size, + int timeout); + int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, + int value, int index, char *bytes, int size, + int timeout); + int usb_set_configuration(usb_dev_handle *dev, int configuration); + int usb_claim_interface(usb_dev_handle *dev, int interface); + int usb_release_interface(usb_dev_handle *dev, int interface); + int usb_set_altinterface(usb_dev_handle *dev, int alternate); + int usb_resetep(usb_dev_handle *dev, unsigned int ep); + int usb_clear_halt(usb_dev_handle *dev, unsigned int ep); + int usb_reset(usb_dev_handle *dev); + + char *usb_strerror(void); + + void usb_init(void); + void usb_set_debug(int level); + int usb_find_busses(void); + int usb_find_devices(void); + struct usb_device *usb_device(usb_dev_handle *dev); + struct usb_bus *usb_get_busses(void); + + + /* Windows specific functions */ + + #define LIBUSB_HAS_INSTALL_SERVICE_NP 1 + int usb_install_service_np(void); + void CALLBACK usb_install_service_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_UNINSTALL_SERVICE_NP 1 + int usb_uninstall_service_np(void); + void CALLBACK usb_uninstall_service_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_INSTALL_DRIVER_NP 1 + int usb_install_driver_np(const char *inf_file); + void CALLBACK usb_install_driver_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_TOUCH_INF_FILE_NP 1 + int usb_touch_inf_file_np(const char *inf_file); + void CALLBACK usb_touch_inf_file_np_rundll(HWND wnd, HINSTANCE instance, + LPSTR cmd_line, int cmd_show); + + #define LIBUSB_HAS_INSTALL_NEEDS_RESTART_NP 1 + int usb_install_needs_restart_np(void); + + const struct usb_version *usb_get_version(void); + + int usb_isochronous_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep, int pktsize); + int usb_bulk_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep); + int usb_interrupt_setup_async(usb_dev_handle *dev, void **context, + unsigned char ep); + + int usb_submit_async(void *context, char *bytes, int size); + int usb_reap_async(void *context, int timeout); + int usb_reap_async_nocancel(void *context, int timeout); + int usb_cancel_async(void *context); + int usb_free_async(void **context); + + +#ifdef __cplusplus +} +#endif + +#endif /* __USB_H__ */ +