📄 timers.lss
字号:
Timers.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000c6a 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00800060 00000c6a 00000cfe 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 000000d2 00800060 00800060 00000cfe 2**2
ALLOC
3 .noinit 00000000 00800132 00800132 00000cfe 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 00000cfe 2**0
CONTENTS
5 .stab 00004020 00000000 00000000 00000d00 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 00000811 00000000 00000000 00004d20 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_aranges 00000014 00000000 00000000 00005531 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_pubnames 000000d0 00000000 00000000 00005545 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_info 000002a8 00000000 00000000 00005615 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_abbrev 000000eb 00000000 00000000 000058bd 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_line 00000156 00000000 00000000 000059a8 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_str 00000164 00000000 00000000 00005afe 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 3b 00 jmp 0x76
4: 0c 94 5b 00 jmp 0xb6
8: 0c 94 5b 00 jmp 0xb6
c: 0c 94 5b 00 jmp 0xb6
10: 0c 94 5b 00 jmp 0xb6
14: 0c 94 5b 00 jmp 0xb6
18: 0c 94 5b 00 jmp 0xb6
1c: 0c 94 5b 00 jmp 0xb6
20: 0c 94 5b 00 jmp 0xb6
24: 0c 94 5b 00 jmp 0xb6
28: 0c 94 5b 00 jmp 0xb6
2c: 0c 94 5b 00 jmp 0xb6
30: 0c 94 5b 00 jmp 0xb6
34: 0c 94 5b 00 jmp 0xb6
38: 0c 94 5b 00 jmp 0xb6
3c: 0c 94 5b 00 jmp 0xb6
40: 0c 94 5d 00 jmp 0xba
44: 0c 94 5b 00 jmp 0xb6
48: 0c 94 06 03 jmp 0x60c
4c: 0c 94 00 03 jmp 0x600
50: 0c 94 5b 00 jmp 0xb6
54: 0c 94 5b 00 jmp 0xb6
58: 0c 94 5b 00 jmp 0xb6
5c: 0c 94 5b 00 jmp 0xb6
00000060 <__ctors_end>:
60: e5 00 .word 0x00e5 ; ????
62: 81 00 .word 0x0081 ; ????
64: b1 00 .word 0x00b1 ; ????
66: 02 1a sub r0, r18
00000067 <task1Tcb>:
67: 1a 01 65 00 ec 00 03 ..e....
0000006e <MonitorTcb>:
6e: b0 00 3b 01 b7 00 00 00 ..;.....
00000076 <__init>:
76: 11 24 eor r1, r1
78: 1f be out 0x3f, r1 ; 63
7a: cf ef ldi r28, 0xFF ; 255
7c: df e0 ldi r29, 0x0F ; 15
7e: de bf out 0x3e, r29 ; 62
80: cd bf out 0x3d, r28 ; 61
00000082 <__do_copy_data>:
82: 10 e0 ldi r17, 0x00 ; 0
84: a0 e6 ldi r26, 0x60 ; 96
86: b0 e0 ldi r27, 0x00 ; 0
88: ea e6 ldi r30, 0x6A ; 106
8a: fc e0 ldi r31, 0x0C ; 12
8c: 0f ef ldi r16, 0xFF ; 255
0000008e <.__do_copy_data_carry>:
8e: 03 95 inc r16
90: 0b bf out 0x3b, r16 ; 59
92: 04 c0 rjmp .+8 ; 0x9c
00000094 <.__do_copy_data_loop>:
94: d8 95 elpm
96: 0d 92 st X+, r0
98: 31 96 adiw r30, 0x01 ; 1
9a: c8 f3 brcs .-14 ; 0x8e
0000009c <.__do_copy_data_start>:
9c: a0 36 cpi r26, 0x60 ; 96
9e: b1 07 cpc r27, r17
a0: c9 f7 brne .-14 ; 0x94
000000a2 <__do_clear_bss>:
a2: 11 e0 ldi r17, 0x01 ; 1
a4: a0 e6 ldi r26, 0x60 ; 96
a6: b0 e0 ldi r27, 0x00 ; 0
a8: 01 c0 rjmp .+2 ; 0xac
000000aa <.do_clear_bss_loop>:
aa: 1d 92 st X+, r1
000000ac <.do_clear_bss_start>:
ac: a2 33 cpi r26, 0x32 ; 50
ae: b1 07 cpc r27, r17
b0: e1 f7 brne .-8 ; 0xaa
b2: 0c 94 8c 00 jmp 0x118
000000b6 <__bad_interrupt>:
b6: 0c 94 00 00 jmp 0x0
000000ba <__vector_16>:
AVRX_SIGINT(SIG_OVERFLOW0)
{
IntProlog(); // Switch to kernel stack/context
ba: 0e 94 80 03 call 0x700
// TCNT0 = TCNT0_INIT;
TCNT0 = TCNT0_INIT;
be: 80 ee ldi r24, 0xE0 ; 224
c0: 82 bf out 0x32, r24 ; 50
AvrXTimerHandler(); // Call Time queue manager
c2: 0e 94 70 05 call 0xae0
Epilog(); // Return to tasks
c6: 0e 94 d8 03 call 0x7b0
000000ca <task1>:
}
/*
Task 1 simply flashes the light off for 1/5 second and then on for 4/5th
for a 1 second cycle time.
*/
AVRX_GCC_TASKDEF(task1, 6, 3)
{
while (1)
{
AvrXStartTimer(&timer1, 800); // 800 ms delay
ca: 60 e2 ldi r22, 0x20 ; 32
cc: 73 e0 ldi r23, 0x03 ; 3
ce: 86 ee ldi r24, 0xE6 ; 230
d0: 90 e0 ldi r25, 0x00 ; 0
d2: 0e 94 44 05 call 0xa88
AvrXWaitTimer(&timer1);
d6: 86 ee ldi r24, 0xE6 ; 230
d8: 90 e0 ldi r25, 0x00 ; 0
da: 0e 94 77 04 call 0x8ee
LED = LED ^ 0x01;
de: 88 b3 in r24, 0x18 ; 24
e0: 11 e0 ldi r17, 0x01 ; 1
e2: 81 27 eor r24, r17
e4: 88 bb out 0x18, r24 ; 24
AvrXStartTimer(&timer1, 200); // 200 ms delay
e6: 68 ec ldi r22, 0xC8 ; 200
e8: 70 e0 ldi r23, 0x00 ; 0
ea: 86 ee ldi r24, 0xE6 ; 230
ec: 90 e0 ldi r25, 0x00 ; 0
ee: 0e 94 44 05 call 0xa88
AvrXWaitTimer(&timer1);
f2: 86 ee ldi r24, 0xE6 ; 230
f4: 90 e0 ldi r25, 0x00 ; 0
f6: 0e 94 77 04 call 0x8ee
LED = LED ^ 0x01;
fa: 88 b3 in r24, 0x18 ; 24
fc: 81 27 eor r24, r17
fe: 88 bb out 0x18, r24 ; 24
100: e4 cf rjmp .-56 ; 0xca
00000102 <task2>:
}
}
/*
Task 2 cycles the light on/off over 4 seconds. It uses a simplified
form of the delay API
*/
AVRX_GCC_TASKDEF(task2, 6, 2)
{
while (1)
{
AvrXDelay(&timer2, 2000); // 2 second delay
102: 60 ed ldi r22, 0xD0 ; 208
104: 77 e0 ldi r23, 0x07 ; 7
106: 80 e6 ldi r24, 0x60 ; 96
108: 90 e0 ldi r25, 0x00 ; 0
10a: 0e 94 42 05 call 0xa84
LED = LED ^ 0x02;
10e: 88 b3 in r24, 0x18 ; 24
110: 92 e0 ldi r25, 0x02 ; 2
112: 89 27 eor r24, r25
114: 88 bb out 0x18, r24 ; 24
116: f5 cf rjmp .-22 ; 0x102
00000118 <main>:
}
}
int main(void) // Main runs under the AvrX Stack
{
118: cf ef ldi r28, 0xFF ; 255
11a: df e0 ldi r29, 0x0F ; 15
11c: de bf out 0x3e, r29 ; 62
11e: cd bf out 0x3d, r28 ; 61
//#define JUST_TOGGLE_PB0
#if defined(JUST_TOGGLE_PB0)
int i;
LEDDDR = 0xFF;
LED = 0xFF;
UBRR0L = UBRR_INIT;
UBRR0H = 0;
// UCSR0A = ;
UCSR0B = _BV(TXEN0);
UCSR0C = _BV(URSEL0) | _BV(UCSZ01) | _BV(UCSZ00);
TCNT0 = TCNT0_INIT;
TCCR0 = TMC8_CK256;
while (1)
{
UDR0 = '+';
LED &= ~_BV(0); // LED on
for (i = 750; i > 0; i--)
{
while (0 == (TIFR & _BV(TOV0)))
;
TIFR |= _BV(TOV0);
TCNT0 = TCNT0_INIT;
}
UDR0 = '-';
LED |= _BV(0); // LED off
for (i = 250; i > 0; i--)
{
while (0 == (TIFR & _BV(TOV0)))
;
TIFR |= _BV(TOV0);
TCNT0 = TCNT0_INIT;
}
}
#else
AvrXSetKernelStack(0);
120: 80 e0 ldi r24, 0x00 ; 0
122: 90 e0 ldi r25, 0x00 ; 0
124: 0e 94 14 04 call 0x828
MCUCR = 1<<SE;
128: 80 e2 ldi r24, 0x20 ; 32
12a: 85 bf out 0x35, r24 ; 53
TCNT0 = TCNT0_INIT;
12c: 80 ee ldi r24, 0xE0 ; 224
12e: 82 bf out 0x32, r24 ; 50
TCCR0 = TMC8_CK256;
130: 86 e0 ldi r24, 0x06 ; 6
132: 83 bf out 0x33, r24 ; 51
TIMSK = 1<<TOIE0;
134: 81 e0 ldi r24, 0x01 ; 1
136: 87 bf out 0x37, r24 ; 55
LEDDDR = 0xFF;
138: 8f ef ldi r24, 0xFF ; 255
13a: 87 bb out 0x17, r24 ; 23
LED = 0xFF;
13c: 88 bb out 0x18, r24 ; 24
AvrXRunTask(TCB(task1));
13e: 87 e6 ldi r24, 0x67 ; 103
140: 90 e0 ldi r25, 0x00 ; 0
142: 0e 94 20 04 call 0x840
AvrXRunTask(TCB(task2));
146: 80 e6 ldi r24, 0x60 ; 96
148: 90 e0 ldi r25, 0x00 ; 0
14a: 0e 94 20 04 call 0x840
AvrXRunTask(TCB(Monitor));
14e: 8e e6 ldi r24, 0x6E ; 110
150: 90 e0 ldi r25, 0x00 ; 0
152: 0e 94 20 04 call 0x840
InitSerialIO(UBRR_INIT); // Initialize USART baud rate generator
156: 89 e1 ldi r24, 0x19 ; 25
158: 90 e0 ldi r25, 0x00 ; 0
15a: 0e 94 fc 02 call 0x5f8
Epilog(); // Switch from AvrX Stack to first task
15e: 0e 94 d8 03 call 0x7b0
#endif // defined(JUST_TOGGLE_PB0)
return(0);
}
162: 80 e0 ldi r24, 0x00 ; 0
164: 90 e0 ldi r25, 0x00 ; 0
166: 0c 94 34 06 jmp 0xc68
0000016a <Hello>:
16a: 0d 00 .word 0x000d ; ????
16c: 41 76 andi r20, 0x61 ; 97
16e: 72 58 subi r23, 0x82 ; 130
170: 20 4d sbci r18, 0xD0 ; 208
172: 6f 6e ori r22, 0xEF ; 239
174: 69 74 andi r22, 0x49 ; 73
176: 6f 72 andi r22, 0x2F ; 47
178: 20 56 subi r18, 0x60 ; 96
17a: 32 00 .word 0x0032 ; ????
17c: 0d 00 .word 0x000d ; ????
17e: 0d 00 .word 0x000d ; ????
180: 4d 6f ori r20, 0xFD ; 253
182: 64 69 ori r22, 0x94 ; 148
184: 66 79 andi r22, 0x96 ; 150
186: 20 3d cpi r18, 0xD0 ; 208
188: 20 6d ori r18, 0xD0 ; 208
18a: 7b 73 andi r23, 0x3B ; 59
18c: 2c 65 ori r18, 0x5C ; 92
18e: 7d 5b subi r23, 0xBD ; 189
190: 77 5d subi r23, 0xD7 ; 215
192: 5b 61 ori r21, 0x1B ; 27
194: 61 61 ori r22, 0x11 ; 17
196: 61 5d subi r22, 0xD1 ; 209
198: 00 0d add r16, r0
19a: 00 44 sbci r16, 0x40 ; 64
19c: 75 6d ori r23, 0xD5 ; 213
19e: 70 20 and r7, r0
1a0: 20 20 and r2, r0
1a2: 3d 20 and r3, r13
1a4: 64 7b andi r22, 0xB4 ; 180
1a6: 73 2c mov r7, r3
1a8: 65 7d andi r22, 0xD5 ; 213
1aa: 5b 77 andi r21, 0x7B ; 123
1ac: 5d 5b subi r21, 0xBD ; 189
1ae: 61 61 ori r22, 0x11 ; 17
1b0: 61 61 ori r22, 0x11 ; 17
1b2: 5d 20 and r5, r13
1b4: 5b 78 andi r21, 0x8B ; 139
1b6: 78 5d subi r23, 0xD8 ; 216
1b8: 00 0d add r16, r0
1ba: 00 48 sbci r16, 0x80 ; 128
1bc: 61 6c ori r22, 0xC1 ; 193
1be: 74 20 and r7, r4
1c0: 20 20 and r2, r0
1c2: 3d 20 and r3, r13
1c4: 68 5b subi r22, 0xB8 ; 184
1c6: 6f 6f ori r22, 0xFF ; 255
1c8: 6f 6f ori r22, 0xFF ; 255
1ca: 5d 00 .word 0x005d ; ????
1cc: 0d 00 .word 0x000d ; ????
1ce: 53 74 andi r21, 0x43 ; 67
1d0: 65 70 andi r22, 0x05 ; 5
1d2: 20 20 and r2, r0
1d4: 20 3d cpi r18, 0xD0 ; 208
1d6: 20 73 andi r18, 0x30 ; 48
1d8: 5b 6f ori r21, 0xFB ; 251
1da: 6f 6f ori r22, 0xFF ; 255
1dc: 6f 5d subi r22, 0xDF ; 223
1de: 00 0d add r16, r0
1e0: 00 4e sbci r16, 0xE0 ; 224
1e2: 65 78 andi r22, 0x85 ; 133
1e4: 74 20 and r7, r4
1e6: 20 20 and r2, r0
1e8: 3d 20 and r3, r13
1ea: 6e 5b subi r22, 0xBE ; 190
1ec: 6f 6f ori r22, 0xFF ; 255
1ee: 6f 6f ori r22, 0xFF ; 255
1f0: 5d 00 .word 0x005d ; ????
1f2: 0d 00 .word 0x000d ; ????
1f4: 52 65 ori r21, 0x52 ; 82
1f6: 73 75 andi r23, 0x53 ; 83
1f8: 6d 65 ori r22, 0x5D ; 93
1fa: 20 3d cpi r18, 0xD0 ; 208
1fc: 20 72 andi r18, 0x20 ; 32
1fe: 5b 6f ori r21, 0xFB ; 251
200: 6f 6f ori r22, 0xFF ; 255
202: 6f 5d subi r22, 0xDF ; 223
204: 00 0d add r16, r0
206: 00 43 sbci r16, 0x30 ; 48
208: 6f 6e ori r22, 0xEF ; 239
20a: 74 65 ori r23, 0x54 ; 84
20c: 78 74 andi r23, 0x48 ; 72
20e: 3d 20 and r3, r13
210: 78 5b subi r23, 0xB8 ; 184
212: 6f 6f ori r22, 0xFF ; 255
214: 6f 6f ori r22, 0xFF ; 255
216: 5d 00 .word 0x005d ; ????
218: 0d 00 .word 0x000d ; ????
21a: 53 69 ori r21, 0x93 ; 147
21c: 67 6e ori r22, 0xE7 ; 231
21e: 61 6c ori r22, 0xC1 ; 193
220: 20 3d cpi r18, 0xD0 ; 208
222: 20 69 ori r18, 0x90 ; 144
224: 5b 6f ori r21, 0xFB ; 251
226: 6f 6f ori r22, 0xFF ; 255
228: 6f 5d subi r22, 0xDF ; 223
22a: 00 0d add r16, r0
22c: 00 43 sbci r16, 0x30 ; 48
22e: 61 6e ori r22, 0xE1 ; 225
230: 63 65 ori r22, 0x53 ; 83
232: 6c 20 and r6, r12
234: 3d 20 and r3, r13
236: 63 5b subi r22, 0xB3 ; 179
238: 6f 6f ori r22, 0xFF ; 255
23a: 6f 6f ori r22, 0xFF ; 255
23c: 5d 00 .word 0x005d ; ????
23e: 0d 00 .word 0x000d ; ????
240: 4b 69 ori r20, 0x9B ; 155
242: 6c 6c ori r22, 0xCC ; 204
244: 54 73 andi r21, 0x34 ; 52
246: 6b 3d cpi r22, 0xDB ; 219
248: 20 6b ori r18, 0xB0 ; 176
24a: 5b 6f ori r21, 0xFB ; 251
24c: 6f 6f ori r22, 0xFF ; 255
24e: 6f 5d subi r22, 0xDF ; 223
250: 00 0d add r16, r0
252: 00 49 sbci r16, 0x90 ; 144
254: 6e 69 ori r22, 0x9E ; 158
256: 74 61 ori r23, 0x14 ; 20
258: 73 6b ori r23, 0xB3 ; 179
25a: 3d 20 and r3, r13
25c: 70 5b subi r23, 0xB0 ; 176
25e: 61 61 ori r22, 0x11 ; 17
260: 61 61 ori r22, 0x11 ; 17
262: 5d 00 .word 0x005d ; ????
264: 0d 00 .word 0x000d ; ????
266: 51 75 andi r21, 0x51 ; 81
268: 69 74 andi r22, 0x49 ; 73
26a: 20 20 and r2, r0
26c: 20 3d cpi r18, 0xD0 ; 208
26e: 20 71 andi r18, 0x10 ; 16
270: 00 0d add r16, r0
272: 00 00 nop
...
00000276 <Monitor>:
_FUNCTION(Monitor)
Monitor:
ldi p1l, lo8(EEPromMutex)
276: 80 e3 ldi r24, 0x30 ; 48
ldi p1h, hi8(EEPromMutex)
278: 91 e0 ldi r25, 0x01 ; 1
rcall AvrXSetSemaphore ; Initialize EEProm Mutex
27a: 52 d3 rcall .+1700 ; 0x920
ldi p1l, lo8(Hello)
27c: 8a e6 ldi r24, 0x6A ; 106
ldi p1h, hi8(Hello)
27e: 91 e0 ldi r25, 0x01 ; 1
00000280 <Hello1>:
Hello1:
rcall _PrintString
280: ab d1 rcall .+854 ; 0x5d8
subi r1l, lo8(-1)
282: 8f 5f subi r24, 0xFF ; 255
sbci r1h, hi8(-1) ; Keep looping until
284: 9f 4f sbci r25, 0xFF ; 255
mov Zl, r1l
286: e8 2f mov r30, r24
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -