📄 main.lss
字号:
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000180 00800100 00003424 000034b8 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 00003424 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 00000577 00800280 00800280 00003638 2**0
ALLOC
3 .noinit 00000000 008007f7 008007f7 00003638 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 00003638 2**0
CONTENTS
5 .stab 00009e28 00000000 00000000 00003638 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 00004504 00000000 00000000 0000d460 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 e0 01 jmp 0x3c0
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 04 02 jmp 0x408
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: e4 e2 ldi r30, 0x24 ; 36
a0: f4 e3 ldi r31, 0x34 ; 52
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 38 cpi r26, 0x80 ; 128
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 e8 ldi r26, 0x80 ; 128
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 3f cpi r26, 0xF7 ; 247
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 09 06 call 0xc12
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 09 06 call 0xc12
hardwareInit();
Leds_greenOn();
e0: 0e 94 6a 01 call 0x2d4
Leds_redOn();
e4: 0e 94 a5 01 call 0x34a
Leds_yellowOn();
e8: 0e 94 2f 01 call 0x25e
IoInit();
ec: 0e 94 de 06 call 0xdbc
OS_sched_init();
f0: 0e 94 4d 02 call 0x49a
cc2420_init();
f4: 0e 94 07 0b call 0x160e
os_atomic_enable_interrupt();
f8: 0e 94 3d 02 call 0x47a
//-------------------------------------------------
//init rssi and payload var
//-------------------------------------------------
isready=0;
fc: 10 92 d1 03 sts 0x03D1, r1
tend=0;
100: 10 92 d3 03 sts 0x03D3, r1
104: 10 92 d2 03 sts 0x03D2, r1
payload=0;
108: 10 92 c8 07 sts 0x07C8, r1
10c: 10 92 c7 07 sts 0x07C7, r1
pagenum=0;
110: 10 92 ef 07 sts 0x07EF, r1
114: 10 92 ee 07 sts 0x07EE, r1
testnum=0;
118: 10 92 d0 03 sts 0x03D0, r1
11c: 8c ed ldi r24, 0xDC ; 220
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 3c cpi r30, 0xC6 ; 198
128: f2 07 cpc r31, r18
12a: d9 f3 breq .-10 ; 0x122
12c: d4 f3 brlt .-12 ; 0x122
}
prssi=rssi;
12e: 90 93 d6 03 sts 0x03D6, r25
132: 80 93 d5 03 sts 0x03D5, r24
//-------------------------------------------------
//some test for extflash
//-------------------------------------------------
extflash_ini();
136: 0e 94 12 0e call 0x1c24
13a: e5 e9 ldi r30, 0x95 ; 149
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 39 cpi r30, 0x9C ; 156
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 e9 ldi r20, 0x95 ; 149
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 46 0f call 0x1e8c
while(!(Status_Register_Get()&0x80));
15c: 0e 94 3c 11 call 0x2278
160: 88 23 and r24, r24
162: e4 f7 brge .-8 ; 0x15c
//-----------------
if ((test[0]!=0xff)&&1)
164: 80 91 95 02 lds r24, 0x0295
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 8e 16 call 0x2d1c
17e: 0f 90 pop r0
180: 0f 90 pop r0
182: 0f 90 pop r0
184: 0f 90 pop r0
186: 16 c0 rjmp .+44 ; 0x1b4
}
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 5a 13 call 0x26b4
while(!(Status_Register_Get()&0x80));
192: 0e 94 3c 11 call 0x2278
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
}
printf("\nflash is empty!");
1a4: 84 e2 ldi r24, 0x24 ; 36
1a6: 91 e0 ldi r25, 0x01 ; 1
1a8: 9f 93 push r25
1aa: 8f 93 push r24
1ac: 0e 94 8e 16 call 0x2d1c
1b0: 0f 90 pop r0
1b2: 0f 90 pop r0
}
Timer3_set_flag=100;
1b4: 84 e6 ldi r24, 0x64 ; 100
1b6: 80 93 b9 03 sts 0x03B9, r24
Timer3_sethalfsymbol(2000);
1ba: 80 ed ldi r24, 0xD0 ; 208
1bc: 97 e0 ldi r25, 0x07 ; 7
1be: 0e 94 11 03 call 0x622
demopacket=malloc(sizeof(demo_datapacket));
1c2: 8e e0 ldi r24, 0x0E ; 14
1c4: 90 e0 ldi r25, 0x00 ; 0
1c6: 0e 94 83 15 call 0x2b06
1ca: fc 01 movw r30, r24
1cc: 90 93 d1 07 sts 0x07D1, r25
1d0: 80 93 d0 07 sts 0x07D0, r24
demopacket->length=0x0f;
1d4: 8f e0 ldi r24, 0x0F ; 15
1d6: 80 83 st Z, r24
demopacket->fcf=0x8841;
1d8: 81 e4 ldi r24, 0x41 ; 65
1da: 98 e8 ldi r25, 0x88 ; 136
1dc: 81 83 std Z+1, r24 ; 0x01
1de: 92 83 std Z+2, r25 ; 0x02
demopacket->dsn=0x01;
1e0: 21 e0 ldi r18, 0x01 ; 1
1e2: 23 83 std Z+3, r18 ; 0x03
demopacket->address.destination_pan=0x0004;
1e4: 84 e0 ldi r24, 0x04 ; 4
1e6: 90 e0 ldi r25, 0x00 ; 0
1e8: 84 83 std Z+4, r24 ; 0x04
1ea: 95 83 std Z+5, r25 ; 0x05
demopacket->address.destination_address=0x0004;
1ec: 86 83 std Z+6, r24 ; 0x06
1ee: 97 83 std Z+7, r25 ; 0x07
demopacket->address.source_pan=0x0002;//change 0x0001 to 0x0002
1f0: 02 e0 ldi r16, 0x02 ; 2
1f2: 10 e0 ldi r17, 0x00 ; 0
1f4: 00 87 std Z+8, r16 ; 0x08
1f6: 11 87 std Z+9, r17 ; 0x09
demopacket->address.source_address=0x0002;
1f8: 02 87 std Z+10, r16 ; 0x0a
1fa: 13 87 std Z+11, r17 ; 0x0b
cc2420_setchnl(1);
1fc: 82 2f mov r24, r18
1fe: 0e 94 70 0a call 0x14e0
cc2420_setrxmode();
202: 0e 94 58 0a call 0x14b0
cc2420_enableAddrDecode();
206: 0e 94 3a 0a call 0x1474
cc2420_setpanid(0x0002);
20a: c8 01 movw r24, r16
20c: 0e 94 bd 0a call 0x157a
cc2420_setshortaddress(0x0002);
210: c8 01 movw r24, r16
212: 0e 94 89 0a call 0x1512
cc2420_enablefifop();
216: 0e 94 56 07 call 0xeac
Leds_greenOn();
21a: 0e 94 6a 01 call 0x2d4
Leds_redOff();
21e: 0e 94 b7 01 call 0x36e
Leds_yellowOn();
222: 0e 94 2f 01 call 0x25e
while(1) {
OS_run_task();
226: 0e 94 93 02 call 0x526
22a: fd cf rjmp .-6 ; 0x226
0000022c <Leds_init>:
//-----------------------------------------------------显示led驱
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -