main.lss
来自「利用zigbee进行定位的程序」· LSS 代码 · 共 288 行
LSS
288 行
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000170 00800100 000033fe 00003492 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 000033fe 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 00000577 00800270 00800270 00003602 2**0
ALLOC
3 .noinit 00000000 008007e7 008007e7 00003602 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 00003602 2**0
CONTENTS
5 .stab 00009e40 00000000 00000000 00003604 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 0000444d 00000000 00000000 0000d444 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 46 00 jmp 0x8c
4: 0c 94 63 00 jmp 0xc6
8: 0c 94 63 00 jmp 0xc6
c: 0c 94 63 00 jmp 0xc6
10: 0c 94 63 00 jmp 0xc6
14: 0c 94 63 00 jmp 0xc6
18: 0c 94 63 00 jmp 0xc6
1c: 0c 94 b6 01 jmp 0x36c
20: 0c 94 63 00 jmp 0xc6
24: 0c 94 63 00 jmp 0xc6
28: 0c 94 63 00 jmp 0xc6
2c: 0c 94 63 00 jmp 0xc6
30: 0c 94 63 00 jmp 0xc6
34: 0c 94 63 00 jmp 0xc6
38: 0c 94 63 00 jmp 0xc6
3c: 0c 94 63 00 jmp 0xc6
40: 0c 94 63 00 jmp 0xc6
44: 0c 94 63 00 jmp 0xc6
48: 0c 94 63 00 jmp 0xc6
4c: 0c 94 63 00 jmp 0xc6
50: 0c 94 63 00 jmp 0xc6
54: 0c 94 63 00 jmp 0xc6
58: 0c 94 63 00 jmp 0xc6
5c: 0c 94 63 00 jmp 0xc6
60: 0c 94 63 00 jmp 0xc6
64: 0c 94 63 00 jmp 0xc6
68: 0c 94 da 01 jmp 0x3b4
6c: 0c 94 63 00 jmp 0xc6
70: 0c 94 63 00 jmp 0xc6
74: 0c 94 63 00 jmp 0xc6
78: 0c 94 63 00 jmp 0xc6
7c: 0c 94 63 00 jmp 0xc6
80: 0c 94 63 00 jmp 0xc6
84: 0c 94 63 00 jmp 0xc6
88: 0c 94 63 00 jmp 0xc6
0000008c <__ctors_end>:
8c: 11 24 eor r1, r1
8e: 1f be out 0x3f, r1 ; 63
90: cf ef ldi r28, 0xFF ; 255
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
00000098 <__do_copy_data>:
98: 12 e0 ldi r17, 0x02 ; 2
9a: a0 e0 ldi r26, 0x00 ; 0
9c: b1 e0 ldi r27, 0x01 ; 1
9e: ee ef ldi r30, 0xFE ; 254
a0: f3 e3 ldi r31, 0x33 ; 51
a2: 00 e0 ldi r16, 0x00 ; 0
a4: 0b bf out 0x3b, r16 ; 59
a6: 02 c0 rjmp .+4 ; 0xac
000000a8 <.__do_copy_data_loop>:
a8: 07 90 elpm r0, Z+
aa: 0d 92 st X+, r0
000000ac <.__do_copy_data_start>:
ac: a0 37 cpi r26, 0x70 ; 112
ae: b1 07 cpc r27, r17
b0: d9 f7 brne .-10 ; 0xa8
000000b2 <__do_clear_bss>:
b2: 17 e0 ldi r17, 0x07 ; 7
b4: a0 e7 ldi r26, 0x70 ; 112
b6: b2 e0 ldi r27, 0x02 ; 2
b8: 01 c0 rjmp .+2 ; 0xbc
000000ba <.do_clear_bss_loop>:
ba: 1d 92 st X+, r1
000000bc <.do_clear_bss_start>:
bc: a7 3e cpi r26, 0xE7 ; 231
be: b1 07 cpc r27, r17
c0: e1 f7 brne .-8 ; 0xba
c2: 0c 94 6a 00 jmp 0xd4
000000c6 <__bad_interrupt>:
c6: 0c 94 00 00 jmp 0x0
000000ca <hardwareInit>:
//---------------------------------------------------------------
inline uint8_t hardwareInit(void)
{
OS_SET_PIN_DIRECTIONS();
ca: 0e 94 c2 05 call 0xb84
return SUCCESS;
}
ce: 81 e0 ldi r24, 0x01 ; 1
d0: 90 e0 ldi r25, 0x00 ; 0
d2: 08 95 ret
000000d4 <main>:
//---------------------------------------------------------
int main(void)
{
d4: cf ef ldi r28, 0xFF ; 255
d6: d0 e1 ldi r29, 0x10 ; 16
d8: de bf out 0x3e, r29 ; 62
da: cd bf out 0x3d, r28 ; 61
dc: 0e 94 c2 05 call 0xb84
hardwareInit();
Leds_greenOn();
e0: 0e 94 40 01 call 0x280
Leds_redOn();
e4: 0e 94 7b 01 call 0x2f6
Leds_yellowOn();
e8: 0e 94 05 01 call 0x20a
IoInit();
ec: 0e 94 97 06 call 0xd2e
OS_sched_init();
f0: 0e 94 23 02 call 0x446
cc2420_init();
f4: 0e 94 c0 0a call 0x1580
os_atomic_enable_interrupt();
f8: 0e 94 13 02 call 0x426
//-------------------------------------------------
//init rssi and payload var
//-------------------------------------------------
isready=0;
fc: 10 92 c1 03 sts 0x03C1, r1
tend=0;
100: 10 92 c3 03 sts 0x03C3, r1
104: 10 92 c2 03 sts 0x03C2, r1
payload=0;
108: 10 92 b8 07 sts 0x07B8, r1
10c: 10 92 b7 07 sts 0x07B7, r1
pagenum=0;
110: 10 92 df 07 sts 0x07DF, r1
114: 10 92 de 07 sts 0x07DE, r1
testnum=0;
118: 10 92 c0 03 sts 0x03C0, r1
11c: 8c ec ldi r24, 0xCC ; 204
11e: 93 e0 ldi r25, 0x03 ; 3
120: fc 01 movw r30, r24
for (int i=0;i<1003;i++)
{
rssi[i]=0;
122: 11 92 st Z+, r1
124: 27 e0 ldi r18, 0x07 ; 7
126: e6 3b cpi r30, 0xB6 ; 182
128: f2 07 cpc r31, r18
12a: d9 f3 breq .-10 ; 0x122
12c: d4 f3 brlt .-12 ; 0x122
}
prssi=rssi;
12e: 90 93 c6 03 sts 0x03C6, r25
132: 80 93 c5 03 sts 0x03C5, r24
//-------------------------------------------------
//some test for extflash
//-------------------------------------------------
extflash_ini();
136: 0e 94 ff 0d call 0x1bfe
13a: e5 e8 ldi r30, 0x85 ; 133
13c: f2 e0 ldi r31, 0x02 ; 2
for (int i=0;i<264;i++)
{
test[i]=0;
13e: 11 92 st Z+, r1
140: 83 e0 ldi r24, 0x03 ; 3
142: ec 38 cpi r30, 0x8C ; 140
144: f8 07 cpc r31, r24
146: d9 f3 breq .-10 ; 0x13e
148: d4 f3 brlt .-12 ; 0x13e
}
Main_Memory_PageRead(0, 0x0000, test, 264);//read the content of a page
14a: 28 e0 ldi r18, 0x08 ; 8
14c: 31 e0 ldi r19, 0x01 ; 1
14e: 45 e8 ldi r20, 0x85 ; 133
150: 52 e0 ldi r21, 0x02 ; 2
152: 60 e0 ldi r22, 0x00 ; 0
154: 70 e0 ldi r23, 0x00 ; 0
156: cb 01 movw r24, r22
158: 0e 94 33 0f call 0x1e66
while(!(Status_Register_Get()&0x80));
15c: 0e 94 29 11 call 0x2252
160: 88 23 and r24, r24
162: e4 f7 brge .-8 ; 0x15c
//-----------------
if ((test[0]!=0xff)&&1)
164: 80 91 85 02 lds r24, 0x0285
168: 8f 3f cpi r24, 0xFF ; 255
16a: 71 f0 breq .+28 ; 0x188
{
printf("\nflash is not empty!test[0]is %02x\n",test[0]);
16c: 99 27 eor r25, r25
16e: 9f 93 push r25
170: 8f 93 push r24
172: 80 e0 ldi r24, 0x00 ; 0
174: 91 e0 ldi r25, 0x01 ; 1
176: 9f 93 push r25
178: 8f 93 push r24
17a: 0e 94 7b 16 call 0x2cf6
17e: 0f 90 pop r0
180: 0f 90 pop r0
182: 0f 90 pop r0
184: 0f 90 pop r0
186: 0e c0 rjmp .+28 ; 0x1a4
}
else
{
for (int i=0;i<1024;i++)
188: c0 e0 ldi r28, 0x00 ; 0
18a: d0 e0 ldi r29, 0x00 ; 0
{
PageErase(i);
18c: ce 01 movw r24, r28
18e: 0e 94 47 13 call 0x268e
while(!(Status_Register_Get()&0x80));
192: 0e 94 29 11 call 0x2252
196: 88 23 and r24, r24
198: e4 f7 brge .-8 ; 0x192
19a: 21 96 adiw r28, 0x01 ; 1
19c: 24 e0 ldi r18, 0x04 ; 4
19e: c0 30 cpi r28, 0x00 ; 0
1a0: d2 07 cpc r29, r18
1a2: a4 f3 brlt .-24 ; 0x18c
}
}
cc2420_setchnl(1);
1a4: 81 e0 ldi r24, 0x01 ; 1
1a6: 0e 94 29 0a call 0x1452
cc2420_setrxmode();
1aa: 0e 94 11 0a call 0x1422
cc2420_enableAddrDecode();
1ae: 0e 94 f3 09 call 0x13e6
cc2420_setpanid(0x0004);
1b2: 84 e0 ldi r24, 0x04 ; 4
1b4: 90 e0 ldi r25, 0x00 ; 0
1b6: 0e 94 76 0a call 0x14ec
cc2420_setshortaddress(0x0004);
1ba: 84 e0 ldi r24, 0x04 ; 4
1bc: 90 e0 ldi r25, 0x00 ; 0
1be: 0e 94 42 0a call 0x1484
cc2420_enablefifop();
1c2: 0e 94 0f 07 call 0xe1e
Leds_greenOff();
1c6: 0e 94 52 01 call 0x2a4
Leds_redOff();
1ca: 0e 94 8d 01 call 0x31a
Leds_yellowOn();
1ce: 0e 94 05 01 call 0x20a
while(1) {
OS_run_task();
1d2: 0e 94 69 02 call 0x4d2
1d6: fd cf rjmp .-6 ; 0x1d2
000001d8 <Leds_init>:
//-----------------------------------------------------显示led驱
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?