📄 spokepov.lss
字号:
spokepov.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000808 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000008 00800060 00000808 0000089c 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000047 00800068 00800068 000008a4 2**0
ALLOC
3 .noinit 00000000 008000af 008000af 000008a4 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 000008a4 2**0
CONTENTS
5 .stab 00000354 00000000 00000000 000008a4 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 00000084 00000000 00000000 00000bf8 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_aranges 00000028 00000000 00000000 00000c7c 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_pubnames 00000218 00000000 00000000 00000ca4 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_info 000006f5 00000000 00000000 00000ebc 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_abbrev 000001c2 00000000 00000000 000015b1 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_line 000005f6 00000000 00000000 00001773 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_str 000002f1 00000000 00000000 00001d69 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 32 c0 rjmp .+100 ; 0x66 <__init>
2: 9c c1 rjmp .+824 ; 0x33c <__vector_1>
4: d9 c1 rjmp .+946 ; 0x3b8 <__vector_2>
6: 48 c0 rjmp .+144 ; 0x98 <__bad_interrupt>
8: b1 c0 rjmp .+354 ; 0x16c <__vector_4>
a: 46 c0 rjmp .+140 ; 0x98 <__bad_interrupt>
c: 6d c0 rjmp .+218 ; 0xe8 <__vector_6>
e: 44 c0 rjmp .+136 ; 0x98 <__bad_interrupt>
10: 43 c0 rjmp .+134 ; 0x98 <__bad_interrupt>
12: 42 c0 rjmp .+132 ; 0x98 <__bad_interrupt>
14: 41 c0 rjmp .+130 ; 0x98 <__bad_interrupt>
16: 40 c0 rjmp .+128 ; 0x98 <__bad_interrupt>
18: 3f c0 rjmp .+126 ; 0x98 <__bad_interrupt>
1a: 3e c0 rjmp .+124 ; 0x98 <__bad_interrupt>
1c: 3d c0 rjmp .+122 ; 0x98 <__bad_interrupt>
1e: 3c c0 rjmp .+120 ; 0x98 <__bad_interrupt>
20: 3b c0 rjmp .+118 ; 0x98 <__bad_interrupt>
22: 3a c0 rjmp .+116 ; 0x98 <__bad_interrupt>
24: 39 c0 rjmp .+114 ; 0x98 <__bad_interrupt>
00000026 <__ctors_end>:
26: 30 30 cpi r19, 0x00 ; 0
28: 33 30 cpi r19, 0x03 ; 3
2a: 30 36 cpi r19, 0x60 ; 96
2c: 30 31 cpi r19, 0x10 ; 16
2e: 31 30 cpi r19, 0x01 ; 1
30: 32 33 cpi r19, 0x32 ; 50
32: 30 34 cpi r19, 0x40 ; 64
34: 36 30 cpi r19, 0x06 ; 6
36: 39 32 cpi r19, 0x29 ; 41
38: 31 38 cpi r19, 0x81 ; 129
3a: 33 33 cpi r19, 0x33 ; 51
3c: 36 36 cpi r19, 0x66 ; 102
3e: 37 33 cpi r19, 0x37 ; 55
40: 32 00 .word 0x0032 ; ????
00000042 <dInfo>:
42: 00 28 00 .(.
00000045 <lines>:
45: 20 20 20 52 50 4d 20 43 4f 55 4e 54 3a 20 20 20 RPM COUNT:
55: 20 20 20 20 20 20 30 30 30 30 20 20 20 20 20 20 0000
...
00000066 <__init>:
66: 11 24 eor r1, r1
68: 1f be out 0x3f, r1 ; 63
6a: cf ed ldi r28, 0xDF ; 223
6c: cd bf out 0x3d, r28 ; 61
0000006e <__do_copy_data>:
6e: 10 e0 ldi r17, 0x00 ; 0
70: a0 e6 ldi r26, 0x60 ; 96
72: b0 e0 ldi r27, 0x00 ; 0
74: e8 e0 ldi r30, 0x08 ; 8
76: f8 e0 ldi r31, 0x08 ; 8
78: 03 c0 rjmp .+6 ; 0x80 <.do_copy_data_start>
0000007a <.do_copy_data_loop>:
7a: c8 95 lpm
7c: 31 96 adiw r30, 0x01 ; 1
7e: 0d 92 st X+, r0
00000080 <.do_copy_data_start>:
80: a8 36 cpi r26, 0x68 ; 104
82: b1 07 cpc r27, r17
84: d1 f7 brne .-12 ; 0x7a <.do_copy_data_loop>
00000086 <__do_clear_bss>:
86: 10 e0 ldi r17, 0x00 ; 0
88: a8 e6 ldi r26, 0x68 ; 104
8a: b0 e0 ldi r27, 0x00 ; 0
8c: 01 c0 rjmp .+2 ; 0x90 <.do_clear_bss_start>
0000008e <.do_clear_bss_loop>:
8e: 1d 92 st X+, r1
00000090 <.do_clear_bss_start>:
90: af 3a cpi r26, 0xAF ; 175
92: b1 07 cpc r27, r17
94: e1 f7 brne .-8 ; 0x8e <.do_clear_bss_loop>
96: c6 c2 rjmp .+1420 ; 0x624 <main>
00000098 <__bad_interrupt>:
98: b3 cf rjmp .-154 ; 0x0 <__vectors>
0000009a <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) {
9a: cf 93 push r28
9c: c8 2f mov r28, r24
// First, send the basic 4 bytes, they go no matter what
spi_transfer(fleds[0]);
9e: 80 91 89 00 lds r24, 0x0089
a2: 76 d3 rcall .+1772 ; 0x790 <spi_transfer>
spi_transfer(fleds[1]);
a4: 80 91 8a 00 lds r24, 0x008A
a8: 73 d3 rcall .+1766 ; 0x790 <spi_transfer>
spi_transfer(fleds[2]);
aa: 80 91 8b 00 lds r24, 0x008B
ae: 70 d3 rcall .+1760 ; 0x790 <spi_transfer>
spi_transfer(fleds[3]);
b0: 80 91 8c 00 lds r24, 0x008C
b4: 6d d3 rcall .+1754 ; 0x790 <spi_transfer>
// If there is anything to do..
if (sCount != 0) {
b6: cc 23 and r28, r28
b8: 79 f0 breq .+30 ; 0xd8 <clock_scroll+0x3e>
// If we have < 8 bits to transfer
if (sCount < 8) {
ba: c8 30 cpi r28, 0x08 ; 8
bc: 20 f4 brcc .+8 ; 0xc6 <clock_scroll+0x2c>
// Then that is all that we need to do
spi_transfer_n(fleds[4],sCount);
be: 6c 2f mov r22, r28
c0: 80 91 8d 00 lds r24, 0x008D
c4: 08 c0 rjmp .+16 ; 0xd6 <clock_scroll+0x3c>
} else {
// First latch out the full first 8 bits
spi_transfer(fleds[4]);
c6: 80 91 8d 00 lds r24, 0x008D
ca: 62 d3 rcall .+1732 ; 0x790 <spi_transfer>
// How many bits left to do?
sCount = sCount - 8;
cc: c8 50 subi r28, 0x08 ; 8
if (sCount != 0) {
ce: 21 f0 breq .+8 ; 0xd8 <clock_scroll+0x3e>
spi_transfer_n(fleds[5],sCount);
d0: 6c 2f mov r22, r28
d2: 80 91 8e 00 lds r24, 0x008E
d6: 4e d3 rcall .+1692 ; 0x774 <spi_transfer_n>
}
}
}
// finally, latch the bits into the LEDS
LATCH_SELECT_PORT |= _BV(FRONT);
d8: 94 9a sbi 0x12, 4 ; 18
...
NOP; NOP; NOP; NOP;
LATCH_SELECT_PORT &= ~_BV(FRONT);
e2: 94 98 cbi 0x12, 4 ; 18
e4: cf 91 pop r28
e6: 08 95 ret
000000e8 <__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) {
e8: 1f 92 push r1
ea: 0f 92 push r0
ec: 0f b6 in r0, 0x3f ; 63
ee: 0f 92 push r0
f0: 11 24 eor r1, r1
f2: 2f 93 push r18
f4: 8f 93 push r24
f6: 9f 93 push r25
// *** PORTB |= 0x1;
if (hall_debounce != 0xFF)
f8: 80 91 86 00 lds r24, 0x0086
fc: 8f 3f cpi r24, 0xFF ; 255
fe: 29 f0 breq .+10 ; 0x10a <__vector_6+0x22>
hall_debounce++;
100: 80 91 86 00 lds r24, 0x0086
104: 8f 5f subi r24, 0xFF ; 255
106: 80 93 86 00 sts 0x0086, r24
if (sensor_timer != 0xFFFF)
10a: 80 91 87 00 lds r24, 0x0087
10e: 90 91 88 00 lds r25, 0x0088
112: 8f 5f subi r24, 0xFF ; 255
114: 9f 4f sbci r25, 0xFF ; 255
116: 49 f0 breq .+18 ; 0x12a <__vector_6+0x42>
sensor_timer++;
118: 80 91 87 00 lds r24, 0x0087
11c: 90 91 88 00 lds r25, 0x0088
120: 01 96 adiw r24, 0x01 ; 1
122: 90 93 88 00 sts 0x0088, r25
126: 80 93 87 00 sts 0x0087, r24
#if NUM_LINES > 0
// Increment the line timers - we only need to do this
// if we are scrolling
line_timer_l++; // increment the low byte
12a: 80 91 62 00 lds r24, 0x0062
12e: 8f 5f subi r24, 0xFF ; 255
130: 80 93 62 00 sts 0x0062, r24
if (line_timer_l == 0) { // if we wrapped around, then
134: 80 91 62 00 lds r24, 0x0062
138: 88 23 and r24, r24
13a: 29 f4 brne .+10 ; 0x146 <__vector_6+0x5e>
line_timer_h++; // increment the high byte as well
13c: 80 91 70 00 lds r24, 0x0070
140: 8f 5f subi r24, 0xFF ; 255
142: 80 93 70 00 sts 0x0070, r24
146: 9f 91 pop r25
148: 8f 91 pop r24
14a: 2f 91 pop r18
14c: 0f 90 pop r0
14e: 0f be out 0x3f, r0 ; 63
150: 0f 90 pop r0
152: 1f 90 pop r1
154: 18 95 reti
00000156 <set_all>:
}
#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) {
uint8_t cCode; // character code to display
#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?
if (sensor_timer < ((F_CPU/NUM_PIXELS)/256 * STANDBY_TIMEOUT)) {
// *** PORTA |= 0x1;
// The first thing we do is increment our character position; this
// is done here to avoid code duplication. This means that the
// Hall Effect interrupt routine must set them up so they "wrap"
// into the first valid values.
// Move to the next pixel in the character
pNum++;
// If we have moved off the edge of the character, then
// we need to move to the next character
if (pNum == 16) {
// If we will wrap around to the first character, turn off the pixel
// timer, clear the display, and exit. Might speed things up a bit
if (cNum == 15) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -