summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile2
-rw-r--r--firmware/libs-device/osccal.c.lst22
-rwxr-xr-xfirmware/main.binbin8969 -> 8937 bytes
-rw-r--r--firmware/main.c36
-rw-r--r--firmware/main.c.lst880
-rw-r--r--firmware/main.hex292
-rw-r--r--firmware/main.map166
-rw-r--r--firmware/main.obin6024 -> 5964 bytes
-rw-r--r--firmware/temp-dump.binbin8192 -> 7936 bytes
-rw-r--r--firmware/upload.rb11
-rw-r--r--firmware/usbdrv/oddebug.c.lst17
11 files changed, 1155 insertions, 271 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 6596147..9f36797 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -20,7 +20,7 @@ DEVICE = attiny85
# BOOTLOADER_ADDRESS is 1800 for 8k devices, 3800 for 16k and 7800 for 32k.
# Can be on the start of any flash page for ATtiny85, but must be set low enough so there is space for the full boot loader
# BOOTLOADER_ADDRESS is in units of 8 bytes seems like
-BOOTLOADER_ADDRESS = 1700
+BOOTLOADER_ADDRESS = 1704
FUSEOPT = $(FUSEOPT_t85)
LOCKOPT = -U lock:w:0x2f:m
diff --git a/firmware/libs-device/osccal.c.lst b/firmware/libs-device/osccal.c.lst
index 9b29699..3c9c840 100644
--- a/firmware/libs-device/osccal.c.lst
+++ b/firmware/libs-device/osccal.c.lst
@@ -1,4 +1,8 @@
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s page 1
+=======
+GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s page 1
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
1 .file "osccal.c"
@@ -58,7 +62,11 @@ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s page
55 0046 8C17 cp r24,r28
56 0048 9D07 cpc r25,r29
57 004a 04F4 brge .L6
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s page 2
+=======
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s page 2
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
58 004c 01B7 in r16,81-32
@@ -85,11 +93,16 @@ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s page
79 0070 FF90 pop r15
80 0072 0895 ret
81 .size calibrateOscillator, .-calibrateOscillator
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s page 3
+=======
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s page 3
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
DEFINED SYMBOLS
*ABS*:00000000 osccal.c
+<<<<<<< HEAD
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:2 *ABS*:0000003f __SREG__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:3 *ABS*:0000003e __SP_H__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:4 *ABS*:0000003d __SP_L__
@@ -97,6 +110,15 @@ DEFINED SYMBOLS
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:6 *ABS*:00000000 __tmp_reg__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:7 *ABS*:00000001 __zero_reg__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccZRYW1t.s:11 .text:00000000 calibrateOscillator
+=======
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:2 *ABS*:0000003f __SREG__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:3 *ABS*:0000003e __SP_H__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:4 *ABS*:0000003d __SP_L__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:5 *ABS*:00000034 __CCP__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:6 *ABS*:00000000 __tmp_reg__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:7 *ABS*:00000001 __zero_reg__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccUlOqDi.s:11 .text:00000000 calibrateOscillator
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
UNDEFINED SYMBOLS
usbMeasureFrameLength
diff --git a/firmware/main.bin b/firmware/main.bin
index a5a6933..b3ad2e3 100755
--- a/firmware/main.bin
+++ b/firmware/main.bin
Binary files differ
diff --git a/firmware/main.c b/firmware/main.c
index 84cc11e..6e4efb0 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -13,7 +13,7 @@
#include <avr/io.h>
#include <avr/interrupt.h>
-#include <avr/pgmspace.h>
+//#include <avr/pgmspace.h>
#include <avr/wdt.h>
#include <avr/boot.h>
//#include <avr/eeprom.h>
@@ -79,7 +79,7 @@ static uchar events = 0; // bitmap of events to run
#define isEvent(event) (events & (event))
#define clearEvents() events = 0
-static uchar writeLength;
+//static uchar writeLength;
// becomes 1 when some programming happened
// lets leaveBootloader know if needs to finish up the programming
@@ -143,12 +143,11 @@ static void writeWordToPageBuffer(uint16_t data) {
data = vectorTemp[1] + ((FLASHEND + 1) - BOOTLOADER_ADDRESS)/2 + 1 + USBPLUS_VECTOR_OFFSET;
}
-
+ cli();
// clear page buffer as a precaution before filling the buffer on the first page
// TODO: maybe clear on the first byte of every page?
- if (currentAddress == 0x0000) __boot_page_fill_clear();
+ if (currentAddress == 0) __boot_page_fill_clear();
- cli();
boot_page_fill(currentAddress, data);
sei();
@@ -189,7 +188,7 @@ static uchar usbFunctionSetup(uchar data[8]) {
return 4;
} else if (rq->bRequest == 1) { // write page
- writeLength = rq->wValue.word;
+ //writeLength = rq->wValue.word;
currentAddress = rq->wIndex.word;
return USB_NO_MSG; // magical? IDK - USBaspLoader-tiny85 returns this and it works so whatever.
@@ -208,7 +207,7 @@ static uchar usbFunctionSetup(uchar data[8]) {
// read in a page over usb, and write it in to the flash write buffer
static uchar usbFunctionWrite(uchar *data, uchar length) {
- writeLength -= length;
+ //writeLength -= length;
do {
// remember vectors or the tinyvector table
@@ -233,7 +232,7 @@ static uchar usbFunctionWrite(uchar *data, uchar length) {
// TODO: Isn't this always last?
// if we have now reached another page boundary, we're done
- uchar isLast = (writeLength == 0);
+ uchar isLast = (currentAddress % SPM_PAGESIZE) == 0;
if (isLast) fireEvent(EVENT_WRITE_PAGE); // ask runloop to write our page
return isLast; // let vusb know we're done with this request
@@ -287,19 +286,21 @@ static inline void tiny85FlashWrites(void) {
}
}
-static inline __attribute__((noreturn)) void leaveBootloader(void) {
- //DBG1(0x01, 0, 0);
- bootLoaderExit();
- cli();
- USB_INTR_ENABLE = 0;
- USB_INTR_CFG = 0; /* also reset config bits */
-
+static inline finish(void) {
// make sure remainder of flash is erased and write checksum and application reset vectors
if (didWriteSomething) {
while (currentAddress < BOOTLOADER_ADDRESS) {
fillFlashWithVectors();
}
}
+}
+
+static inline __attribute__((noreturn)) void leaveBootloader(void) {
+ //DBG1(0x01, 0, 0);
+ bootLoaderExit();
+ cli();
+ USB_INTR_ENABLE = 0;
+ USB_INTR_CFG = 0; /* also reset config bits */
// clear magic word from bottom of stack before jumping to the app
*(uint8_t*)(RAMEND) = 0x00;
@@ -336,7 +337,7 @@ int __attribute__((noreturn)) main(void) {
# if BOOTLOADER_CAN_EXIT
// exit if requested by the programming app, or if we timeout waiting for the pc with a valid app
if (isEvent(EVENT_EXIT_BOOTLOADER) || AUTO_EXIT_CONDITION()) {
- _delay_ms(10);
+ _delay_ms(10); // TODO: Does this do anything?
break;
}
# endif
@@ -344,7 +345,10 @@ int __attribute__((noreturn)) main(void) {
clearEvents();
} while(bootLoaderCondition()); /* main event loop */
+
+ finish();
}
+
leaveBootloader();
}
diff --git a/firmware/main.c.lst b/firmware/main.c.lst
index 7041915..93f255b 100644
--- a/firmware/main.c.lst
+++ b/firmware/main.c.lst
@@ -1,4 +1,8 @@
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s page 1
+=======
+GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 1
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
1 .file "main.c"
@@ -55,52 +59,57 @@ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s page
52 0028 3091 0000 lds r19,currentAddress+1
53 002c 2115 cp r18,__zero_reg__
54 002e 3105 cpc r19,__zero_reg__
- 55 0030 01F0 breq .L4
+ 55 0030 01F0 breq .L8
56 0032 2430 cpi r18,4
57 0034 3105 cpc r19,__zero_reg__
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s page 2
+=======
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 2
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
58 0036 01F0 breq .L8
- 59 0038 46E1 ldi r20,hi8(5884)
- 60 003a 2C3F cpi r18,lo8(5884)
+ 59 0038 47E1 ldi r20,hi8(5888)
+ 60 003a 2030 cpi r18,lo8(5888)
61 003c 3407 cpc r19,r20
- 62 003e 01F4 brne .L6
+ 62 003e 01F4 brne .L5
63 0040 8091 0000 lds r24,vectorTemp
64 0044 9091 0000 lds r25,vectorTemp+1
- 65 0048 8E57 subi r24,lo8(-(1154))
- 66 004a 9B4F sbci r25,hi8(-(1154))
- 67 004c 00C0 rjmp .L7
- 68 .L6:
- 69 004e 46E1 ldi r20,hi8(5886)
- 70 0050 2E3F cpi r18,lo8(5886)
+ 65 0048 8058 subi r24,lo8(-(1152))
+ 66 004a 9B4F sbci r25,hi8(-(1152))
+ 67 004c 00C0 rjmp .L4
+ 68 .L5:
+ 69 004e 47E1 ldi r20,hi8(5890)
+ 70 0050 2230 cpi r18,lo8(5890)
71 0052 3407 cpc r19,r20
- 72 0054 01F4 brne .L7
+ 72 0054 01F4 brne .L4
73 0056 8091 0000 lds r24,vectorTemp+2
74 005a 9091 0000 lds r25,vectorTemp+2+1
- 75 005e 8D57 subi r24,lo8(-(1155))
- 76 0060 9B4F sbci r25,hi8(-(1155))
- 77 0062 00C0 rjmp .L7
+ 75 005e 8F57 subi r24,lo8(-(1153))
+ 76 0060 9B4F sbci r25,hi8(-(1153))
+ 77 0062 00C0 rjmp .L4
78 .L8:
- 79 0064 8FE7 ldi r24,lo8(-13441)
- 80 0066 9BEC ldi r25,hi8(-13441)
- 81 .L7:
+ 79 0064 81E8 ldi r24,lo8(-13439)
+ 80 0066 9BEC ldi r25,hi8(-13439)
+ 81 .L4:
82 /* #APP */
- 83 ; 151 "main.c" 1
+ 83 ; 146 "main.c" 1
84 0068 F894 cli
85 ; 0 "" 2
86 /* #NOAPP */
87 006a E091 0000 lds r30,currentAddress
88 006e F091 0000 lds r31,currentAddress+1
- 89 0072 21E0 ldi r18,lo8(1)
- 90 /* #APP */
- 91 ; 152 "main.c" 1
- 92 0074 0C01 movw r0, r24
- 93 0076 2093 5700 sts 87, r18
- 94 007a E895 spm
- 95 007c 1124 clr r1
+ 89 0072 3097 sbiw r30,0
+ 90 0074 01F4 brne .L6
+ 91 0076 21E1 ldi r18,lo8(17)
+ 92 /* #APP */
+ 93 ; 149 "main.c" 1
+ 94 0078 2093 5700 sts 87, r18
+ 95 007c E895 spm
96
97 ; 0 "" 2
+<<<<<<< HEAD
98 ; 153 "main.c" 1
99 007e 7894 sei
100 ; 0 "" 2
@@ -887,10 +896,797 @@ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s page
842 .global __do_copy_data
843 .global __do_clear_bss
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s page 16
+=======
+ 98 /* #NOAPP */
+ 99 .L6:
+ 100 007e 21E0 ldi r18,lo8(1)
+ 101 /* #APP */
+ 102 ; 151 "main.c" 1
+ 103 0080 0C01 movw r0, r24
+ 104 0082 2093 5700 sts 87, r18
+ 105 0086 E895 spm
+ 106 0088 1124 clr r1
+ 107
+ 108 ; 0 "" 2
+ 109 ; 152 "main.c" 1
+ 110 008a 7894 sei
+ 111 ; 0 "" 2
+ 112 /* #NOAPP */
+ 113 008c 8091 0000 lds r24,currentAddress
+ 114 0090 9091 0000 lds r25,currentAddress+1
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 3
+
+
+ 115 0094 0296 adiw r24,2
+ 116 0096 9093 0000 sts currentAddress+1,r25
+ 117 009a 8093 0000 sts currentAddress,r24
+ 118 /* epilogue start */
+ 119 009e 0895 ret
+ 120 .size writeWordToPageBuffer, .-writeWordToPageBuffer
+ 121 .type fillFlashWithVectors, @function
+ 122 fillFlashWithVectors:
+ 123 00a0 CF93 push r28
+ 124 00a2 DF93 push r29
+ 125 /* prologue: function */
+ 126 /* frame size = 0 */
+ 127 /* stack size = 2 */
+ 128 .L__stack_usage = 2
+ 129 00a4 C091 0000 lds r28,currentAddress
+ 130 00a8 D091 0000 lds r29,currentAddress+1
+ 131 00ac CF73 andi r28,lo8(63)
+ 132 00ae D070 andi r29,hi8(63)
+ 133 .L10:
+ 134 00b0 8FEF ldi r24,lo8(-1)
+ 135 00b2 9FEF ldi r25,hi8(-1)
+ 136 00b4 00D0 rcall writeWordToPageBuffer
+ 137 00b6 2296 adiw r28,2
+ 138 00b8 C034 cpi r28,64
+ 139 00ba D105 cpc r29,__zero_reg__
+ 140 00bc 04F0 brlt .L10
+ 141 00be 00D0 rcall writeFlashPage
+ 142 /* epilogue start */
+ 143 00c0 DF91 pop r29
+ 144 00c2 CF91 pop r28
+ 145 00c4 0895 ret
+ 146 .size fillFlashWithVectors, .-fillFlashWithVectors
+ 147 .section .init3,"ax",@progbits
+ 148 .global PushMagicWord
+ 149 .type PushMagicWord, @function
+ 150 PushMagicWord:
+ 151 /* prologue: naked */
+ 152 /* frame size = 0 */
+ 153 /* stack size = 0 */
+ 154 .L__stack_usage = 0
+ 155 /* #APP */
+ 156 ; 247 "main.c" 1
+ 157 0000 00EB ldi r16, 0xB0
+ 158 ; 0 "" 2
+ 159 ; 248 "main.c" 1
+ 160 0002 0F93 push r16
+ 161 ; 0 "" 2
+ 162 ; 249 "main.c" 1
+ 163 0004 07E0 ldi r16, 0x07
+ 164 ; 0 "" 2
+ 165 ; 250 "main.c" 1
+ 166 0006 0F93 push r16
+ 167 ; 0 "" 2
+ 168 /* epilogue start */
+ 169 /* #NOAPP */
+ 170 .size PushMagicWord, .-PushMagicWord
+ 171 .text
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 4
+
+
+ 172 .global main
+ 173 .type main, @function
+ 174 main:
+ 175 00c6 DF93 push r29
+ 176 00c8 CF93 push r28
+ 177 00ca 0F92 push __tmp_reg__
+ 178 00cc CDB7 in r28,__SP_L__
+ 179 00ce DEB7 in r29,__SP_H__
+ 180 /* prologue: function */
+ 181 /* frame size = 1 */
+ 182 /* stack size = 3 */
+ 183 .L__stack_usage = 3
+ 184 00d0 88E1 ldi r24,lo8(24)
+ 185 /* #APP */
+ 186 ; 315 "main.c" 1
+ 187 00d2 0FB6 in __tmp_reg__, __SREG__
+ 188 00d4 F894 cli
+ 189 00d6 81BD out 33, r24
+ 190 00d8 11BC out 33, __zero_reg__
+ 191 00da 0FBE out __SREG__,__tmp_reg__
+ 192
+ 193 ; 0 "" 2
+ 194 /* #NOAPP */
+ 195 00dc E0E0 ldi r30,lo8(0)
+ 196 00de F0E0 ldi r31,hi8(0)
+ 197 /* #APP */
+ 198 ; 268 "main.c" 1
+ 199 00e0 8591 lpm r24, Z+
+ 200 00e2 9491 lpm r25, Z
+ 201
+ 202 ; 0 "" 2
+ 203 /* #NOAPP */
+ 204 00e4 2BEC ldi r18,hi8(-13439)
+ 205 00e6 8138 cpi r24,lo8(-13439)
+ 206 00e8 9207 cpc r25,r18
+ 207 00ea 01F4 brne .L13
+ 208 00ec E4E0 ldi r30,lo8(4)
+ 209 00ee F0E0 ldi r31,hi8(4)
+ 210 /* #APP */
+ 211 ; 269 "main.c" 1
+ 212 00f0 8591 lpm r24, Z+
+ 213 00f2 9491 lpm r25, Z
+ 214
+ 215 ; 0 "" 2
+ 216 /* #NOAPP */
+ 217 00f4 3BEC ldi r19,hi8(-13439)
+ 218 00f6 8138 cpi r24,lo8(-13439)
+ 219 00f8 9307 cpc r25,r19
+ 220 00fa 01F0 breq .L14
+ 221 .L13:
+ 222 00fc 00D0 rcall fillFlashWithVectors
+ 223 .L14:
+ 224 00fe 1092 0000 sts currentAddress+1,__zero_reg__
+ 225 0102 1092 0000 sts currentAddress,__zero_reg__
+ 226 0106 AC9A sbi 53-32,4
+ 227 0108 8BB7 in r24,91-32
+ 228 010a 8062 ori r24,lo8(32)
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 5
+
+
+ 229 010c 8BBF out 91-32,r24
+ 230 010e BB9A sbi 55-32,3
+ 231 0110 8FE4 ldi r24,lo8(1649999)
+ 232 0112 9DE2 ldi r25,hi8(1649999)
+ 233 0114 A9E1 ldi r26,hlo8(1649999)
+ 234 0116 8150 1:subi r24,1
+ 235 0118 9040 sbci r25,0
+ 236 011a A040 sbci r26,0
+ 237 011c 01F4 brne 1b
+ 238 011e 00C0 rjmp .
+ 239 0120 0000 nop
+ 240 0122 BB98 cbi 55-32,3
+ 241 /* #APP */
+ 242 ; 261 "main.c" 1
+ 243 0124 7894 sei
+ 244 ; 0 "" 2
+ 245 /* #NOAPP */
+ 246 0126 EE24 clr r14
+ 247 0128 FF24 clr r15
+ 248 .L68:
+ 249 012a 2091 0000 lds r18,usbRxLen
+ 250 012e 2350 subi r18,lo8(-(-3))
+ 251 0130 27FD sbrc r18,7
+ 252 0132 00C0 rjmp .L15
+ 253 0134 8091 0000 lds r24,usbInputBufOffset
+ 254 0138 ECE0 ldi r30,lo8(12)
+ 255 013a F0E0 ldi r31,hi8(12)
+ 256 013c E81B sub r30,r24
+ 257 013e F109 sbc r31,__zero_reg__
+ 258 0140 E050 subi r30,lo8(-(usbRxBuf))
+ 259 0142 F040 sbci r31,hi8(-(usbRxBuf))
+ 260 0144 8091 0000 lds r24,usbRxToken
+ 261 0148 8D32 cpi r24,lo8(45)
+ 262 014a 01F0 breq .+2
+ 263 014c 00C0 rjmp .L16
+ 264 014e 2830 cpi r18,lo8(8)
+ 265 0150 01F0 breq .+2
+ 266 0152 00C0 rjmp .L17
+ 267 0154 83EC ldi r24,lo8(-61)
+ 268 0156 8093 0000 sts usbTxBuf,r24
+ 269 015a 8AE5 ldi r24,lo8(90)
+ 270 015c 8093 0000 sts usbTxLen,r24
+ 271 0160 1092 0000 sts usbMsgFlags,__zero_reg__
+ 272 0164 2081 ld r18,Z
+ 273 0166 922F mov r25,r18
+ 274 0168 9076 andi r25,lo8(96)
+ 275 016a 8181 ldd r24,Z+1
+ 276 016c 9923 tst r25
+ 277 016e 01F0 breq .L18
+ 278 0170 8823 tst r24
+ 279 0172 01F4 brne .L19
+ 280 0174 80E0 ldi r24,lo8(replyBuffer.1744)
+ 281 0176 90E0 ldi r25,hi8(replyBuffer.1744)
+ 282 0178 9093 0000 sts usbMsgPtr+1,r25
+ 283 017c 8093 0000 sts usbMsgPtr,r24
+ 284 0180 24E0 ldi r18,lo8(4)
+ 285 0182 00C0 rjmp .L25
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 6
+
+
+ 286 .L19:
+ 287 0184 8130 cpi r24,lo8(1)
+ 288 0186 01F4 brne .L21
+ 289 0188 8481 ldd r24,Z+4
+ 290 018a 9581 ldd r25,Z+5
+ 291 018c 9093 0000 sts currentAddress+1,r25
+ 292 0190 8093 0000 sts currentAddress,r24
+ 293 0194 27FD sbrc r18,7
+ 294 0196 00C0 rjmp .L22
+ 295 0198 2FEF ldi r18,lo8(-1)
+ 296 019a 00C0 rjmp .L23
+ 297 .L21:
+ 298 019c 9091 0000 lds r25,events
+ 299 01a0 8230 cpi r24,lo8(2)
+ 300 01a2 01F4 brne .L24
+ 301 01a4 9160 ori r25,lo8(1)
+ 302 01a6 00C0 rjmp .L77
+ 303 .L24:
+ 304 01a8 9460 ori r25,lo8(4)
+ 305 .L77:
+ 306 01aa 9093 0000 sts events,r25
+ 307 01ae 20E0 ldi r18,lo8(0)
+ 308 01b0 00C0 rjmp .L25
+ 309 .L18:
+ 310 01b2 9281 ldd r25,Z+2
+ 311 01b4 1092 0000 sts usbTxBuf+9,__zero_reg__
+ 312 01b8 8823 tst r24
+ 313 01ba 01F4 brne .L26
+ 314 01bc 1092 0000 sts usbTxBuf+10,__zero_reg__
+ 315 01c0 80E0 ldi r24,lo8(usbTxBuf+9)
+ 316 01c2 90E0 ldi r25,hi8(usbTxBuf+9)
+ 317 01c4 22E0 ldi r18,lo8(2)
+ 318 01c6 00C0 rjmp .L27
+ 319 .L26:
+ 320 01c8 8530 cpi r24,lo8(5)
+ 321 01ca 01F4 brne .L28
+ 322 01cc 9093 0000 sts usbNewDeviceAddr,r25
+ 323 01d0 00C0 rjmp .L75
+ 324 .L28:
+ 325 01d2 8630 cpi r24,lo8(6)
+ 326 01d4 01F4 brne .L29
+ 327 01d6 8381 ldd r24,Z+3
+ 328 01d8 8130 cpi r24,lo8(1)
+ 329 01da 01F4 brne .L30
+ 330 01dc 80E0 ldi r24,lo8(usbDescriptorDevice)
+ 331 01de 90E0 ldi r25,hi8(usbDescriptorDevice)
+ 332 01e0 00C0 rjmp .L74
+ 333 .L30:
+ 334 01e2 8230 cpi r24,lo8(2)
+ 335 01e4 01F4 brne .L32
+ 336 01e6 80E0 ldi r24,lo8(usbDescriptorConfiguration)
+ 337 01e8 90E0 ldi r25,hi8(usbDescriptorConfiguration)
+ 338 .L74:
+ 339 01ea 9093 0000 sts usbMsgPtr+1,r25
+ 340 01ee 8093 0000 sts usbMsgPtr,r24
+ 341 01f2 22E1 ldi r18,lo8(18)
+ 342 01f4 00C0 rjmp .L31
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 7
+
+
+ 343 .L32:
+ 344 01f6 8330 cpi r24,lo8(3)
+ 345 01f8 01F4 brne .L70
+ 346 01fa 9923 tst r25
+ 347 01fc 01F4 brne .L33
+ 348 01fe 80E0 ldi r24,lo8(usbDescriptorString0)
+ 349 0200 90E0 ldi r25,hi8(usbDescriptorString0)
+ 350 0202 9093 0000 sts usbMsgPtr+1,r25
+ 351 0206 8093 0000 sts usbMsgPtr,r24
+ 352 020a 24E0 ldi r18,lo8(4)
+ 353 020c 00C0 rjmp .L31
+ 354 .L33:
+ 355 020e 9130 cpi r25,lo8(1)
+ 356 0210 01F4 brne .L34
+ 357 0212 80E0 ldi r24,lo8(usbDescriptorStringVendor)
+ 358 0214 90E0 ldi r25,hi8(usbDescriptorStringVendor)
+ 359 0216 9093 0000 sts usbMsgPtr+1,r25
+ 360 021a 8093 0000 sts usbMsgPtr,r24
+ 361 021e 22E2 ldi r18,lo8(34)
+ 362 0220 00C0 rjmp .L31
+ 363 .L34:
+ 364 0222 9230 cpi r25,lo8(2)
+ 365 0224 01F4 brne .L70
+ 366 0226 80E0 ldi r24,lo8(usbDescriptorStringDevice)
+ 367 0228 90E0 ldi r25,hi8(usbDescriptorStringDevice)
+ 368 022a 9093 0000 sts usbMsgPtr+1,r25
+ 369 022e 8093 0000 sts usbMsgPtr,r24
+ 370 0232 2CE0 ldi r18,lo8(12)
+ 371 0234 00C0 rjmp .L31
+ 372 .L70:
+ 373 0236 20E0 ldi r18,lo8(0)
+ 374 .L31:
+ 375 0238 80E4 ldi r24,lo8(64)
+ 376 023a 8093 0000 sts usbMsgFlags,r24
+ 377 023e 00C0 rjmp .L25
+ 378 .L29:
+ 379 0240 8830 cpi r24,lo8(8)
+ 380 0242 01F0 breq .L71
+ 381 0244 8930 cpi r24,lo8(9)
+ 382 0246 01F4 brne .L36
+ 383 0248 9093 0000 sts usbConfiguration,r25
+ 384 024c 00C0 rjmp .L75
+ 385 .L36:
+ 386 024e 8A30 cpi r24,lo8(10)
+ 387 0250 01F0 breq .L72
+ 388 .L75:
+ 389 0252 80E0 ldi r24,lo8(usbTxBuf+9)
+ 390 0254 90E0 ldi r25,hi8(usbTxBuf+9)
+ 391 0256 20E0 ldi r18,lo8(0)
+ 392 0258 00C0 rjmp .L27
+ 393 .L71:
+ 394 025a 80E0 ldi r24,lo8(usbConfiguration)
+ 395 025c 90E0 ldi r25,hi8(usbConfiguration)
+ 396 025e 00C0 rjmp .L76
+ 397 .L72:
+ 398 0260 80E0 ldi r24,lo8(usbTxBuf+9)
+ 399 0262 90E0 ldi r25,hi8(usbTxBuf+9)
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 8
+
+
+ 400 .L76:
+ 401 0264 21E0 ldi r18,lo8(1)
+ 402 .L27:
+ 403 0266 9093 0000 sts usbMsgPtr+1,r25
+ 404 026a 8093 0000 sts usbMsgPtr,r24
+ 405 026e 00C0 rjmp .L25
+ 406 .L22:
+ 407 0270 2681 ldd r18,Z+6
+ 408 .L23:
+ 409 0272 80E8 ldi r24,lo8(-128)
+ 410 0274 8093 0000 sts usbMsgFlags,r24
+ 411 0278 00C0 rjmp .L37
+ 412 .L25:
+ 413 027a 8781 ldd r24,Z+7
+ 414 027c 8823 tst r24
+ 415 027e 01F4 brne .L37
+ 416 0280 8681 ldd r24,Z+6
+ 417 0282 8217 cp r24,r18
+ 418 0284 00F4 brsh .L37
+ 419 0286 282F mov r18,r24
+ 420 .L37:
+ 421 0288 2093 0000 sts usbMsgLen,r18
+ 422 028c 00C0 rjmp .L17
+ 423 .L16:
+ 424 028e 8091 0000 lds r24,usbMsgFlags
+ 425 0292 87FF sbrs r24,7
+ 426 0294 00C0 rjmp .L17
+ 427 0296 8F01 movw r16,r30
+ 428 .L42:
+ 429 0298 8091 0000 lds r24,currentAddress
+ 430 029c 9091 0000 lds r25,currentAddress+1
+ 431 02a0 0097 sbiw r24,0
+ 432 02a2 01F4 brne .L38
+ 433 02a4 D801 movw r26,r16
+ 434 02a6 8D91 ld r24,X+
+ 435 02a8 9C91 ld r25,X
+ 436 02aa 1197 sbiw r26,1
+ 437 02ac 9093 0000 sts vectorTemp+1,r25
+ 438 02b0 8093 0000 sts vectorTemp,r24
+ 439 02b4 00C0 rjmp .L39
+ 440 .L38:
+ 441 02b6 8430 cpi r24,4
+ 442 02b8 9105 cpc r25,__zero_reg__
+ 443 02ba 01F4 brne .L40
+ 444 02bc F801 movw r30,r16
+ 445 02be 8081 ld r24,Z
+ 446 02c0 9181 ldd r25,Z+1
+ 447 02c2 9093 0000 sts vectorTemp+2+1,r25
+ 448 02c6 8093 0000 sts vectorTemp+2,r24
+ 449 02ca 00C0 rjmp .L39
+ 450 .L40:
+ 451 02cc F6E1 ldi r31,hi8(5886)
+ 452 02ce 8E3F cpi r24,lo8(5886)
+ 453 02d0 9F07 cpc r25,r31
+ 454 02d2 00F0 brlo .L39
+ 455 02d4 81E1 ldi r24,lo8(17)
+ 456 /* #APP */
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 9
+
+
+ 457 ; 224 "main.c" 1
+ 458 02d6 8093 5700 sts 87, r24
+ 459 02da E895 spm
+ 460
+ 461 ; 0 "" 2
+ 462 /* #NOAPP */
+ 463 02dc 00C0 rjmp .L41
+ 464 .L39:
+ 465 02de D801 movw r26,r16
+ 466 02e0 8D91 ld r24,X+
+ 467 02e2 9D91 ld r25,X+
+ 468 02e4 8D01 movw r16,r26
+ 469 02e6 2983 std Y+1,r18
+ 470 02e8 00D0 rcall writeWordToPageBuffer
+ 471 02ea 2981 ldd r18,Y+1
+ 472 02ec 2250 subi r18,lo8(-(-2))
+ 473 02ee 01F4 brne .L42
+ 474 .L41:
+ 475 02f0 8091 0000 lds r24,currentAddress
+ 476 02f4 9091 0000 lds r25,currentAddress+1
+ 477 02f8 8F73 andi r24,lo8(63)
+ 478 02fa 9070 andi r25,hi8(63)
+ 479 02fc 0097 sbiw r24,0
+ 480 02fe 01F4 brne .L17
+ 481 0300 8091 0000 lds r24,events
+ 482 0304 8260 ori r24,lo8(2)
+ 483 0306 8093 0000 sts events,r24
+ 484 030a 1092 0000 sts usbMsgLen,__zero_reg__
+ 485 .L17:
+ 486 030e 1092 0000 sts usbRxLen,__zero_reg__
+ 487 .L15:
+ 488 0312 8091 0000 lds r24,usbTxLen
+ 489 0316 84FF sbrs r24,4
+ 490 0318 00C0 rjmp .L43
+ 491 031a 8091 0000 lds r24,usbMsgLen
+ 492 031e 8F3F cpi r24,lo8(-1)
+ 493 0320 01F4 brne .+2
+ 494 0322 00C0 rjmp .L43
+ 495 0324 082F mov r16,r24
+ 496 0326 8930 cpi r24,lo8(9)
+ 497 0328 00F0 brlo .L44
+ 498 032a 08E0 ldi r16,lo8(8)
+ 499 .L44:
+ 500 032c 801B sub r24,r16
+ 501 032e 8093 0000 sts usbMsgLen,r24
+ 502 0332 8091 0000 lds r24,usbTxBuf
+ 503 0336 98E8 ldi r25,lo8(-120)
+ 504 0338 8927 eor r24,r25
+ 505 033a 8093 0000 sts usbTxBuf,r24
+ 506 033e 0023 tst r16
+ 507 0340 01F0 breq .L45
+ 508 0342 E091 0000 lds r30,usbMsgPtr
+ 509 0346 F091 0000 lds r31,usbMsgPtr+1
+ 510 034a 9091 0000 lds r25,usbMsgFlags
+ 511 034e 802F mov r24,r16
+ 512 0350 8150 subi r24,lo8(-(-1))
+ 513 0352 96FF sbrs r25,6
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 10
+
+
+ 514 0354 00C0 rjmp .L46
+ 515 0356 90E0 ldi r25,lo8(0)
+ 516 0358 8050 subi r24,lo8(-(usbTxBuf+2))
+ 517 035a 9040 sbci r25,hi8(-(usbTxBuf+2))
+ 518 035c A0E0 ldi r26,lo8(usbTxBuf+1)
+ 519 035e B0E0 ldi r27,hi8(usbTxBuf+1)
+ 520 .L47:
+ 521 /* #APP */
+ 522 ; 504 "usbdrv/usbdrv.c" 1
+ 523 0360 2491 lpm r18, Z
+ 524
+ 525 ; 0 "" 2
+ 526 /* #NOAPP */
+ 527 0362 2D93 st X+,r18
+ 528 0364 3196 adiw r30,1
+ 529 0366 A817 cp r26,r24
+ 530 0368 B907 cpc r27,r25
+ 531 036a 01F4 brne .L47
+ 532 036c 00C0 rjmp .L48
+ 533 .L46:
+ 534 036e 9F01 movw r18,r30
+ 535 0370 90E0 ldi r25,lo8(0)
+ 536 0372 8050 subi r24,lo8(-(usbTxBuf+2))
+ 537 0374 9040 sbci r25,hi8(-(usbTxBuf+2))
+ 538 0376 A0E0 ldi r26,lo8(usbTxBuf+1)
+ 539 0378 B0E0 ldi r27,hi8(usbTxBuf+1)
+ 540 .L49:
+ 541 037a F901 movw r30,r18
+ 542 037c 4191 ld r20,Z+
+ 543 037e 9F01 movw r18,r30
+ 544 0380 4D93 st X+,r20
+ 545 0382 A817 cp r26,r24
+ 546 0384 B907 cpc r27,r25
+ 547 0386 01F4 brne .L49
+ 548 .L48:
+ 549 0388 F093 0000 sts usbMsgPtr+1,r31
+ 550 038c E093 0000 sts usbMsgPtr,r30
+ 551 .L45:
+ 552 0390 80E0 ldi r24,lo8(usbTxBuf+1)
+ 553 0392 90E0 ldi r25,hi8(usbTxBuf+1)
+ 554 0394 602F mov r22,r16
+ 555 0396 00D0 rcall usbCrc16Append
+ 556 0398 0C5F subi r16,lo8(-(4))
+ 557 039a 0C30 cpi r16,lo8(12)
+ 558 039c 01F0 breq .L50
+ 559 039e 8FEF ldi r24,lo8(-1)
+ 560 03a0 8093 0000 sts usbMsgLen,r24
+ 561 .L50:
+ 562 03a4 0093 0000 sts usbTxLen,r16
+ 563 .L43:
+ 564 03a8 84E1 ldi r24,lo8(20)
+ 565 .L52:
+ 566 03aa 96B3 in r25,54-32
+ 567 03ac 9871 andi r25,lo8(24)
+ 568 03ae 01F4 brne .L51
+ 569 03b0 8150 subi r24,lo8(-(-1))
+ 570 03b2 01F4 brne .L52
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 11
+
+
+ 571 03b4 1092 0000 sts usbNewDeviceAddr,__zero_reg__
+ 572 03b8 1092 0000 sts usbDeviceAddr,__zero_reg__
+ 573 .L51:
+ 574 03bc 01E0 ldi r16,lo8(1)
+ 575 03be 8111 cpse r24,__zero_reg__
+ 576 03c0 00E0 ldi r16,lo8(0)
+ 577 .L53:
+ 578 03c2 8091 0000 lds r24,wasReset.1698
+ 579 03c6 8017 cp r24,r16
+ 580 03c8 01F0 breq .L54
+ 581 03ca 0023 tst r16
+ 582 03cc 01F4 brne .L55
+ 583 /* #APP */
+ 584 ; 557 "usbdrv/usbdrv.c" 1
+ 585 03ce F894 cli
+ 586 ; 0 "" 2
+ 587 /* #NOAPP */
+ 588 03d0 00D0 rcall calibrateOscillator
+ 589 /* #APP */
+ 590 ; 557 "usbdrv/usbdrv.c" 1
+ 591 03d2 7894 sei
+ 592 ; 0 "" 2
+ 593 /* #NOAPP */
+ 594 .L55:
+ 595 03d4 0093 0000 sts wasReset.1698,r16
+ 596 .L54:
+ 597 03d8 8CE9 ldi r24,lo8(412)
+ 598 03da 91E0 ldi r25,hi8(412)
+ 599 03dc 0197 1:sbiw r24,1
+ 600 03de 01F4 brne 1b
+ 601 03e0 0000 nop
+ 602 03e2 8091 0000 lds r24,events
+ 603 03e6 8823 tst r24
+ 604 03e8 01F4 brne .L73
+ 605 03ea 0894 sec
+ 606 03ec E11C adc r14,__zero_reg__
+ 607 03ee F11C adc r15,__zero_reg__
+ 608 03f0 00C0 rjmp .L56
+ 609 .L73:
+ 610 03f2 EE24 clr r14
+ 611 03f4 FF24 clr r15
+ 612 .L56:
+ 613 03f6 80FF sbrs r24,0
+ 614 03f8 00C0 rjmp .L57
+ 615 03fa 84EC ldi r24,lo8(5828)
+ 616 03fc 96E1 ldi r25,hi8(5828)
+ 617 03fe 00C0 rjmp .L78
+ 618 .L60:
+ 619 /* #APP */
+ 620 ; 103 "main.c" 1
+ 621 0400 F894 cli
+ 622 ; 0 "" 2
+ 623 /* #NOAPP */
+ 624 0402 E091 0000 lds r30,currentAddress
+ 625 0406 F091 0000 lds r31,currentAddress+1
+ 626 040a 83E0 ldi r24,lo8(3)
+ 627 /* #APP */
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 12
+
+
+ 628 ; 104 "main.c" 1
+ 629 040c 8093 5700 sts 87, r24
+ 630 0410 E895 spm
+ 631
+ 632 ; 0 "" 2
+ 633 /* #NOAPP */
+ 634 .L59:
+ 635 0412 07B6 in __tmp_reg__,87-32
+ 636 0414 00FC sbrc __tmp_reg__,0
+ 637 0416 00C0 rjmp .L59
+ 638 /* #APP */
+ 639 ; 106 "main.c" 1
+ 640 0418 7894 sei
+ 641 ; 0 "" 2
+ 642 /* #NOAPP */
+ 643 041a 8091 0000 lds r24,currentAddress
+ 644 041e 9091 0000 lds r25,currentAddress+1
+ 645 0422 8054 subi r24,lo8(-(-64))
+ 646 0424 9040 sbci r25,hi8(-(-64))
+ 647 .L78:
+ 648 0426 9093 0000 sts currentAddress+1,r25
+ 649 042a 8093 0000 sts currentAddress,r24
+ 650 042e 8091 0000 lds r24,currentAddress
+ 651 0432 9091 0000 lds r25,currentAddress+1
+ 652 0436 0097 sbiw r24,0
+ 653 0438 01F4 brne .L60
+ 654 .L57:
+ 655 043a 8091 0000 lds r24,events
+ 656 043e 81FF sbrs r24,1
+ 657 0440 00C0 rjmp .L61
+ 658 0442 A9E3 ldi r26,lo8(8249)
+ 659 0444 B0E2 ldi r27,hi8(8249)
+ 660 0446 1197 1:sbiw r26,1
+ 661 0448 01F4 brne 1b
+ 662 044a 00C0 rjmp .
+ 663 044c 0000 nop
+ 664 044e 8091 0000 lds r24,currentAddress
+ 665 0452 9091 0000 lds r25,currentAddress+1
+ 666 0456 8F73 andi r24,lo8(63)
+ 667 0458 9070 andi r25,hi8(63)
+ 668 045a 0097 sbiw r24,0
+ 669 045c 01F0 breq .L62
+ 670 045e 00D0 rcall fillFlashWithVectors
+ 671 0460 00C0 rjmp .L61
+ 672 .L62:
+ 673 0462 00D0 rcall writeFlashPage
+ 674 .L61:
+ 675 0464 8091 0000 lds r24,events
+ 676 0468 82FD sbrc r24,2
+ 677 046a 00C0 rjmp .L63
+ 678 046c B1E5 ldi r27,lo8(-15535)
+ 679 046e EB16 cp r14,r27
+ 680 0470 B3EC ldi r27,hi8(-15535)
+ 681 0472 FB06 cpc r15,r27
+ 682 0474 00F0 brlo .L64
+ 683 .L63:
+ 684 0476 E1E2 ldi r30,lo8(-24287)
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 13
+
+
+ 685 0478 F1EA ldi r31,hi8(-24287)
+ 686 047a 3197 1:sbiw r30,1
+ 687 047c 01F4 brne 1b
+ 688 047e 00C0 rjmp .
+ 689 0480 0000 nop
+ 690 /* #APP */
+ 691 ; 292 "main.c" 1
+ 692 0482 F894 cli
+ 693 ; 0 "" 2
+ 694 /* #NOAPP */
+ 695 0484 1BBE out 91-32,__zero_reg__
+ 696 0486 15BA out 53-32,__zero_reg__
+ 697 0488 8091 0000 lds r24,didWriteSomething
+ 698 048c 8823 tst r24
+ 699 048e 01F4 brne .L65
+ 700 0490 00C0 rjmp .L66
+ 701 .L67:
+ 702 0492 00D0 rcall fillFlashWithVectors
+ 703 .L65:
+ 704 0494 8091 0000 lds r24,currentAddress
+ 705 0498 9091 0000 lds r25,currentAddress+1
+ 706 049c F7E1 ldi r31,hi8(5892)
+ 707 049e 8430 cpi r24,lo8(5892)
+ 708 04a0 9F07 cpc r25,r31
+ 709 04a2 00F0 brlo .L67
+ 710 .L66:
+ 711 04a4 1092 5F02 sts 607,__zero_reg__
+ 712 04a8 1092 5E02 sts 606,__zero_reg__
+ 713 /* #APP */
+ 714 ; 308 "main.c" 1
+ 715 04ac 00C0 rjmp __vectors - 4
+ 716 ; 0 "" 2
+ 717 /* #NOAPP */
+ 718 .L64:
+ 719 04ae 1092 0000 sts events,__zero_reg__
+ 720 04b2 00C0 rjmp .L68
+ 721 .size main, .-main
+ 722 .global usbTxLen
+ 723 .data
+ 724 .type usbTxLen, @object
+ 725 .size usbTxLen, 1
+ 726 usbTxLen:
+ 727 0000 5A .byte 90
+ 728 .global usbDescriptorString0
+ 729 .section .progmem.data,"a",@progbits
+ 730 .type usbDescriptorString0, @object
+ 731 .size usbDescriptorString0, 4
+ 732 usbDescriptorString0:
+ 733 0000 04 .byte 4
+ 734 0001 03 .byte 3
+ 735 0002 09 .byte 9
+ 736 0003 04 .byte 4
+ 737 .global usbDescriptorStringVendor
+ 738 .type usbDescriptorStringVendor, @object
+ 739 .size usbDescriptorStringVendor, 34
+ 740 usbDescriptorStringVendor:
+ 741 0004 2203 .word 802
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 14
+
+
+ 742 0006 6300 .word 99
+ 743 0008 7200 .word 114
+ 744 000a 6500 .word 101
+ 745 000c 6100 .word 97
+ 746 000e 7400 .word 116
+ 747 0010 6900 .word 105
+ 748 0012 7600 .word 118
+ 749 0014 6500 .word 101
+ 750 0016 7000 .word 112
+ 751 0018 6F00 .word 111
+ 752 001a 6E00 .word 110
+ 753 001c 7900 .word 121
+ 754 001e 2E00 .word 46
+ 755 0020 6300 .word 99
+ 756 0022 6F00 .word 111
+ 757 0024 6D00 .word 109
+ 758 .global usbDescriptorStringDevice
+ 759 .type usbDescriptorStringDevice, @object
+ 760 .size usbDescriptorStringDevice, 12
+ 761 usbDescriptorStringDevice:
+ 762 0026 0C03 .word 780
+ 763 0028 7500 .word 117
+ 764 002a 4200 .word 66
+ 765 002c 6F00 .word 111
+ 766 002e 6F00 .word 111
+ 767 0030 7400 .word 116
+ 768 .global usbDescriptorDevice
+ 769 .type usbDescriptorDevice, @object
+ 770 .size usbDescriptorDevice, 18
+ 771 usbDescriptorDevice:
+ 772 0032 12 .byte 18
+ 773 0033 01 .byte 1
+ 774 0034 10 .byte 16
+ 775 0035 01 .byte 1
+ 776 0036 FF .byte -1
+ 777 0037 00 .byte 0
+ 778 0038 00 .byte 0
+ 779 0039 08 .byte 8
+ 780 003a C0 .byte -64
+ 781 003b 16 .byte 22
+ 782 003c DC .byte -36
+ 783 003d 05 .byte 5
+ 784 003e 01 .byte 1
+ 785 003f 01 .byte 1
+ 786 0040 01 .byte 1
+ 787 0041 02 .byte 2
+ 788 0042 00 .byte 0
+ 789 0043 01 .byte 1
+ 790 .global usbDescriptorConfiguration
+ 791 .type usbDescriptorConfiguration, @object
+ 792 .size usbDescriptorConfiguration, 18
+ 793 usbDescriptorConfiguration:
+ 794 0044 09 .byte 9
+ 795 0045 02 .byte 2
+ 796 0046 12 .byte 18
+ 797 0047 00 .byte 0
+ 798 0048 01 .byte 1
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 15
+
+
+ 799 0049 01 .byte 1
+ 800 004a 00 .byte 0
+ 801 004b 80 .byte -128
+ 802 004c 32 .byte 50
+ 803 004d 09 .byte 9
+ 804 004e 04 .byte 4
+ 805 004f 00 .byte 0
+ 806 0050 00 .byte 0
+ 807 0051 00 .byte 0
+ 808 0052 00 .byte 0
+ 809 0053 00 .byte 0
+ 810 0054 00 .byte 0
+ 811 0055 00 .byte 0
+ 812 .comm usbMsgPtr,2,1
+ 813 .comm usbRxToken,1,1
+ 814 .comm usbConfiguration,1,1
+ 815 .comm usbRxBuf,22,1
+ 816 .comm usbInputBufOffset,1,1
+ 817 .comm usbDeviceAddr,1,1
+ 818 .comm usbNewDeviceAddr,1,1
+ 819 .comm usbRxLen,1,1
+ 820 .comm usbCurrentTok,1,1
+ 821 .comm usbTxBuf,11,1
+ 822 .lcomm events,1
+ 823 .lcomm currentAddress,2
+ 824 .lcomm vectorTemp,4
+ 825 .lcomm didWriteSomething,1
+ 826 .data
+ 827 .type usbMsgLen, @object
+ 828 .size usbMsgLen, 1
+ 829 usbMsgLen:
+ 830 0001 FF .byte -1
+ 831 .lcomm usbMsgFlags,1
+ 832 .type replyBuffer.1744, @object
+ 833 .size replyBuffer.1744, 4
+ 834 replyBuffer.1744:
+ 835 0002 16 .byte 22
+ 836 0003 FE .byte -2
+ 837 0004 40 .byte 64
+ 838 0005 14 .byte 20
+ 839 .lcomm wasReset.1698,1
+ 840 .global __do_copy_data
+ 841 .global __do_clear_bss
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s page 16
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
DEFINED SYMBOLS
*ABS*:00000000 main.c
+<<<<<<< HEAD
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:2 *ABS*:0000003f __SREG__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:3 *ABS*:0000003e __SP_H__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:4 *ABS*:0000003d __SP_L__
@@ -905,11 +1701,28 @@ DEFINED SYMBOLS
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:121 .text:0000009e fillFlashWithVectors
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:149 .init3:00000000 PushMagicWord
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:173 .text:000000c4 main
+=======
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:2 *ABS*:0000003f __SREG__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:3 *ABS*:0000003e __SP_H__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:4 *ABS*:0000003d __SP_L__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:5 *ABS*:00000034 __CCP__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:6 *ABS*:00000000 __tmp_reg__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:7 *ABS*:00000001 __zero_reg__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:10 .text:00000000 writeFlashPage
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:824 .bss:00000007 didWriteSomething
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:822 .bss:00000001 currentAddress
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:46 .text:00000024 writeWordToPageBuffer
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:823 .bss:00000003 vectorTemp
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:122 .text:000000a0 fillFlashWithVectors
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:150 .init3:00000000 PushMagicWord
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:174 .text:000000c6 main
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
*COM*:00000001 usbRxLen
*COM*:00000001 usbInputBufOffset
*COM*:00000016 usbRxBuf
*COM*:00000001 usbRxToken
*COM*:0000000b usbTxBuf
+<<<<<<< HEAD
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:727 .data:00000000 usbTxLen
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:826 .bss:00000008 usbMsgFlags
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:836 .data:00000002 replyBuffer.1745
@@ -926,6 +1739,23 @@ DEFINED SYMBOLS
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:830 .data:00000001 usbMsgLen
*COM*:00000001 usbDeviceAddr
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccJsE5nj.s:833 .bss:0000000a wasReset.1698
+=======
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:726 .data:00000000 usbTxLen
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:825 .bss:00000008 usbMsgFlags
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:834 .data:00000002 replyBuffer.1744
+ *COM*:00000002 usbMsgPtr
+ .bss:00000000 events
+ *COM*:00000001 usbNewDeviceAddr
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:771 .progmem.data:00000032 usbDescriptorDevice
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:793 .progmem.data:00000044 usbDescriptorConfiguration
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:732 .progmem.data:00000000 usbDescriptorString0
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:740 .progmem.data:00000004 usbDescriptorStringVendor
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:761 .progmem.data:00000026 usbDescriptorStringDevice
+ *COM*:00000001 usbConfiguration
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:829 .data:00000001 usbMsgLen
+ *COM*:00000001 usbDeviceAddr
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccmLFQh9.s:831 .bss:00000009 wasReset.1698
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
*COM*:00000001 usbCurrentTok
UNDEFINED SYMBOLS
diff --git a/firmware/main.hex b/firmware/main.hex
index ebe2a3c..5a00735 100644
--- a/firmware/main.hex
+++ b/firmware/main.hex
@@ -1,147 +1,147 @@
-:1017000039C057C083C055C054C053C052C051C027
-:1017100050C04FC04EC04DC04CC04BC04AC0040367
-:10172000090422036300720065006100740069000F
-:101730007600650070006F006E0079002E00630077
-:101740006F006D000C03750042006F006F007400A5
-:1017500012011001FF000008C016DC0501010102A2
-:10176000000109021200010100803209040000009A
-:101770000000000011241FBECFE5D2E0DEBFCDBFC8
-:1017800000EB0F9307E00F9310E0A0E6B0E0EAEF64
-:10179000FFE102C005900D92A636B107D9F710E01F
-:1017A000A6E6B0E001C01D92AB39B107E1F7EED17A
-:1017B00022C4A6CFA82FB92F80E090E041E050EAE4
-:1017C000609530E009C02D9182279795879510F09C
-:1017D00084279527305EC8F36F5FA8F30895EADF8A
-:1017E0008D939D930895A6E088279927AA9569F07F
-:1017F0000197E1F3B399FCCFB39BFECF81E099272A
-:10180000A6B3019611F0A871D9F70895CF93CFB779
-:10181000CF93C0915F02C03B21F4C0915E02C730FC
-:1018200021F0CF91CFBFCF916ACFCC27C395B39B87
-:10183000E9F7B39B0BC0B39B09C0B39B07C0B39B35
-:1018400005C0B39B03C0B39B01C0D3C00F92DF930D
-:10185000C0917E00DD27CB57DF4F012EB39B03C025
-:10186000DF910F90E6CF2F930F931F934F932FEF9E
-:101870004F6F06B303FB20F95F933F9350E03BE0CB
-:1018800065C016B30126502953FDC89556B30127EC
-:1018900003FB25F92F7306B3B1F05027102713FB74
-:1018A00026F906B22230F0F000C016B3012703FB80
-:1018B00027F90126502906B22430E8F54F77206831
-:1018C00016B30000F6CF50274F7D206206B2102FCE
-:1018D000000000C006B300265029102713FB26F98C
-:1018E00006B2E2CF4F7B06B3206400C0DACF0126F8
-:1018F0005029187106B269F14E7F2160012F16B38D
-:1019000028C0002650294D7F06B22260102F29C022
-:10191000012650294B7F06B22460012F2DC016B33B
-:1019200001265029477F2860000006B22EC04F7E56
-:1019300006B3206130C0422706B3499300265029E0
-:10194000102706B24FEF13FB20F9297F16B379F267
-:10195000187159F10126502906B2012703FB21F91C
-:10196000237F06B371F2002650293150D0F006B221
-:10197000102713FB22F9277E16B351F201265029B6
-:10198000012703FB06B223F92F7C49F2000006B3BE
-:10199000102713FB24F90026502906B22F7939F2BB
-:1019A00070CF10E21ABF002717C03B503195C31B00
-:1019B000D04010E21ABF0881033CF9F00B34E9F083
-:1019C00020917C001981110F1213EDCF093651F1CE
-:1019D0000D3211F0013E39F7009383003F915F9182
-:1019E0004F911F910F912F91DF910F90CAB7C5FDB5
-:1019F0001DCFCF91CFBFCF91189520918300222387
-:101A000069F310918100112321F5343022F13093D4
-:101A1000810020937D0010917E003BE0311B3093CC
-:101A20007E0019C00091810001309CF40AE53091DC
-:101A3000600034FD11C000936000C1E7D0E010C029
-:101A4000052710E000C021C0052710E0C89508BB9D
-:101A500014C03AE501C032ED032EC0E0D0E032E020
-:101A600017B31861C39A08B317BB58E120E84FEFCA
-:101A700020FF052708BB279517951C3F28F7000076
-:101A80004552B0F720FF0527279508BB17951C3F47
-:101A9000B8F629913A9561F7077E10918200110FEF
-:101AA00008BBC250D04011F010937C0010E21ABF66
-:101AB000086017B3177E402F477E54E05A95F1F720
-:101AC00008BB17BB48BB8ACF81E080936D00F894B8
-:101AD000E0916700F0916800329785E080935700AD
-:101AE000E89507B600FCFDCF789408952091670033
-:101AF000309168002115310589F124303105B1F0AC
-:101B000046E12C3F340739F48091690090916A00D6
-:101B10008E579B4F0DC046E12E3F340749F480910C
-:101B20006B0090916C008D579B4F02C08FE79BEC30
-:101B3000F894E0916700F091680021E00C01209397
-:101B40005700E8951124789480916700909168007F
-:101B500002969093680080936700089581E18093D6
-:101B60005700E895E3CFCF93DF93C0916700D09102
-:101B70006800CF73D0708FEF9FEFB8DF2296C0342C
-:101B8000D105CCF3A1DFDF91CF910895DF93CF93FF
-:101B90000F92CDB7DEB788E10FB6F89481BD11BCC6
-:101BA0000FBEE0E0F0E0859194912BEC8F37920727
-:101BB00041F4E4E0F0E0859194913BEC8F3793079A
-:101BC00009F0D1DF1092680010926700AC9A8BB7D1
-:101BD00080628BBFBB9A8FE49DE2A9E18150904067
-:101BE000A040E1F700C00000BB987894EE24FF24E9
-:101BF00020918100235027FDF3C080917E00ECE00E
-:101C0000F0E0E81BF109EB57FF4F80917D008D322A
-:101C100009F0A3C0283009F0E1C083EC8093710083
-:101C20008AE58093600010926E002081922F90765A
-:101C30008181992321F1882341F482E690E09093F9
-:101C4000800080937F0024E07EC0813069F482812F
-:101C500080936F00848195819093680080936700E2
-:101C600027FD6CC02FEF6BC090916600823011F49D
-:101C7000916001C094609093660020E064C09281FE
-:101C800010927A00882331F410927B008AE790E06A
-:101C900022E04FC0853019F49093820040C0863016
-:101CA000A9F58381813019F480E597E104C0823081
-:101CB00041F482E697E19093800080937F0022E1D7
-:101CC00021C08330F1F4992341F48EE197E19093A0
-:101CD000800080937F0024E015C0913041F482E2BF
-:101CE00097E19093800080937F0022E20BC09230B6
-:101CF00041F484E497E19093800080937F002CE08E
-:101D000001C020E080E480936E001DC0883059F04F
-:101D1000893019F49093840002C08A3039F08AE740
-:101D200090E020E006C084E890E002C08AE790E0FE
-:101D300021E09093800080937F0005C0268180E899
-:101D400080936E0007C08781882321F486818217E3
-:101D500008F4282F2093610041C080916E0087FF16
-:101D60003DC080916F00821B80936F008F01809136
-:101D7000670090916800009749F4D8018D919C917B
-:101D8000119790936A008093690014C08430910584
-:101D900041F4F8018081918190936C0080936B00F5
-:101DA00009C0F6E18A3F9F0728F081E18093570040
-:101DB000E89509C0D8018D919D918D01298396DE0A
-:101DC00029812250A1F680916F00882339F48091F7
-:101DD000660082608093660010926100109281001C
-:101DE0008091600084FF47C0809161008F3F09F4BB
-:101DF00042C0082F893008F008E0801B8093610002
-:101E00008091710098E8892780937100002339F14F
-:101E1000E0917F00F091800090916E00802F8150C2
-:101E200096FF0CC090E08D589F4FA2E7B0E0249140
-:101E30002D933196A817B907D1F70DC09F0190E0F7
-:101E40008D589F4FA2E7B0E0F90141919F014D935A
-:101E5000A817B907C9F7F0938000E0937F0082E7E5
-:101E600090E0602FBCDC0C5F0C3019F08FEF80939A
-:101E700061000093600084E196B3987131F4815061
-:101E8000D9F71092820010927C0001E0811100E0ED
-:101E900080917000801739F0002319F4F89471D004
-:101EA0007894009370008CE991E00197F1F70000BD
-:101EB00080916600882321F40894E11CF11C02C083
-:101EC000EE24FF2480FF20C080EC96E113C0F8943C
-:101ED000E0916700F091680083E080935700E895F7
-:101EE00007B600FCFDCF7894809167009091680060
-:101EF00080549040909368008093670080916700C1
-:101F000090916800009719F78091660081FF11C0D9
-:101F1000A9E3B0E21197F1F700C0000080916700DB
-:101F2000909168008F739070009711F01CDE01C0D3
-:101F3000CBDD8091660082FD05C0B1E5EB16B3EC08
-:101F4000FB06E0F0E1E2F1EA3197F1F700C00000B2
-:101F5000F8941BBE15BA80916D00882311F409C056
-:101F600002DE8091670090916800F7E180309F0762
-:101F7000B8F310925F0210925E02C0CB109266001E
-:101F800037CEFF920F931F93CF93DF93C8E0D0E03B
-:101F900010E000E8F12EF00EF1BE25DC29E08433DC
-:101FA00092070CF41F2D06952197A1F7212F2150A0
-:101FB00021BFEC01012F10C016DC8453994097FF1C
-:101FC00003C0909581959F4F8C179D0714F401B71E
-:101FD000EC0181B78F5F81BF21B730E0812F90E0A6
-:101FE00001968217930744F701BFDF91CF911F91AC
-:0A1FF0000F91FF900895F894FFCFC1
-:061FFA005AFF16FA401424
-:0400000300001700E2
+:1017040039C057C083C055C054C053C052C051C023
+:1017140050C04FC04EC04DC04CC04BC04AC0040363
+:10172400090422036300720065006100740069000B
+:101734007600650070006F006E0079002E00630073
+:101744006F006D000C03750042006F006F007400A1
+:1017540012011001FF000008C016DC05010101029E
+:101764000001090212000101008032090400000096
+:101774000000000011241FBECFE5D2E0DEBFCDBFC4
+:1017840000EB0F9307E00F9310E0A0E6B0E0E8EF62
+:10179400FFE102C005900D92A636B107D9F710E01B
+:1017A400A6E6B0E001C01D92AA39B107E1F7EFD176
+:1017B4001FC4A6CFA82FB92F80E090E041E050EAE3
+:1017C400609530E009C02D9182279795879510F098
+:1017D40084279527305EC8F36F5FA8F30895EADF86
+:1017E4008D939D930895A6E088279927AA9569F07B
+:1017F4000197E1F3B399FCCFB39BFECF81E0992726
+:10180400A6B3019611F0A871D9F70895CF93CFB775
+:10181400CF93C0915F02C03B21F4C0915E02C730F8
+:1018240021F0CF91CFBFCF916ACFCC27C395B39B83
+:10183400E9F7B39B0BC0B39B09C0B39B07C0B39B31
+:1018440005C0B39B03C0B39B01C0D3C00F92DF9309
+:10185400C0917D00DD27CC57DF4F012EB39B03C021
+:10186400DF910F90E6CF2F930F931F934F932FEF9A
+:101874004F6F06B303FB20F95F933F9350E03BE0C7
+:1018840065C016B30126502953FDC89556B30127E8
+:1018940003FB25F92F7306B3B1F05027102713FB70
+:1018A40026F906B22230F0F000C016B3012703FB7C
+:1018B40027F90126502906B22430E8F54F7720682D
+:1018C40016B30000F6CF50274F7D206206B2102FCA
+:1018D400000000C006B300265029102713FB26F988
+:1018E40006B2E2CF4F7B06B3206400C0DACF0126F4
+:1018F4005029187106B269F14E7F2160012F16B389
+:1019040028C0002650294D7F06B22260102F29C01E
+:10191400012650294B7F06B22460012F2DC016B337
+:1019240001265029477F2860000006B22EC04F7E52
+:1019340006B3206130C0422706B3499300265029DC
+:10194400102706B24FEF13FB20F9297F16B379F263
+:10195400187159F10126502906B2012703FB21F918
+:10196400237F06B371F2002650293150D0F006B21D
+:10197400102713FB22F9277E16B351F201265029B2
+:10198400012703FB06B223F92F7C49F2000006B3BA
+:10199400102713FB24F90026502906B22F7939F2B7
+:1019A40070CF10E21ABF002717C03B503195C31BFC
+:1019B400D04010E21ABF0881033CF9F00B34E9F07F
+:1019C40020917B001981110F1213EDCF093651F1CB
+:1019D4000D3211F0013E39F7009382003F915F917F
+:1019E4004F911F910F912F91DF910F90CAB7C5FDB1
+:1019F4001DCFCF91CFBFCF91189520918200222384
+:101A040069F310918000112321F5343022F13093D1
+:101A1400800020937C0010917D003BE0311B3093CB
+:101A24007D0019C00091800001309CF40AE53091DA
+:101A3400600034FD11C000936000C0E7D0E010C026
+:101A4400052710E000C021C0052710E0C89508BB99
+:101A540014C03AE501C032ED032EC0E0D0E032E01C
+:101A640017B31861C39A08B317BB58E120E84FEFC6
+:101A740020FF052708BB279517951C3F28F7000072
+:101A84004552B0F720FF0527279508BB17951C3F43
+:101A9400B8F629913A9561F7077E10918100110FEC
+:101AA40008BBC250D04011F010937B0010E21ABF63
+:101AB400086017B3177E402F477E54E05A95F1F71C
+:101AC40008BB17BB48BB8ACF81E080936D00F894B4
+:101AD400E0916700F0916800329785E080935700A9
+:101AE400E89507B600FCFDCF78940895209167002F
+:101AF4003091680021153105C9F024303105B1F069
+:101B040047E12030340739F48091690090916A00EC
+:101B140080589B4F0DC047E12230340749F480912F
+:101B24006B0090916C008F579B4F02C081E89BEC37
+:101B3400F894E0916700F0916800309721F421E176
+:101B440020935700E89521E00C0120935700E89575
+:101B54001124789480916700909168000296909384
+:101B64006800809367000895CF93DF93C091670066
+:101B7400D0916800CF73D0708FEF9FEFB7DF2296BC
+:101B8400C034D105CCF3A0DFDF91CF910895DF936A
+:101B9400CF930F92CDB7DEB788E10FB6F89481BD2D
+:101BA40011BC0FBEE0E0F0E0859194912BEC8138FC
+:101BB400920741F4E4E0F0E0859194913BEC8138A4
+:101BC400930709F0D1DF1092680010926700AC9A75
+:101BD4008BB780628BBFBB9A8FE49DE2A9E18150F1
+:101BE4009040A040E1F700C00000BB987894EE2438
+:101BF400FF2420918000235027FDEFC080917D00B9
+:101C0400ECE0F0E0E81BF109EC57FF4F80917C0019
+:101C14008D3209F0A0C0283009F0DDC083EC809338
+:101C240070008AE58093600010926E002081922FEC
+:101C340090768181992309F1882341F482E690E02A
+:101C440090937F0080937E0024E07BC0813051F428
+:101C540084819581909368008093670027FD6CC010
+:101C64002FEF6BC090916600823011F4916001C037
+:101C740094609093660020E064C092811092790091
+:101C8400882331F410927A0089E790E022E04FC073
+:101C9400853019F49093810040C08630A9F5838182
+:101CA400813019F484E597E104C0823041F486E67A
+:101CB40097E190937F0080937E0022E121C08330DE
+:101CC400F1F4992341F482E297E190937F008093A9
+:101CD4007E0024E015C0913041F486E297E19093B0
+:101CE4007F0080937E0022E20BC0923041F488E4AE
+:101CF40097E190937F0080937E002CE001C020E068
+:101D040080E480936E001DC0883059F0893019F446
+:101D14009093830002C08A3039F089E790E020E094
+:101D240006C083E890E002C089E790E021E0909348
+:101D34007F0080937E0005C0268180E880936E003A
+:101D440007C08781882321F48681821708F4282F0D
+:101D54002093610040C080916E0087FF3CC08F01DA
+:101D64008091670090916800009749F4D8018D91A3
+:101D74009C91119790936A008093690014C08430F9
+:101D8400910541F4F8018081918190936C008093D6
+:101D94006B0009C0F6E18E3F9F0728F081E1809334
+:101DA4005700E89509C0D8018D919D918D01298333
+:101DB4009DDE29812250A1F68091670090916800F0
+:101DC4008F739070009739F48091660082608093DD
+:101DD400660010926100109280008091600084FF80
+:101DE40047C0809161008F3F09F442C0082F8930B9
+:101DF40008F008E0801B809361008091700098E8EF
+:101E0400892780937000002339F1E0917E00F091DE
+:101E14007F0090916E00802F815096FF0CC090E05F
+:101E24008E589F4FA1E7B0E024912D933196A817C7
+:101E3400B907D1F70DC09F0190E08E589F4FA1E7DD
+:101E4400B0E0F90141919F014D93A817B907C9F773
+:101E5400F0937F00E0937E0081E790E0602FBFDC89
+:101E64000C5F0C3019F08FEF8093610000936000D9
+:101E740084E196B3987131F48150D9F710928100BE
+:101E840010927B0001E0811100E080916F008017C7
+:101E940039F0002319F4F89471D0789400936F000A
+:101EA4008CE991E00197F1F70000809166008823A6
+:101EB40021F40894E11CF11C02C0EE24FF2480FFED
+:101EC40020C084EC96E113C0F894E0916700F0918F
+:101ED400680083E080935700E89507B600FCFDCFC7
+:101EE400789480916700909168008054904090931A
+:101EF4006800809367008091670090916800009764
+:101F040019F78091660081FF11C0A9E3B0E211972F
+:101F1400F1F700C0000080916700909168008F7312
+:101F24009070009711F020DE01C0CEDD8091660034
+:101F340082FD05C0B1E5EB16B3ECFB06E0F0E1E28F
+:101F4400F1EA3197F1F700C00000F8941BBE15BA0E
+:101F540080916D00882311F409C006DE809167002A
+:101F640090916800F7E184309F07B8F310925F0204
+:101F740010925E02C3CB109266003BCEFF920F9389
+:101F84001F93CF93DF93C8E0D0E010E000E8F12E78
+:101F9400F00EF1BE28DC29E0843392070CF41F2DE7
+:101FA40006952197A1F7212F215021BFEC01012F84
+:101FB40010C019DC8453994097FF03C09095819514
+:101FC4009F4F8C179D0714F401B7EC0181B78F5F05
+:101FD40081BF21B730E0812F90E0019682179307EB
+:101FE40044F701BFDF91CF911F910F91FF900895A6
+:041FF400F894FFCF8F
+:061FF8005AFF16FE401422
+:0400000300001704DE
:00000001FF
diff --git a/firmware/main.map b/firmware/main.map
index fd83c87..932fc83 100644
--- a/firmware/main.map
+++ b/firmware/main.map
@@ -63,7 +63,7 @@ LOAD usbdrv/usbdrvasm.o
LOAD usbdrv/oddebug.o
LOAD main.o
LOAD libs-device/osccal.o
-Address of section .text set to 0x1700
+Address of section .text set to 0x1704
LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/libc.a
LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
@@ -158,56 +158,56 @@ LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
.rela.plt
*(.rela.plt)
-.text 0x00001700 0x8fa
+.text 0x00001704 0x8f4
*(.vectors)
- .vectors 0x00001700 0x1e /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
- 0x00001700 __vectors
- 0x00001700 __vector_default
+ .vectors 0x00001704 0x1e /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
+ 0x00001704 __vectors
+ 0x00001704 __vector_default
*(.vectors)
*(.progmem.gcc*)
*(.progmem*)
- .progmem.data 0x0000171e 0x56 main.o
- 0x0000171e usbDescriptorString0
- 0x00001722 usbDescriptorStringVendor
- 0x00001744 usbDescriptorStringDevice
- 0x00001750 usbDescriptorDevice
- 0x00001762 usbDescriptorConfiguration
- 0x00001774 . = ALIGN (0x2)
- 0x00001774 __trampolines_start = .
+ .progmem.data 0x00001722 0x56 main.o
+ 0x00001722 usbDescriptorString0
+ 0x00001726 usbDescriptorStringVendor
+ 0x00001748 usbDescriptorStringDevice
+ 0x00001754 usbDescriptorDevice
+ 0x00001766 usbDescriptorConfiguration
+ 0x00001778 . = ALIGN (0x2)
+ 0x00001778 __trampolines_start = .
*(.trampolines)
- .trampolines 0x00001774 0x0 linker stubs
+ .trampolines 0x00001778 0x0 linker stubs
*(.trampolines*)
- 0x00001774 __trampolines_end = .
+ 0x00001778 __trampolines_end = .
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
- 0x00001774 __ctors_start = .
+ 0x00001778 __ctors_start = .
*(.ctors)
- 0x00001774 __ctors_end = .
- 0x00001774 __dtors_start = .
+ 0x00001778 __ctors_end = .
+ 0x00001778 __dtors_start = .
*(.dtors)
- 0x00001774 __dtors_end = .
+ 0x00001778 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
- .init0 0x00001774 0x0 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
- 0x00001774 __init
+ .init0 0x00001778 0x0 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
+ 0x00001778 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
- .init2 0x00001774 0xc /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
+ .init2 0x00001778 0xc /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
*(.init2)
*(.init3)
- .init3 0x00001780 0x8 main.o
- 0x00001780 PushMagicWord
+ .init3 0x00001784 0x8 main.o
+ 0x00001784 PushMagicWord
*(.init3)
*(.init4)
- .init4 0x00001788 0x16 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_copy_data.o)
- 0x00001788 __do_copy_data
- .init4 0x0000179e 0x10 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_clear_bss.o)
- 0x0000179e __do_clear_bss
+ .init4 0x0000178c 0x16 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_copy_data.o)
+ 0x0000178c __do_copy_data
+ .init4 0x000017a2 0x10 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_clear_bss.o)
+ 0x000017a2 __do_clear_bss
*(.init4)
*(.init5)
*(.init5)
@@ -218,40 +218,40 @@ LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
*(.init8)
*(.init8)
*(.init9)
- .init9 0x000017ae 0x4 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
+ .init9 0x000017b2 0x4 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
*(.init9)
*(.text)
- .text 0x000017b2 0x2 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
- 0x000017b2 __vector_10
- 0x000017b2 __vector_12
- 0x000017b2 __bad_interrupt
- 0x000017b2 __vector_6
- 0x000017b2 __vector_3
- 0x000017b2 __vector_11
- 0x000017b2 __vector_13
- 0x000017b2 __vector_7
- 0x000017b2 __vector_5
- 0x000017b2 __vector_4
- 0x000017b2 __vector_9
- 0x000017b2 __vector_8
- 0x000017b2 __vector_14
- 0x000017b2 __vector_1
- .text 0x000017b4 0x314 usbdrv/usbdrvasm.o
- 0x000017b4 usbCrc16
- 0x000017de usbCrc16Append
- 0x000017e6 usbMeasureFrameLength
- 0x0000180c __vector_2
- .text 0x00001ac8 0x4ba main.o
- 0x00001b8c main
- .text 0x00001f82 0x74 libs-device/osccal.o
- 0x00001f82 calibrateOscillator
- 0x00001ff6 . = ALIGN (0x2)
+ .text 0x000017b6 0x2 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/lib/avr25/crttn85.o
+ 0x000017b6 __vector_10
+ 0x000017b6 __vector_12
+ 0x000017b6 __bad_interrupt
+ 0x000017b6 __vector_6
+ 0x000017b6 __vector_3
+ 0x000017b6 __vector_11
+ 0x000017b6 __vector_13
+ 0x000017b6 __vector_7
+ 0x000017b6 __vector_5
+ 0x000017b6 __vector_4
+ 0x000017b6 __vector_9
+ 0x000017b6 __vector_8
+ 0x000017b6 __vector_14
+ 0x000017b6 __vector_1
+ .text 0x000017b8 0x314 usbdrv/usbdrvasm.o
+ 0x000017b8 usbCrc16
+ 0x000017e2 usbCrc16Append
+ 0x000017ea usbMeasureFrameLength
+ 0x00001810 __vector_2
+ .text 0x00001acc 0x4b4 main.o
+ 0x00001b92 main
+ .text 0x00001f80 0x74 libs-device/osccal.o
+ 0x00001f80 calibrateOscillator
+ 0x00001ff4 . = ALIGN (0x2)
*(.text.*)
- 0x00001ff6 . = ALIGN (0x2)
+ 0x00001ff4 . = ALIGN (0x2)
*(.fini9)
- .fini9 0x00001ff6 0x0 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_exit.o)
- 0x00001ff6 exit
- 0x00001ff6 _exit
+ .fini9 0x00001ff4 0x0 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_exit.o)
+ 0x00001ff4 exit
+ 0x00001ff4 _exit
*(.fini9)
*(.fini8)
*(.fini8)
@@ -270,11 +270,11 @@ LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
*(.fini1)
*(.fini1)
*(.fini0)
- .fini0 0x00001ff6 0x4 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_exit.o)
+ .fini0 0x00001ff4 0x4 /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a(_exit.o)
*(.fini0)
- 0x00001ffa _etext = .
+ 0x00001ff8 _etext = .
-.data 0x00800060 0x6 load address 0x00001ffa
+.data 0x00800060 0x6 load address 0x00001ff8
0x00800060 PROVIDE (__data_start, .)
*(.data)
.data 0x00800060 0x6 main.o
@@ -287,33 +287,33 @@ LOAD /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/avr25/libgcc.a
0x00800066 _edata = .
0x00800066 PROVIDE (__data_end, .)
-.bss 0x00800066 0x35
+.bss 0x00800066 0x34
0x00800066 PROVIDE (__bss_start, .)
*(.bss)
- .bss 0x00800066 0xb main.o
+ .bss 0x00800066 0xa main.o
*(.bss*)
*(COMMON)
- COMMON 0x00800071 0x2a main.o
- 0x00800071 usbTxBuf
- 0x0080007c usbDeviceAddr
- 0x0080007d usbRxToken
- 0x0080007e usbInputBufOffset
- 0x0080007f usbMsgPtr
- 0x00800081 usbRxLen
- 0x00800082 usbNewDeviceAddr
- 0x00800083 usbCurrentTok
- 0x00800084 usbConfiguration
- 0x00800085 usbRxBuf
- 0x0080009b PROVIDE (__bss_end, .)
- 0x00001ffa __data_load_start = LOADADDR (.data)
- 0x00002000 __data_load_end = (__data_load_start + SIZEOF (.data))
-
-.noinit 0x0080009b 0x0
- 0x0080009b PROVIDE (__noinit_start, .)
+ COMMON 0x00800070 0x2a main.o
+ 0x00800070 usbTxBuf
+ 0x0080007b usbDeviceAddr
+ 0x0080007c usbRxToken
+ 0x0080007d usbInputBufOffset
+ 0x0080007e usbMsgPtr
+ 0x00800080 usbRxLen
+ 0x00800081 usbNewDeviceAddr
+ 0x00800082 usbCurrentTok
+ 0x00800083 usbConfiguration
+ 0x00800084 usbRxBuf
+ 0x0080009a PROVIDE (__bss_end, .)
+ 0x00001ff8 __data_load_start = LOADADDR (.data)
+ 0x00001ffe __data_load_end = (__data_load_start + SIZEOF (.data))
+
+.noinit 0x0080009a 0x0
+ 0x0080009a PROVIDE (__noinit_start, .)
*(.noinit*)
- 0x0080009b PROVIDE (__noinit_end, .)
- 0x0080009b _end = .
- 0x0080009b PROVIDE (__heap_start, .)
+ 0x0080009a PROVIDE (__noinit_end, .)
+ 0x0080009a _end = .
+ 0x0080009a PROVIDE (__heap_start, .)
.eeprom 0x00810000 0x0
*(.eeprom*)
diff --git a/firmware/main.o b/firmware/main.o
index de18981..59c1fa6 100644
--- a/firmware/main.o
+++ b/firmware/main.o
Binary files differ
diff --git a/firmware/temp-dump.bin b/firmware/temp-dump.bin
index e7c029c..7bd0b86 100644
--- a/firmware/temp-dump.bin
+++ b/firmware/temp-dump.bin
Binary files differ
diff --git a/firmware/upload.rb b/firmware/upload.rb
index c245bb6..7faa19f 100644
--- a/firmware/upload.rb
+++ b/firmware/upload.rb
@@ -31,8 +31,13 @@ class MicroBoot
@info = {
flash_length: flash_length,
page_size: page_size,
+<<<<<<< HEAD
write_sleep: write_sleep.to_f / 1000.0,
pages: (flash_length.to_f / page_size.to_f).ceil,
+=======
+ pages: (flash_length.to_f / page_size.to_f).ceil,
+ write_sleep: write_sleep.to_f / 1000.0,
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
version: "#{@device.bcdDevice >> 8}.#{@device.bcdDevice & 0xFF}",
version_numeric: @device.bcdDevice
}
@@ -45,9 +50,15 @@ class MicroBoot
info = self.info
control_transfer(function: :erase_application)
+<<<<<<< HEAD
info[:pages].times do |index|
puts "Erasing: #{((index.to_f / info[:pages].to_f) * 100.0).round}%" if index % 5 == 0
sleep(info[:write_sleep]) # sleep for as many pages as the chip has
+=======
+ # sleep for long enough for application to completely erase
+ info[:pages].times do
+ sleep(info[:write_sleep])
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
end
end
diff --git a/firmware/usbdrv/oddebug.c.lst b/firmware/usbdrv/oddebug.c.lst
index 0bd953e..09c11d6 100644
--- a/firmware/usbdrv/oddebug.c.lst
+++ b/firmware/usbdrv/oddebug.c.lst
@@ -1,4 +1,8 @@
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s page 1
+=======
+GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s page 1
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
1 .file "oddebug.c"
@@ -8,16 +12,29 @@ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s page
5 __CCP__ = 0x34
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
+<<<<<<< HEAD
GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s page 2
+=======
+ GAS LISTING /var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s page 2
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
DEFINED SYMBOLS
*ABS*:00000000 oddebug.c
+<<<<<<< HEAD
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:2 *ABS*:0000003f __SREG__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:3 *ABS*:0000003e __SP_H__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:4 *ABS*:0000003d __SP_L__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:5 *ABS*:00000034 __CCP__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:6 *ABS*:00000000 __tmp_reg__
/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccpdcMtI.s:7 *ABS*:00000001 __zero_reg__
+=======
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:2 *ABS*:0000003f __SREG__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:3 *ABS*:0000003e __SP_H__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:4 *ABS*:0000003d __SP_L__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:5 *ABS*:00000034 __CCP__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:6 *ABS*:00000000 __tmp_reg__
+/var/folders/nd/dq8cd7_x03d_z3x899kwf__80000gn/T//ccHqVECK.s:7 *ABS*:00000001 __zero_reg__
+>>>>>>> f6c4c6f65e540aa373199fd6e6f99dea43d68ce6
NO UNDEFINED SYMBOLS