You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
685 lines
20 KiB
685 lines
20 KiB
|
|
comand_parser.elf: file format elf32-avr
|
|
|
|
Sections:
|
|
Idx Name Size VMA LMA File off Algn
|
|
0 .data 0000002a 00800100 000003dc 00000470 2**0
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
1 .text 000003dc 00000000 00000000 00000094 2**1
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
2 .bss 00000066 0080012a 0080012a 0000049a 2**0
|
|
ALLOC
|
|
3 .comment 00000030 00000000 00000000 0000049a 2**0
|
|
CONTENTS, READONLY
|
|
4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000004cc 2**2
|
|
CONTENTS, READONLY
|
|
5 .debug_aranges 00000198 00000000 00000000 0000050c 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
6 .debug_info 00000fa7 00000000 00000000 000006a4 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
7 .debug_abbrev 000008a7 00000000 00000000 0000164b 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
8 .debug_line 00000889 00000000 00000000 00001ef2 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
9 .debug_frame 000003e0 00000000 00000000 0000277c 2**2
|
|
CONTENTS, READONLY, DEBUGGING
|
|
10 .debug_str 000008f8 00000000 00000000 00002b5c 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
11 .debug_loc 000004aa 00000000 00000000 00003454 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
12 .debug_ranges 00000168 00000000 00000000 000038fe 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
Disassembly of section .text:
|
|
|
|
00000000 <__vectors>:
|
|
0: 0c 94 34 00 jmp 0x68 ; 0x68 <__ctors_end>
|
|
4: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
8: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
10: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
14: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
18: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
1c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
20: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
24: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
28: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
2c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
30: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
34: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
38: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
3c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
40: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
44: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
48: 0c 94 ca 00 jmp 0x194 ; 0x194 <__vector_18>
|
|
4c: 0c 94 f1 00 jmp 0x1e2 ; 0x1e2 <__vector_19>
|
|
50: 0c 94 18 01 jmp 0x230 ; 0x230 <__vector_20>
|
|
54: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
58: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
5c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
60: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
64: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
|
|
|
00000068 <__ctors_end>:
|
|
68: 11 24 eor r1, r1
|
|
6a: 1f be out 0x3f, r1 ; 63
|
|
6c: cf ef ldi r28, 0xFF ; 255
|
|
6e: d8 e0 ldi r29, 0x08 ; 8
|
|
70: de bf out 0x3e, r29 ; 62
|
|
72: cd bf out 0x3d, r28 ; 61
|
|
|
|
00000074 <__do_copy_data>:
|
|
74: 11 e0 ldi r17, 0x01 ; 1
|
|
76: a0 e0 ldi r26, 0x00 ; 0
|
|
78: b1 e0 ldi r27, 0x01 ; 1
|
|
7a: ec ed ldi r30, 0xDC ; 220
|
|
7c: f3 e0 ldi r31, 0x03 ; 3
|
|
7e: 02 c0 rjmp .+4 ; 0x84 <__do_copy_data+0x10>
|
|
80: 05 90 lpm r0, Z+
|
|
82: 0d 92 st X+, r0
|
|
84: aa 32 cpi r26, 0x2A ; 42
|
|
86: b1 07 cpc r27, r17
|
|
88: d9 f7 brne .-10 ; 0x80 <__do_copy_data+0xc>
|
|
|
|
0000008a <__do_clear_bss>:
|
|
8a: 21 e0 ldi r18, 0x01 ; 1
|
|
8c: aa e2 ldi r26, 0x2A ; 42
|
|
8e: b1 e0 ldi r27, 0x01 ; 1
|
|
90: 01 c0 rjmp .+2 ; 0x94 <.do_clear_bss_start>
|
|
|
|
00000092 <.do_clear_bss_loop>:
|
|
92: 1d 92 st X+, r1
|
|
|
|
00000094 <.do_clear_bss_start>:
|
|
94: a0 39 cpi r26, 0x90 ; 144
|
|
96: b2 07 cpc r27, r18
|
|
98: e1 f7 brne .-8 ; 0x92 <.do_clear_bss_loop>
|
|
9a: 0e 94 a9 01 call 0x352 ; 0x352 <main>
|
|
9e: 0c 94 ec 01 jmp 0x3d8 ; 0x3d8 <_exit>
|
|
|
|
000000a2 <__bad_interrupt>:
|
|
a2: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
|
|
|
000000a6 <ledInit>:
|
|
#include "entryf.h"
|
|
#include <avr/io.h>
|
|
|
|
void ledInit()
|
|
{
|
|
DDRB |= (1 << PINB5);
|
|
a6: 25 9a sbi 0x04, 5 ; 4
|
|
PORTB &= ~(1 << PINB5);
|
|
a8: 2d 98 cbi 0x05, 5 ; 5
|
|
aa: 08 95 ret
|
|
|
|
000000ac <toggleLed>:
|
|
}
|
|
|
|
void toggleLed()
|
|
{
|
|
PORTB ^= (1 << PINB5);
|
|
ac: 95 b1 in r25, 0x05 ; 5
|
|
ae: 80 e2 ldi r24, 0x20 ; 32
|
|
b0: 89 27 eor r24, r25
|
|
b2: 85 b9 out 0x05, r24 ; 5
|
|
b4: 08 95 ret
|
|
|
|
000000b6 <turnOnLed>:
|
|
}
|
|
|
|
void turnOnLed()
|
|
{
|
|
PORTB |= (1 << PINB5);
|
|
b6: 2d 9a sbi 0x05, 5 ; 5
|
|
b8: 08 95 ret
|
|
|
|
000000ba <turnOffLed>:
|
|
}
|
|
|
|
void turnOffLed()
|
|
{
|
|
PORTB &= ~(1 << PINB5);
|
|
ba: 2d 98 cbi 0x05, 5 ; 5
|
|
bc: 08 95 ret
|
|
|
|
000000be <dummy>:
|
|
}
|
|
|
|
void hal_USART_unregisterTXCallback()
|
|
{
|
|
UCSR0B &= ~(1 << TXCIE0);
|
|
txCallback = dummy;
|
|
be: 08 95 ret
|
|
|
|
000000c0 <hal_USART_readDataReg>:
|
|
c0: 80 91 c6 00 lds r24, 0x00C6 ; 0x8000c6 <__TEXT_REGION_LENGTH__+0x7e00c6>
|
|
c4: 08 95 ret
|
|
|
|
000000c6 <hal_USART_RxEnable>:
|
|
c6: e1 ec ldi r30, 0xC1 ; 193
|
|
c8: f0 e0 ldi r31, 0x00 ; 0
|
|
ca: 80 81 ld r24, Z
|
|
cc: 80 61 ori r24, 0x10 ; 16
|
|
ce: 80 83 st Z, r24
|
|
d0: 08 95 ret
|
|
|
|
000000d2 <hal_USART_TxEnable>:
|
|
d2: e1 ec ldi r30, 0xC1 ; 193
|
|
d4: f0 e0 ldi r31, 0x00 ; 0
|
|
d6: 80 81 ld r24, Z
|
|
d8: 88 60 ori r24, 0x08 ; 8
|
|
da: 80 83 st Z, r24
|
|
dc: 08 95 ret
|
|
|
|
000000de <hal_USART_setCharSize>:
|
|
de: e1 ec ldi r30, 0xC1 ; 193
|
|
e0: f0 e0 ldi r31, 0x00 ; 0
|
|
e2: 90 81 ld r25, Z
|
|
e4: 9b 7f andi r25, 0xFB ; 251
|
|
e6: 90 83 st Z, r25
|
|
e8: e2 ec ldi r30, 0xC2 ; 194
|
|
ea: f0 e0 ldi r31, 0x00 ; 0
|
|
ec: 90 81 ld r25, Z
|
|
ee: 99 7f andi r25, 0xF9 ; 249
|
|
f0: 90 83 st Z, r25
|
|
f2: 90 81 ld r25, Z
|
|
f4: 83 70 andi r24, 0x03 ; 3
|
|
f6: 88 0f add r24, r24
|
|
f8: 98 2b or r25, r24
|
|
fa: 90 83 st Z, r25
|
|
fc: 08 95 ret
|
|
|
|
000000fe <hal_USART_setBaudRate>:
|
|
fe: dc 01 movw r26, r24
|
|
100: cb 01 movw r24, r22
|
|
102: 88 0f add r24, r24
|
|
104: 99 1f adc r25, r25
|
|
106: aa 1f adc r26, r26
|
|
108: bb 1f adc r27, r27
|
|
10a: 88 0f add r24, r24
|
|
10c: 99 1f adc r25, r25
|
|
10e: aa 1f adc r26, r26
|
|
110: bb 1f adc r27, r27
|
|
112: 9c 01 movw r18, r24
|
|
114: ad 01 movw r20, r26
|
|
116: 22 0f add r18, r18
|
|
118: 33 1f adc r19, r19
|
|
11a: 44 1f adc r20, r20
|
|
11c: 55 1f adc r21, r21
|
|
11e: 22 0f add r18, r18
|
|
120: 33 1f adc r19, r19
|
|
122: 44 1f adc r20, r20
|
|
124: 55 1f adc r21, r21
|
|
126: 60 e0 ldi r22, 0x00 ; 0
|
|
128: 74 e2 ldi r23, 0x24 ; 36
|
|
12a: 84 ef ldi r24, 0xF4 ; 244
|
|
12c: 90 e0 ldi r25, 0x00 ; 0
|
|
12e: 0e 94 c1 01 call 0x382 ; 0x382 <__udivmodsi4>
|
|
132: 8f ef ldi r24, 0xFF ; 255
|
|
134: 82 0f add r24, r18
|
|
136: 80 93 c4 00 sts 0x00C4, r24 ; 0x8000c4 <__TEXT_REGION_LENGTH__+0x7e00c4>
|
|
13a: da 01 movw r26, r20
|
|
13c: c9 01 movw r24, r18
|
|
13e: 01 97 sbiw r24, 0x01 ; 1
|
|
140: a1 09 sbc r26, r1
|
|
142: b1 09 sbc r27, r1
|
|
144: 89 2f mov r24, r25
|
|
146: 9a 2f mov r25, r26
|
|
148: ab 2f mov r26, r27
|
|
14a: bb 27 eor r27, r27
|
|
14c: 80 93 c5 00 sts 0x00C5, r24 ; 0x8000c5 <__TEXT_REGION_LENGTH__+0x7e00c5>
|
|
150: 08 95 ret
|
|
|
|
00000152 <hal_USART_registerRxCallback>:
|
|
152: 90 93 05 01 sts 0x0105, r25 ; 0x800105 <rxCallback+0x1>
|
|
156: 80 93 04 01 sts 0x0104, r24 ; 0x800104 <rxCallback>
|
|
15a: e1 ec ldi r30, 0xC1 ; 193
|
|
15c: f0 e0 ldi r31, 0x00 ; 0
|
|
15e: 80 81 ld r24, Z
|
|
160: 80 68 ori r24, 0x80 ; 128
|
|
162: 80 83 st Z, r24
|
|
164: 08 95 ret
|
|
|
|
00000166 <hal_USART_putc>:
|
|
|
|
void hal_USART_putc(const char send)
|
|
{
|
|
// Do nothing for a bit if there is already
|
|
// data waiting in the hardware to be sent
|
|
while ((UCSR0A & (1 << UDRE0)) == 0);
|
|
166: e0 ec ldi r30, 0xC0 ; 192
|
|
168: f0 e0 ldi r31, 0x00 ; 0
|
|
16a: 90 81 ld r25, Z
|
|
16c: 95 ff sbrs r25, 5
|
|
16e: fd cf rjmp .-6 ; 0x16a <hal_USART_putc+0x4>
|
|
UDR0 = send;
|
|
170: 80 93 c6 00 sts 0x00C6, r24 ; 0x8000c6 <__TEXT_REGION_LENGTH__+0x7e00c6>
|
|
174: 08 95 ret
|
|
|
|
00000176 <hal_USART_puts>:
|
|
}
|
|
|
|
void hal_USART_puts(const char *send)
|
|
{
|
|
176: cf 93 push r28
|
|
178: df 93 push r29
|
|
17a: ec 01 movw r28, r24
|
|
// Cycle through each character individually
|
|
while (*send != '\0')
|
|
17c: 88 81 ld r24, Y
|
|
17e: 88 23 and r24, r24
|
|
180: 31 f0 breq .+12 ; 0x18e <hal_USART_puts+0x18>
|
|
182: 21 96 adiw r28, 0x01 ; 1
|
|
{
|
|
hal_USART_putc(*send++);
|
|
184: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
|
}
|
|
|
|
void hal_USART_puts(const char *send)
|
|
{
|
|
// Cycle through each character individually
|
|
while (*send != '\0')
|
|
188: 89 91 ld r24, Y+
|
|
18a: 81 11 cpse r24, r1
|
|
18c: fb cf rjmp .-10 ; 0x184 <hal_USART_puts+0xe>
|
|
{
|
|
hal_USART_putc(*send++);
|
|
}
|
|
}
|
|
18e: df 91 pop r29
|
|
190: cf 91 pop r28
|
|
192: 08 95 ret
|
|
|
|
00000194 <__vector_18>:
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
ISR (USART_RX_vect)
|
|
{
|
|
194: 1f 92 push r1
|
|
196: 0f 92 push r0
|
|
198: 0f b6 in r0, 0x3f ; 63
|
|
19a: 0f 92 push r0
|
|
19c: 11 24 eor r1, r1
|
|
19e: 2f 93 push r18
|
|
1a0: 3f 93 push r19
|
|
1a2: 4f 93 push r20
|
|
1a4: 5f 93 push r21
|
|
1a6: 6f 93 push r22
|
|
1a8: 7f 93 push r23
|
|
1aa: 8f 93 push r24
|
|
1ac: 9f 93 push r25
|
|
1ae: af 93 push r26
|
|
1b0: bf 93 push r27
|
|
1b2: ef 93 push r30
|
|
1b4: ff 93 push r31
|
|
rxCallback();
|
|
1b6: e0 91 04 01 lds r30, 0x0104 ; 0x800104 <rxCallback>
|
|
1ba: f0 91 05 01 lds r31, 0x0105 ; 0x800105 <rxCallback+0x1>
|
|
1be: 09 95 icall
|
|
}
|
|
1c0: ff 91 pop r31
|
|
1c2: ef 91 pop r30
|
|
1c4: bf 91 pop r27
|
|
1c6: af 91 pop r26
|
|
1c8: 9f 91 pop r25
|
|
1ca: 8f 91 pop r24
|
|
1cc: 7f 91 pop r23
|
|
1ce: 6f 91 pop r22
|
|
1d0: 5f 91 pop r21
|
|
1d2: 4f 91 pop r20
|
|
1d4: 3f 91 pop r19
|
|
1d6: 2f 91 pop r18
|
|
1d8: 0f 90 pop r0
|
|
1da: 0f be out 0x3f, r0 ; 63
|
|
1dc: 0f 90 pop r0
|
|
1de: 1f 90 pop r1
|
|
1e0: 18 95 reti
|
|
|
|
000001e2 <__vector_19>:
|
|
|
|
ISR(USART_UDRE_vect)
|
|
{
|
|
1e2: 1f 92 push r1
|
|
1e4: 0f 92 push r0
|
|
1e6: 0f b6 in r0, 0x3f ; 63
|
|
1e8: 0f 92 push r0
|
|
1ea: 11 24 eor r1, r1
|
|
1ec: 2f 93 push r18
|
|
1ee: 3f 93 push r19
|
|
1f0: 4f 93 push r20
|
|
1f2: 5f 93 push r21
|
|
1f4: 6f 93 push r22
|
|
1f6: 7f 93 push r23
|
|
1f8: 8f 93 push r24
|
|
1fa: 9f 93 push r25
|
|
1fc: af 93 push r26
|
|
1fe: bf 93 push r27
|
|
200: ef 93 push r30
|
|
202: ff 93 push r31
|
|
dataRegEmptyCallback();
|
|
204: e0 91 02 01 lds r30, 0x0102 ; 0x800102 <dataRegEmptyCallback>
|
|
208: f0 91 03 01 lds r31, 0x0103 ; 0x800103 <dataRegEmptyCallback+0x1>
|
|
20c: 09 95 icall
|
|
}
|
|
20e: ff 91 pop r31
|
|
210: ef 91 pop r30
|
|
212: bf 91 pop r27
|
|
214: af 91 pop r26
|
|
216: 9f 91 pop r25
|
|
218: 8f 91 pop r24
|
|
21a: 7f 91 pop r23
|
|
21c: 6f 91 pop r22
|
|
21e: 5f 91 pop r21
|
|
220: 4f 91 pop r20
|
|
222: 3f 91 pop r19
|
|
224: 2f 91 pop r18
|
|
226: 0f 90 pop r0
|
|
228: 0f be out 0x3f, r0 ; 63
|
|
22a: 0f 90 pop r0
|
|
22c: 1f 90 pop r1
|
|
22e: 18 95 reti
|
|
|
|
00000230 <__vector_20>:
|
|
|
|
ISR(USART_TX_vect)
|
|
{
|
|
230: 1f 92 push r1
|
|
232: 0f 92 push r0
|
|
234: 0f b6 in r0, 0x3f ; 63
|
|
236: 0f 92 push r0
|
|
238: 11 24 eor r1, r1
|
|
23a: 2f 93 push r18
|
|
23c: 3f 93 push r19
|
|
23e: 4f 93 push r20
|
|
240: 5f 93 push r21
|
|
242: 6f 93 push r22
|
|
244: 7f 93 push r23
|
|
246: 8f 93 push r24
|
|
248: 9f 93 push r25
|
|
24a: af 93 push r26
|
|
24c: bf 93 push r27
|
|
24e: ef 93 push r30
|
|
250: ff 93 push r31
|
|
txCallback();
|
|
252: e0 91 00 01 lds r30, 0x0100 ; 0x800100 <__data_start>
|
|
256: f0 91 01 01 lds r31, 0x0101 ; 0x800101 <__data_start+0x1>
|
|
25a: 09 95 icall
|
|
25c: ff 91 pop r31
|
|
25e: ef 91 pop r30
|
|
260: bf 91 pop r27
|
|
262: af 91 pop r26
|
|
264: 9f 91 pop r25
|
|
266: 8f 91 pop r24
|
|
268: 7f 91 pop r23
|
|
26a: 6f 91 pop r22
|
|
26c: 5f 91 pop r21
|
|
26e: 4f 91 pop r20
|
|
270: 3f 91 pop r19
|
|
272: 2f 91 pop r18
|
|
274: 0f 90 pop r0
|
|
276: 0f be out 0x3f, r0 ; 63
|
|
278: 0f 90 pop r0
|
|
27a: 1f 90 pop r1
|
|
27c: 18 95 reti
|
|
|
|
0000027e <rxCallback>:
|
|
{"led t", toggleLed}};
|
|
|
|
|
|
void rxCallback()
|
|
{
|
|
char input = hal_USART_readDataReg();
|
|
27e: 0e 94 60 00 call 0xc0 ; 0xc0 <hal_USART_readDataReg>
|
|
|
|
if(parse_FLG) return;
|
|
282: 90 91 2a 01 lds r25, 0x012A ; 0x80012a <__data_end>
|
|
286: 91 11 cpse r25, r1
|
|
288: 27 c0 rjmp .+78 ; 0x2d8 <rxCallback+0x5a>
|
|
|
|
// if(input == )
|
|
|
|
// enter
|
|
if(input == 13 ){
|
|
28a: 8d 30 cpi r24, 0x0D ; 13
|
|
28c: 51 f4 brne .+20 ; 0x2a2 <rxCallback+0x24>
|
|
rx_buff[rx_buff_index] = '\0';
|
|
28e: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
|
292: f0 e0 ldi r31, 0x00 ; 0
|
|
294: e4 5d subi r30, 0xD4 ; 212
|
|
296: fe 4f sbci r31, 0xFE ; 254
|
|
298: 10 82 st Z, r1
|
|
parse_FLG = 1;
|
|
29a: 81 e0 ldi r24, 0x01 ; 1
|
|
29c: 80 93 2a 01 sts 0x012A, r24 ; 0x80012a <__data_end>
|
|
return;
|
|
2a0: 08 95 ret
|
|
}
|
|
|
|
// backspace
|
|
if(input == 8 && rx_buff_index > 0){
|
|
2a2: 88 30 cpi r24, 0x08 ; 8
|
|
2a4: a9 f4 brne .+42 ; 0x2d0 <rxCallback+0x52>
|
|
2a6: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
|
2aa: ee 23 and r30, r30
|
|
2ac: 31 f0 breq .+12 ; 0x2ba <rxCallback+0x3c>
|
|
rx_buff_index--;
|
|
2ae: e1 50 subi r30, 0x01 ; 1
|
|
2b0: e0 93 2b 01 sts 0x012B, r30 ; 0x80012b <rx_buff_index>
|
|
hal_USART_putc(input);
|
|
2b4: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
|
return;
|
|
2b8: 08 95 ret
|
|
}
|
|
|
|
if(rx_buff_index < (RX_BUFF_SIZE - 1) && !parse_FLG){
|
|
rx_buff[rx_buff_index++] = input;
|
|
2ba: 91 e0 ldi r25, 0x01 ; 1
|
|
2bc: 9e 0f add r25, r30
|
|
2be: 90 93 2b 01 sts 0x012B, r25 ; 0x80012b <rx_buff_index>
|
|
2c2: f0 e0 ldi r31, 0x00 ; 0
|
|
2c4: e4 5d subi r30, 0xD4 ; 212
|
|
2c6: fe 4f sbci r31, 0xFE ; 254
|
|
2c8: 80 83 st Z, r24
|
|
hal_USART_putc(input);
|
|
2ca: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
|
2ce: 08 95 ret
|
|
rx_buff_index--;
|
|
hal_USART_putc(input);
|
|
return;
|
|
}
|
|
|
|
if(rx_buff_index < (RX_BUFF_SIZE - 1) && !parse_FLG){
|
|
2d0: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
|
2d4: e3 36 cpi r30, 0x63 ; 99
|
|
2d6: 88 f3 brcs .-30 ; 0x2ba <rxCallback+0x3c>
|
|
2d8: 08 95 ret
|
|
|
|
000002da <parser>:
|
|
hal_USART_putc(input);
|
|
}
|
|
}
|
|
|
|
void parser()
|
|
{
|
|
2da: ef 92 push r14
|
|
2dc: ff 92 push r15
|
|
2de: 0f 93 push r16
|
|
2e0: 1f 93 push r17
|
|
2e2: cf 93 push r28
|
|
2e4: df 93 push r29
|
|
uint8_t i = 0;
|
|
if(!parse_FLG) return;
|
|
2e6: 80 91 2a 01 lds r24, 0x012A ; 0x80012a <__data_end>
|
|
2ea: 88 23 and r24, r24
|
|
2ec: 59 f1 breq .+86 ; 0x344 <parser+0x6a>
|
|
2ee: 06 e0 ldi r16, 0x06 ; 6
|
|
2f0: 11 e0 ldi r17, 0x01 ; 1
|
|
2f2: c0 e0 ldi r28, 0x00 ; 0
|
|
2f4: d0 e0 ldi r29, 0x00 ; 0
|
|
for(i = 0; i < ENTRY_LIST_SIZE && parse_FLG; i++) {
|
|
//if(strncmp(entryList[i].name,rx_buff,rx_buff_index) == 0){
|
|
if(strcmp(entryList[i].name,rx_buff) == 0){
|
|
2f6: 6c e2 ldi r22, 0x2C ; 44
|
|
2f8: 71 e0 ldi r23, 0x01 ; 1
|
|
2fa: f8 01 movw r30, r16
|
|
2fc: 80 81 ld r24, Z
|
|
2fe: 91 81 ldd r25, Z+1 ; 0x01
|
|
300: 0e 94 e3 01 call 0x3c6 ; 0x3c6 <strcmp>
|
|
304: 89 2b or r24, r25
|
|
306: 81 f4 brne .+32 ; 0x328 <parser+0x4e>
|
|
entryList[i].callback();
|
|
308: fe 01 movw r30, r28
|
|
30a: ee 0f add r30, r30
|
|
30c: ff 1f adc r31, r31
|
|
30e: ee 0f add r30, r30
|
|
310: ff 1f adc r31, r31
|
|
312: ea 5f subi r30, 0xFA ; 250
|
|
314: fe 4f sbci r31, 0xFE ; 254
|
|
316: 02 80 ldd r0, Z+2 ; 0x02
|
|
318: f3 81 ldd r31, Z+3 ; 0x03
|
|
31a: e0 2d mov r30, r0
|
|
31c: 09 95 icall
|
|
rx_buff_index = 0;
|
|
31e: 10 92 2b 01 sts 0x012B, r1 ; 0x80012b <rx_buff_index>
|
|
parse_FLG = 0;
|
|
322: 10 92 2a 01 sts 0x012A, r1 ; 0x80012a <__data_end>
|
|
|
|
#if HUMAN_READABLE
|
|
hal_USART_puts("\n\r>>");
|
|
#endif
|
|
|
|
return;
|
|
326: 0e c0 rjmp .+28 ; 0x344 <parser+0x6a>
|
|
328: 21 96 adiw r28, 0x01 ; 1
|
|
32a: 0c 5f subi r16, 0xFC ; 252
|
|
32c: 1f 4f sbci r17, 0xFF ; 255
|
|
|
|
void parser()
|
|
{
|
|
uint8_t i = 0;
|
|
if(!parse_FLG) return;
|
|
for(i = 0; i < ENTRY_LIST_SIZE && parse_FLG; i++) {
|
|
32e: c3 30 cpi r28, 0x03 ; 3
|
|
330: d1 05 cpc r29, r1
|
|
332: 09 f7 brne .-62 ; 0x2f6 <parser+0x1c>
|
|
}
|
|
#if HUMAN_READABLE
|
|
hal_USART_puts("\n\rNo match found!");
|
|
hal_USART_puts("\n\r>>");
|
|
#else
|
|
hal_USART_puts("nmf\n\r");
|
|
334: 82 e1 ldi r24, 0x12 ; 18
|
|
336: 91 e0 ldi r25, 0x01 ; 1
|
|
338: 0e 94 bb 00 call 0x176 ; 0x176 <hal_USART_puts>
|
|
#endif
|
|
|
|
rx_buff_index = 0;
|
|
33c: 10 92 2b 01 sts 0x012B, r1 ; 0x80012b <rx_buff_index>
|
|
parse_FLG = 0;
|
|
340: 10 92 2a 01 sts 0x012A, r1 ; 0x80012a <__data_end>
|
|
}
|
|
344: df 91 pop r29
|
|
346: cf 91 pop r28
|
|
348: 1f 91 pop r17
|
|
34a: 0f 91 pop r16
|
|
34c: ff 90 pop r15
|
|
34e: ef 90 pop r14
|
|
350: 08 95 ret
|
|
|
|
00000352 <main>:
|
|
|
|
int main(void)
|
|
{
|
|
|
|
ledInit();
|
|
352: 0e 94 53 00 call 0xa6 ; 0xa6 <ledInit>
|
|
|
|
cli();
|
|
356: f8 94 cli
|
|
|
|
hal_USART_RxEnable();
|
|
358: 0e 94 63 00 call 0xc6 ; 0xc6 <hal_USART_RxEnable>
|
|
hal_USART_TxEnable();
|
|
35c: 0e 94 69 00 call 0xd2 ; 0xd2 <hal_USART_TxEnable>
|
|
hal_USART_setCharSize(charSize_8BIT);
|
|
360: 83 e0 ldi r24, 0x03 ; 3
|
|
362: 0e 94 6f 00 call 0xde ; 0xde <hal_USART_setCharSize>
|
|
hal_USART_setBaudRate(9600);
|
|
366: 60 e8 ldi r22, 0x80 ; 128
|
|
368: 75 e2 ldi r23, 0x25 ; 37
|
|
36a: 80 e0 ldi r24, 0x00 ; 0
|
|
36c: 90 e0 ldi r25, 0x00 ; 0
|
|
36e: 0e 94 7f 00 call 0xfe ; 0xfe <hal_USART_setBaudRate>
|
|
hal_USART_registerRxCallback(rxCallback);
|
|
372: 8f e3 ldi r24, 0x3F ; 63
|
|
374: 91 e0 ldi r25, 0x01 ; 1
|
|
376: 0e 94 a9 00 call 0x152 ; 0x152 <hal_USART_registerRxCallback>
|
|
sei();
|
|
37a: 78 94 sei
|
|
#endif
|
|
|
|
while (1)
|
|
{
|
|
//hal_USART_puts("\n\r>>");
|
|
parser();
|
|
37c: 0e 94 6d 01 call 0x2da ; 0x2da <parser>
|
|
380: fd cf rjmp .-6 ; 0x37c <main+0x2a>
|
|
|
|
00000382 <__udivmodsi4>:
|
|
382: a1 e2 ldi r26, 0x21 ; 33
|
|
384: 1a 2e mov r1, r26
|
|
386: aa 1b sub r26, r26
|
|
388: bb 1b sub r27, r27
|
|
38a: fd 01 movw r30, r26
|
|
38c: 0d c0 rjmp .+26 ; 0x3a8 <__udivmodsi4_ep>
|
|
|
|
0000038e <__udivmodsi4_loop>:
|
|
38e: aa 1f adc r26, r26
|
|
390: bb 1f adc r27, r27
|
|
392: ee 1f adc r30, r30
|
|
394: ff 1f adc r31, r31
|
|
396: a2 17 cp r26, r18
|
|
398: b3 07 cpc r27, r19
|
|
39a: e4 07 cpc r30, r20
|
|
39c: f5 07 cpc r31, r21
|
|
39e: 20 f0 brcs .+8 ; 0x3a8 <__udivmodsi4_ep>
|
|
3a0: a2 1b sub r26, r18
|
|
3a2: b3 0b sbc r27, r19
|
|
3a4: e4 0b sbc r30, r20
|
|
3a6: f5 0b sbc r31, r21
|
|
|
|
000003a8 <__udivmodsi4_ep>:
|
|
3a8: 66 1f adc r22, r22
|
|
3aa: 77 1f adc r23, r23
|
|
3ac: 88 1f adc r24, r24
|
|
3ae: 99 1f adc r25, r25
|
|
3b0: 1a 94 dec r1
|
|
3b2: 69 f7 brne .-38 ; 0x38e <__udivmodsi4_loop>
|
|
3b4: 60 95 com r22
|
|
3b6: 70 95 com r23
|
|
3b8: 80 95 com r24
|
|
3ba: 90 95 com r25
|
|
3bc: 9b 01 movw r18, r22
|
|
3be: ac 01 movw r20, r24
|
|
3c0: bd 01 movw r22, r26
|
|
3c2: cf 01 movw r24, r30
|
|
3c4: 08 95 ret
|
|
|
|
000003c6 <strcmp>:
|
|
3c6: fb 01 movw r30, r22
|
|
3c8: dc 01 movw r26, r24
|
|
3ca: 8d 91 ld r24, X+
|
|
3cc: 01 90 ld r0, Z+
|
|
3ce: 80 19 sub r24, r0
|
|
3d0: 01 10 cpse r0, r1
|
|
3d2: d9 f3 breq .-10 ; 0x3ca <strcmp+0x4>
|
|
3d4: 99 0b sbc r25, r25
|
|
3d6: 08 95 ret
|
|
|
|
000003d8 <_exit>:
|
|
3d8: f8 94 cli
|
|
|
|
000003da <__stop_program>:
|
|
3da: ff cf rjmp .-2 ; 0x3da <__stop_program>
|