📄 spokepov.lss
字号:
spokepov.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000548 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000004 00800060 00000548 000005dc 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000041 00800064 00800064 000005e0 2**0
ALLOC
3 .noinit 00000000 008000a5 008000a5 000005e0 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 000005e0 2**0
CONTENTS
5 .stab 00000354 00000000 00000000 000005e0 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 00000084 00000000 00000000 00000934 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_aranges 00000028 00000000 00000000 000009b8 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_pubnames 000001a1 00000000 00000000 000009e0 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_info 00000535 00000000 00000000 00000b81 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_abbrev 000001dc 00000000 00000000 000010b6 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_line 00000495 00000000 00000000 00001292 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_str 0000025d 00000000 00000000 00001727 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 36 c0 rjmp .+108 ; 0x6e <__init>
2: 50 c1 rjmp .+672 ; 0x2a4 <__vector_1>
4: 69 c1 rjmp .+722 ; 0x2d8 <__vector_2>
6: 4c c0 rjmp .+152 ; 0xa0 <__bad_interrupt>
8: a3 c0 rjmp .+326 ; 0x150 <__vector_4>
a: 4a c0 rjmp .+148 ; 0xa0 <__bad_interrupt>
c: 71 c0 rjmp .+226 ; 0xf0 <__vector_6>
e: 48 c0 rjmp .+144 ; 0xa0 <__bad_interrupt>
10: 47 c0 rjmp .+142 ; 0xa0 <__bad_interrupt>
12: 46 c0 rjmp .+140 ; 0xa0 <__bad_interrupt>
14: 45 c0 rjmp .+138 ; 0xa0 <__bad_interrupt>
16: 44 c0 rjmp .+136 ; 0xa0 <__bad_interrupt>
18: 43 c0 rjmp .+134 ; 0xa0 <__bad_interrupt>
1a: 42 c0 rjmp .+132 ; 0xa0 <__bad_interrupt>
1c: 41 c0 rjmp .+130 ; 0xa0 <__bad_interrupt>
1e: 40 c0 rjmp .+128 ; 0xa0 <__bad_interrupt>
20: 3f c0 rjmp .+126 ; 0xa0 <__bad_interrupt>
22: 3e c0 rjmp .+124 ; 0xa0 <__bad_interrupt>
24: 3d c0 rjmp .+122 ; 0xa0 <__bad_interrupt>
00000026 <__ctors_end>:
26: 20 20 and r2, r0
28: 20 20 and r2, r0
2a: 20 20 and r2, r0
2c: 20 20 and r2, r0
2e: 20 20 and r2, r0
30: 20 20 and r2, r0
32: 20 20 and r2, r0
34: 20 20 and r2, r0
36: 20 20 and r2, r0
38: 58 58 subi r21, 0x88 ; 136
3a: 3a 58 subi r19, 0x8A ; 138
3c: 58 3a cpi r21, 0xA8 ; 168
3e: 58 58 subi r21, 0x88 ; 136
40: 20 43 sbci r18, 0x30 ; 48
42: 44 54 subi r20, 0x44 ; 68
44: 20 20 and r2, r0
46: 20 20 and r2, r0
48: 20 43 sbci r18, 0x30 ; 48
4a: 6f 6d ori r22, 0xDF ; 223
4c: 70 6c ori r23, 0xC0 ; 192
4e: 65 74 andi r22, 0x45 ; 69
50: 65 6c ori r22, 0xC5 ; 197
52: 79 20 and r7, r9
54: 20 20 and r2, r0
56: 20 20 and r2, r0
58: 20 44 sbci r18, 0x40 ; 64
5a: 61 6e ori r22, 0xE1 ; 225
5c: 67 65 ori r22, 0x57 ; 87
5e: 72 6f ori r23, 0xF2 ; 242
60: 75 73 andi r23, 0x35 ; 53
62: 20 20 and r2, r0
64: 20 20 and r2, r0
...
00000067 <lineOffsets>:
67: 00 10 20 30 00 00 10 .. 0...
0000006e <__init>:
6e: 11 24 eor r1, r1
70: 1f be out 0x3f, r1 ; 63
72: cf ed ldi r28, 0xDF ; 223
74: cd bf out 0x3d, r28 ; 61
00000076 <__do_copy_data>:
76: 10 e0 ldi r17, 0x00 ; 0
78: a0 e6 ldi r26, 0x60 ; 96
7a: b0 e0 ldi r27, 0x00 ; 0
7c: e8 e4 ldi r30, 0x48 ; 72
7e: f5 e0 ldi r31, 0x05 ; 5
80: 03 c0 rjmp .+6 ; 0x88 <.do_copy_data_start>
00000082 <.do_copy_data_loop>:
82: c8 95 lpm
84: 31 96 adiw r30, 0x01 ; 1
86: 0d 92 st X+, r0
00000088 <.do_copy_data_start>:
88: a4 36 cpi r26, 0x64 ; 100
8a: b1 07 cpc r27, r17
8c: d1 f7 brne .-12 ; 0x82 <.do_copy_data_loop>
0000008e <__do_clear_bss>:
8e: 10 e0 ldi r17, 0x00 ; 0
90: a4 e6 ldi r26, 0x64 ; 100
92: b0 e0 ldi r27, 0x00 ; 0
94: 01 c0 rjmp .+2 ; 0x98 <.do_clear_bss_start>
00000096 <.do_clear_bss_loop>:
96: 1d 92 st X+, r1
00000098 <.do_clear_bss_start>:
98: a5 3a cpi r26, 0xA5 ; 165
9a: b1 07 cpc r27, r17
9c: e1 f7 brne .-8 ; 0x96 <.do_clear_bss_loop>
9e: e9 c1 rjmp .+978 ; 0x472 <main>
000000a0 <__bad_interrupt>:
a0: af cf rjmp .-162 ; 0x0 <__vectors>
000000a2 <clock_scroll>:
// Sends 4 bytes + sCount extra bits over the serial link
// to implement smooth scrolling. Can be used with a 0
// parameter to just send out the regular 4 bytes.
void clock_scroll(uint8_t sCount) {
a2: cf 93 push r28
a4: c8 2f mov r28, r24
// First, send the basic 4 bytes, they go no matter what
spi_transfer(fleds[0]);
a6: 80 91 7f 00 lds r24, 0x007F
aa: 12 d2 rcall .+1060 ; 0x4d0 <spi_transfer>
spi_transfer(fleds[1]);
ac: 80 91 80 00 lds r24, 0x0080
b0: 0f d2 rcall .+1054 ; 0x4d0 <spi_transfer>
spi_transfer(fleds[2]);
b2: 80 91 81 00 lds r24, 0x0081
b6: 0c d2 rcall .+1048 ; 0x4d0 <spi_transfer>
spi_transfer(fleds[3]);
b8: 80 91 82 00 lds r24, 0x0082
bc: 09 d2 rcall .+1042 ; 0x4d0 <spi_transfer>
// If there is anything to do..
if (sCount != 0) {
be: cc 23 and r28, r28
c0: 79 f0 breq .+30 ; 0xe0 <__stack+0x1>
// If we have < 8 bits to transfer
if (sCount < 8) {
c2: c8 30 cpi r28, 0x08 ; 8
c4: 20 f4 brcc .+8 ; 0xce <clock_scroll+0x2c>
// Then that is all that we need to do
spi_transfer_n(fleds[4],sCount);
c6: 6c 2f mov r22, r28
c8: 80 91 83 00 lds r24, 0x0083
cc: 08 c0 rjmp .+16 ; 0xde <clock_scroll+0x3c>
} else {
// First latch out the full first 8 bits
spi_transfer(fleds[4]);
ce: 80 91 83 00 lds r24, 0x0083
d2: fe d1 rcall .+1020 ; 0x4d0 <spi_transfer>
// How many bits left to do?
sCount = sCount - 8;
d4: c8 50 subi r28, 0x08 ; 8
if (sCount != 0) {
d6: 21 f0 breq .+8 ; 0xe0 <__stack+0x1>
spi_transfer_n(fleds[5],sCount);
d8: 6c 2f mov r22, r28
da: 80 91 84 00 lds r24, 0x0084
de: ea d1 rcall .+980 ; 0x4b4 <spi_transfer_n>
}
}
}
// finally, latch the bits into the LEDS
LATCH_SELECT_PORT |= _BV(FRONT);
e0: 94 9a sbi 0x12, 4 ; 18
...
NOP; NOP; NOP; NOP;
LATCH_SELECT_PORT &= ~_BV(FRONT);
ea: 94 98 cbi 0x12, 4 ; 18
ec: cf 91 pop r28
ee: 08 95 ret
000000f0 <__vector_6>:
}
// TIMER0 interrupt handler. This runs about every 8ms
// AFAICT. It increments the hall_debounce and sensor_timer
// values until they pin.
// QUESTION: what's with the setting and clearing of PORTB0?
// According to the wiring diagram, it isn't connected to
// anything. Is this vestigial code from when you were using
// Pin Change Interrupts? Or is it debugger code so you
// can monitor the pins and tell when something happens.
SIGNAL (SIG_TIMER0_OVF) {
f0: 1f 92 push r1
f2: 0f 92 push r0
f4: 0f b6 in r0, 0x3f ; 63
f6: 0f 92 push r0
f8: 11 24 eor r1, r1
fa: 8f 93 push r24
fc: 9f 93 push r25
// *** PORTB |= 0x1;
// Let hall_debounce just wrap around. At worst it'll just
// mess things up for one of the initial speedup rotations
// of the blade...
// if (hall_debounce != 0xFF)
hall_debounce++;
fe: 80 91 7c 00 lds r24, 0x007C
102: 8f 5f subi r24, 0xFF ; 255
104: 80 93 7c 00 sts 0x007C, r24
if (sensor_timer.bytes.high_byte != 0xFF)
108: 80 91 7e 00 lds r24, 0x007E
10c: 8f 3f cpi r24, 0xFF ; 255
10e: 49 f0 breq .+18 ; 0x122 <__vector_6+0x32>
sensor_timer.word++;
110: 80 91 7d 00 lds r24, 0x007D
114: 90 91 7e 00 lds r25, 0x007E
118: 01 96 adiw r24, 0x01 ; 1
11a: 90 93 7e 00 sts 0x007E, r25
11e: 80 93 7d 00 sts 0x007D, r24
#if NUM_LINES > 0
// Increment the line timer - we only need to do this
// if we are scrolling
line_timer++; // increment the low byte
122: 80 91 62 00 lds r24, 0x0062
126: 8f 5f subi r24, 0xFF ; 255
128: 80 93 62 00 sts 0x0062, r24
12c: 9f 91 pop r25
12e: 8f 91 pop r24
130: 0f 90 pop r0
132: 0f be out 0x3f, r0 ; 63
134: 0f 90 pop r0
136: 1f 90 pop r1
138: 18 95 reti
0000013a <set_all>:
#endif
#ifdef DYNAMIC_TIME
// Increment the dynamic time fractional seconds byte
dynamicTimeCounter.word += DYNAMIC_TIME_CALIBRATION;
if (dynamicTimeCounter.bytes.high_byte > 0x7F) {
// wrap the counter
dynamicTimeCounter.bytes.high_byte &= 0x7F;
// Add 1 second to the time HH:MM:SS
// 76-43-10
// Bytes in reverse order
// Increment seconds
dynamicTime[0]++;
// Check for units seconds overflow - has the digit become 10?
if ( dynamicTime[0] == ':' ) {
// If so, reset it and increment 10's digit
dynamicTime[0] = '0';
dynamicTime[1]++;
// Repeat the process for the 10s seconds digit, has it become
// 6?
if ( dynamicTime[1] == '6' ) {
// reset it and increment minutes digit
dynamicTime[1] = '0';
dynamicTime[3]++;
// Repeat process for minutes
if ( dynamicTime[3] == ':' ) {
// You should get the idea now...
dynamicTime[3] = '0';
dynamicTime[4]++;
if ( dynamicTime[4] == '6' ) {
dynamicTime[4] = '0';
dynamicTime[6]++;
// and 10s of hours
if ( dynamicTime[6] == ':' ) {
dynamicTime[6] = '0';
dynamicTime[7]++;
}
// handle special wrap
#ifdef DYNAMIC_TIME_12H
if ( (dynamicTime[7] == '1') && (dynamicTime[6] == '3') ) {
dynamicTime[7] = '0';
dynamicTime[6] = '1';
}
#else
if ( (dynamicTime[7] == '2') && (dynamicTime[6] == '4') ) {
dynamicTime[7] = dynamicTime[6] = '0';
}
#endif
}
}
}
}
}
#endif
// *** PORTB &= ~0x1;
}
// Hack - I used to copy the topChar, etc. variables into local
// variables in the TIMER1 routine, but I am running out of stack space. So instead
// I'm going to keep interrupts off during this routine and
// use the regular versions. To make it easy to do this I'm
// remapping the local variables with defines.
// #define USE_LOCAL_TIMER1 1
// If USE_LOCAL_TIMER1 is not defined, then the TIMER1 routine will not
// enable interrupts.
// As we sweep around the circle, we display 256 radial pixel
// lines, once per TIMER1 interrupt. This is broken down into
// 16 16-pixel wide characters, and we have two characters
// stacked vertically. To save time, we keep track of the
// character number, pixel number (in the character), and
// pointers into the eeprom for each of the two chars being
// displayed.
// This code has to be fast enough to complete execution before
// it gets interrupted again - and it must not make any subroutine
// calls, since that'll mess up the stack and cause the entire
// system to reset.
volatile uint16_t topChar = 0; // top character being displayed (address in EEPROM of data)
volatile uint16_t botChar = 0; // bottom character being displayed
volatile uint8_t charNum = 0; // character number
volatile uint8_t pixelNum = 0; // pixel number
#ifdef USE_LOCAL_TIMER1
volatile uint8_t clean = 0; // have these values been changed outside TIMER1?
#endif
#ifdef SMOOTHSCROLL
volatile uint16_t scrollChar = 0; // extra scroll character
#endif
// This routine gets called every time the pixel timer runs down;
// in other words, once per "scan line", 256 times per revolution
// of the SpokePOV. Its purpose is to update the LEDs.
SIGNAL (SIG_TIMER1_COMPA) {
#ifdef USE_LOCALUSE_LOCAL_TIMER1
uint16_t tChar; // local copies of the values
uint16_t bChar;
uint8_t cNum;
uint8_t pNum;
#ifdef SMOOTHSCROLL
uint16_t sChar; // extra scroll character
#endif
// When an interrupt routine is called, interrupts are disabled.
// but it's important to let other interrupts interrupt us, so
// they need to be re-enabled.
sei();
// Copy the volatile variables into their local equivalents
tChar = topChar;
bChar = botChar;
cNum = charNum;
pNum = pixelNum;
#ifdef SMOOTHSCROLL
sChar = scrollChar;
#endif
#else
#define tChar topChar
#define bChar botChar
#define cNum charNum
#define pNum pixelNum
#define sChar scrollChar
#endif
// If it has been less than STANDBY_TIMEOUT seconds since the last time we
// got a Hall Effect sensor update, then proceed as normal and
// update the LEDs.
// QUESTION: what is F_CPU? ANSWER: FREQUENCY OF CPU (clocks/second)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -