task1.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 000001d8 08000000 08000000 00001000 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 000004bc 080001d8 080001d8 000011d8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00000000 08000694 0800069c 0000169c 2**0 CONTENTS, ALLOC, LOAD, DATA 3 .ARM.extab 00000000 08000694 08000694 0000169c 2**0 CONTENTS 4 .ARM 00000000 08000694 08000694 0000169c 2**0 CONTENTS 5 .preinit_array 00000000 08000694 0800069c 0000169c 2**0 CONTENTS, ALLOC, LOAD, DATA 6 .init_array 00000004 08000694 08000694 00001694 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .fini_array 00000004 08000698 08000698 00001698 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .data 00000000 20000000 20000000 0000169c 2**0 CONTENTS, ALLOC, LOAD, DATA 9 .ccmsram 00000000 10000000 10000000 0000169c 2**0 CONTENTS 10 .bss 00000020 20000000 20000000 00002000 2**2 ALLOC 11 ._user_heap_stack 00000600 20000020 20000020 00002000 2**0 ALLOC 12 .ARM.attributes 00000030 00000000 00000000 0000169c 2**0 CONTENTS, READONLY 13 .debug_info 000007eb 00000000 00000000 000016cc 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_abbrev 00000296 00000000 00000000 00001eb7 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_aranges 00000078 00000000 00000000 00002150 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_rnglists 0000003a 00000000 00000000 000021c8 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_macro 00013740 00000000 00000000 00002202 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .debug_line 00000a3e 00000000 00000000 00015942 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 19 .debug_str 0006f831 00000000 00000000 00016380 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 20 .comment 00000043 00000000 00000000 00085bb1 2**0 CONTENTS, READONLY 21 .debug_frame 000000e4 00000000 00000000 00085bf4 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 22 .debug_line_str 0000007a 00000000 00000000 00085cd8 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 080001d8 <__do_global_dtors_aux>: 80001d8: b510 push {r4, lr} 80001da: 4c05 ldr r4, [pc, #20] @ (80001f0 <__do_global_dtors_aux+0x18>) 80001dc: 7823 ldrb r3, [r4, #0] 80001de: b933 cbnz r3, 80001ee <__do_global_dtors_aux+0x16> 80001e0: 4b04 ldr r3, [pc, #16] @ (80001f4 <__do_global_dtors_aux+0x1c>) 80001e2: b113 cbz r3, 80001ea <__do_global_dtors_aux+0x12> 80001e4: 4804 ldr r0, [pc, #16] @ (80001f8 <__do_global_dtors_aux+0x20>) 80001e6: f3af 8000 nop.w 80001ea: 2301 movs r3, #1 80001ec: 7023 strb r3, [r4, #0] 80001ee: bd10 pop {r4, pc} 80001f0: 20000000 .word 0x20000000 80001f4: 00000000 .word 0x00000000 80001f8: 0800067c .word 0x0800067c 080001fc : 80001fc: b508 push {r3, lr} 80001fe: 4b03 ldr r3, [pc, #12] @ (800020c ) 8000200: b11b cbz r3, 800020a 8000202: 4903 ldr r1, [pc, #12] @ (8000210 ) 8000204: 4803 ldr r0, [pc, #12] @ (8000214 ) 8000206: f3af 8000 nop.w 800020a: bd08 pop {r3, pc} 800020c: 00000000 .word 0x00000000 8000210: 20000004 .word 0x20000004 8000214: 0800067c .word 0x0800067c 08000218
: static void GPIO_init(void); static void delay(const uint16_t ms); /* ------------------------------------ M A I N --------------------------------------- */ int main(void) { 8000218: b580 push {r7, lr} 800021a: b084 sub sp, #16 800021c: af00 add r7, sp, #0 \details Disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __STATIC_FORCEINLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 800021e: b672 cpsid i } 8000220: bf00 nop /* --- initialization --- */ __disable_irq(); // disable interrupts globally GPIO_init(); 8000222: f000 f8e9 bl 80003f8 __ASM volatile ("cpsie i" : : : "memory"); 8000226: b662 cpsie i } 8000228: bf00 nop __enable_irq(); // enable interrupts globally /* --- one time tasks --- */ //s0 Hilfvariablen auserhalb von while deklarieren int running = 0; //0 Lauflicht aus, 1 Lauflicht an 800022a: 2300 movs r3, #0 800022c: 60fb str r3, [r7, #12] int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung 800022e: 2301 movs r3, #1 8000230: 60bb str r3, [r7, #8] /* --- infinite processing loop --- */ while (1) { int buttonState = GPIOB->IDR & (1 << 0); 8000232: 4b6f ldr r3, [pc, #444] @ (80003f0 ) 8000234: 691b ldr r3, [r3, #16] 8000236: f003 0301 and.w r3, r3, #1 800023a: 607b str r3, [r7, #4] // fallende Flanke erkennen if (lastButtonState && !buttonState) 800023c: 68bb ldr r3, [r7, #8] 800023e: 2b00 cmp r3, #0 8000240: d006 beq.n 8000250 8000242: 687b ldr r3, [r7, #4] 8000244: 2b00 cmp r3, #0 8000246: d103 bne.n 8000250 { running ^= 1; // toggle running 8000248: 68fb ldr r3, [r7, #12] 800024a: f083 0301 eor.w r3, r3, #1 800024e: 60fb str r3, [r7, #12] /* delay(50); // entprellen */ } lastButtonState = buttonState; 8000250: 687b ldr r3, [r7, #4] 8000252: 60bb str r3, [r7, #8] if(running) 8000254: 68fb ldr r3, [r7, #12] 8000256: 2b00 cmp r3, #0 8000258: d0eb beq.n 8000232 { switch (state) 800025a: 4b66 ldr r3, [pc, #408] @ (80003f4 ) 800025c: 681b ldr r3, [r3, #0] 800025e: 2b05 cmp r3, #5 8000260: dc12 bgt.n 8000288 8000262: 2b00 cmp r3, #0 8000264: dbe5 blt.n 8000232 8000266: 2b05 cmp r3, #5 8000268: d8e3 bhi.n 8000232 800026a: a201 add r2, pc, #4 @ (adr r2, 8000270 ) 800026c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8000270: 08000291 .word 0x08000291 8000274: 080002c5 .word 0x080002c5 8000278: 080002f9 .word 0x080002f9 800027c: 0800032d .word 0x0800032d 8000280: 08000361 .word 0x08000361 8000284: 08000395 .word 0x08000395 8000288: 2b63 cmp r3, #99 @ 0x63 800028a: f000 809b beq.w 80003c4 800028e: e0ad b.n 80003ec { case 0: state++; 8000290: 4b58 ldr r3, [pc, #352] @ (80003f4 ) 8000292: 681b ldr r3, [r3, #0] 8000294: 3301 adds r3, #1 8000296: 4a57 ldr r2, [pc, #348] @ (80003f4 ) 8000298: 6013 str r3, [r2, #0] GPIOA->ODR &= ~(1 << 0); 800029a: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 800029e: 695b ldr r3, [r3, #20] 80002a0: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80002a4: f023 0301 bic.w r3, r3, #1 80002a8: 6153 str r3, [r2, #20] delay(WAITTIME); 80002aa: f240 104d movw r0, #333 @ 0x14d 80002ae: f000 f915 bl 80004dc GPIOA->ODR |= (1 << 0); 80002b2: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80002b6: 695b ldr r3, [r3, #20] 80002b8: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80002bc: f043 0301 orr.w r3, r3, #1 80002c0: 6153 str r3, [r2, #20] break; 80002c2: e093 b.n 80003ec case 1: state++; 80002c4: 4b4b ldr r3, [pc, #300] @ (80003f4 ) 80002c6: 681b ldr r3, [r3, #0] 80002c8: 3301 adds r3, #1 80002ca: 4a4a ldr r2, [pc, #296] @ (80003f4 ) 80002cc: 6013 str r3, [r2, #0] GPIOA->ODR &= ~(1 << 1); 80002ce: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80002d2: 695b ldr r3, [r3, #20] 80002d4: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80002d8: f023 0302 bic.w r3, r3, #2 80002dc: 6153 str r3, [r2, #20] delay(WAITTIME); 80002de: f240 104d movw r0, #333 @ 0x14d 80002e2: f000 f8fb bl 80004dc GPIOA->ODR |= (1 << 1); 80002e6: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80002ea: 695b ldr r3, [r3, #20] 80002ec: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80002f0: f043 0302 orr.w r3, r3, #2 80002f4: 6153 str r3, [r2, #20] break; 80002f6: e079 b.n 80003ec case 2: state++; 80002f8: 4b3e ldr r3, [pc, #248] @ (80003f4 ) 80002fa: 681b ldr r3, [r3, #0] 80002fc: 3301 adds r3, #1 80002fe: 4a3d ldr r2, [pc, #244] @ (80003f4 ) 8000300: 6013 str r3, [r2, #0] GPIOA->ODR &= ~(1 << 2); 8000302: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000306: 695b ldr r3, [r3, #20] 8000308: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800030c: f023 0304 bic.w r3, r3, #4 8000310: 6153 str r3, [r2, #20] delay(WAITTIME); 8000312: f240 104d movw r0, #333 @ 0x14d 8000316: f000 f8e1 bl 80004dc GPIOA->ODR |= (1 << 2); 800031a: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 800031e: 695b ldr r3, [r3, #20] 8000320: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 8000324: f043 0304 orr.w r3, r3, #4 8000328: 6153 str r3, [r2, #20] break; 800032a: e05f b.n 80003ec case 3: state++; 800032c: 4b31 ldr r3, [pc, #196] @ (80003f4 ) 800032e: 681b ldr r3, [r3, #0] 8000330: 3301 adds r3, #1 8000332: 4a30 ldr r2, [pc, #192] @ (80003f4 ) 8000334: 6013 str r3, [r2, #0] GPIOA->ODR &= ~(1 << 3); 8000336: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 800033a: 695b ldr r3, [r3, #20] 800033c: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 8000340: f023 0308 bic.w r3, r3, #8 8000344: 6153 str r3, [r2, #20] delay(WAITTIME); 8000346: f240 104d movw r0, #333 @ 0x14d 800034a: f000 f8c7 bl 80004dc GPIOA->ODR |= (1 << 3); 800034e: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000352: 695b ldr r3, [r3, #20] 8000354: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 8000358: f043 0308 orr.w r3, r3, #8 800035c: 6153 str r3, [r2, #20] break; 800035e: e045 b.n 80003ec case 4: state++; 8000360: 4b24 ldr r3, [pc, #144] @ (80003f4 ) 8000362: 681b ldr r3, [r3, #0] 8000364: 3301 adds r3, #1 8000366: 4a23 ldr r2, [pc, #140] @ (80003f4 ) 8000368: 6013 str r3, [r2, #0] GPIOA->ODR &= ~(1 << 2); 800036a: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 800036e: 695b ldr r3, [r3, #20] 8000370: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 8000374: f023 0304 bic.w r3, r3, #4 8000378: 6153 str r3, [r2, #20] delay(WAITTIME); 800037a: f240 104d movw r0, #333 @ 0x14d 800037e: f000 f8ad bl 80004dc GPIOA->ODR |= (1 << 2); 8000382: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000386: 695b ldr r3, [r3, #20] 8000388: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800038c: f043 0304 orr.w r3, r3, #4 8000390: 6153 str r3, [r2, #20] break; 8000392: e02b b.n 80003ec case 5: state=0; 8000394: 4b17 ldr r3, [pc, #92] @ (80003f4 ) 8000396: 2200 movs r2, #0 8000398: 601a str r2, [r3, #0] GPIOA->ODR &= ~(1 << 1); 800039a: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 800039e: 695b ldr r3, [r3, #20] 80003a0: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80003a4: f023 0302 bic.w r3, r3, #2 80003a8: 6153 str r3, [r2, #20] delay(WAITTIME); 80003aa: f240 104d movw r0, #333 @ 0x14d 80003ae: f000 f895 bl 80004dc GPIOA->ODR |= (1 << 1); 80003b2: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80003b6: 695b ldr r3, [r3, #20] 80003b8: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80003bc: f043 0302 orr.w r3, r3, #2 80003c0: 6153 str r3, [r2, #20] break; 80003c2: e013 b.n 80003ec case 99: GPIOA->ODR |= MASK_LED_ALL; 80003c4: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80003c8: 695b ldr r3, [r3, #20] 80003ca: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80003ce: f043 030f orr.w r3, r3, #15 80003d2: 6153 str r3, [r2, #20] while(1){ if((GPIOB->IDR & (1 << 0)) == 0){ 80003d4: 4b06 ldr r3, [pc, #24] @ (80003f0 ) 80003d6: 691b ldr r3, [r3, #16] 80003d8: f003 0301 and.w r3, r3, #1 80003dc: 2b00 cmp r3, #0 80003de: d1f9 bne.n 80003d4 delay(150); 80003e0: 2096 movs r0, #150 @ 0x96 80003e2: f000 f87b bl 80004dc state=0; 80003e6: 4b03 ldr r3, [pc, #12] @ (80003f4 ) 80003e8: 2200 movs r2, #0 80003ea: 601a str r2, [r3, #0] { 80003ec: e721 b.n 8000232 80003ee: bf00 nop 80003f0: 48000400 .word 0x48000400 80003f4: 2000001c .word 0x2000001c 080003f8 : * requires: - nothing - * parameters: - none - * returns: - nothing - \* ------------------------------------------------------------------------------------ */ static void GPIO_init(void) { 80003f8: b480 push {r7} 80003fa: af00 add r7, sp, #0 /* enable port clocks */ RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A 80003fc: 4b35 ldr r3, [pc, #212] @ (80004d4 ) 80003fe: 6cdb ldr r3, [r3, #76] @ 0x4c 8000400: 4a34 ldr r2, [pc, #208] @ (80004d4 ) 8000402: f043 0301 orr.w r3, r3, #1 8000406: 64d3 str r3, [r2, #76] @ 0x4c RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch 8000408: 4b32 ldr r3, [pc, #200] @ (80004d4 ) 800040a: 6cdb ldr r3, [r3, #76] @ 0x4c 800040c: 4a31 ldr r2, [pc, #196] @ (80004d4 ) 800040e: f043 0302 orr.w r3, r3, #2 8000412: 64d3 str r3, [r2, #76] @ 0x4c /* --- LEDs --- */ GPIOA->ODR |= MASK_LED_ALL; 8000414: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000418: 695b ldr r3, [r3, #20] 800041a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800041e: f043 030f orr.w r3, r3, #15 8000422: 6153 str r3, [r2, #20] GPIOA->MODER &= ~(3 << 0); 8000424: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000428: 681b ldr r3, [r3, #0] 800042a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800042e: f023 0303 bic.w r3, r3, #3 8000432: 6013 str r3, [r2, #0] GPIOA->MODER |= (1 << 0); // set LED pin to output 8000434: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000438: 681b ldr r3, [r3, #0] 800043a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800043e: f043 0301 orr.w r3, r3, #1 8000442: 6013 str r3, [r2, #0] /* LED1 als Output */ GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so 8000444: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000448: 681b ldr r3, [r3, #0] 800044a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800044e: f023 030c bic.w r3, r3, #12 8000452: 6013 str r3, [r2, #0] GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so 8000454: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000458: 681b ldr r3, [r3, #0] 800045a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800045e: f043 0304 orr.w r3, r3, #4 8000462: 6013 str r3, [r2, #0] /* LED2 als Output */ GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt 8000464: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000468: 681b ldr r3, [r3, #0] 800046a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800046e: f023 0330 bic.w r3, r3, #48 @ 0x30 8000472: 6013 str r3, [r2, #0] GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt 8000474: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000478: 681b ldr r3, [r3, #0] 800047a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800047e: f043 0310 orr.w r3, r3, #16 8000482: 6013 str r3, [r2, #0] /* LED3 als output */ GPIOA->MODER &= ~(3 << 6); 8000484: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000488: 681b ldr r3, [r3, #0] 800048a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800048e: f023 03c0 bic.w r3, r3, #192 @ 0xc0 8000492: 6013 str r3, [r2, #0] GPIOA->MODER |= (1 << 6); 8000494: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000498: 681b ldr r3, [r3, #0] 800049a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800049e: f043 0340 orr.w r3, r3, #64 @ 0x40 80004a2: 6013 str r3, [r2, #0] /* s0 (PB0) als Input Versuch */ GPIOB->MODER &= ~(3 << 0); 80004a4: 4b0c ldr r3, [pc, #48] @ (80004d8 ) 80004a6: 681b ldr r3, [r3, #0] 80004a8: 4a0b ldr r2, [pc, #44] @ (80004d8 ) 80004aa: f023 0303 bic.w r3, r3, #3 80004ae: 6013 str r3, [r2, #0] /* Pull-Up Aktivieren Versuch */ GPIOB->PUPDR &= ~(3 << 0); 80004b0: 4b09 ldr r3, [pc, #36] @ (80004d8 ) 80004b2: 68db ldr r3, [r3, #12] 80004b4: 4a08 ldr r2, [pc, #32] @ (80004d8 ) 80004b6: f023 0303 bic.w r3, r3, #3 80004ba: 60d3 str r3, [r2, #12] GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up 80004bc: 4b06 ldr r3, [pc, #24] @ (80004d8 ) 80004be: 68db ldr r3, [r3, #12] 80004c0: 4a05 ldr r2, [pc, #20] @ (80004d8 ) 80004c2: f043 0301 orr.w r3, r3, #1 80004c6: 60d3 str r3, [r2, #12] } 80004c8: bf00 nop 80004ca: 46bd mov sp, r7 80004cc: f85d 7b04 ldr.w r7, [sp], #4 80004d0: 4770 bx lr 80004d2: bf00 nop 80004d4: 40021000 .word 0x40021000 80004d8: 48000400 .word 0x48000400 080004dc : * requires: - nothing - * parameters: ms - delay time in milliseconds * returns: - nothing - \* ------------------------------------------------------------------------------------ */ static void delay(const uint16_t ms) { 80004dc: b480 push {r7} 80004de: b085 sub sp, #20 80004e0: af00 add r7, sp, #0 80004e2: 4603 mov r3, r0 80004e4: 80fb strh r3, [r7, #6] for (uint16_t i = 0; i < ms; ++i) 80004e6: 2300 movs r3, #0 80004e8: 81fb strh r3, [r7, #14] 80004ea: e021 b.n 8000530 { if((GPIOB->IDR & (1 << 0) && state != 99) == 0){ 80004ec: 4b16 ldr r3, [pc, #88] @ (8000548 ) 80004ee: 691b ldr r3, [r3, #16] 80004f0: f003 0301 and.w r3, r3, #1 80004f4: 2b00 cmp r3, #0 80004f6: d005 beq.n 8000504 80004f8: 4b14 ldr r3, [pc, #80] @ (800054c ) 80004fa: 681b ldr r3, [r3, #0] 80004fc: 2b63 cmp r3, #99 @ 0x63 80004fe: d001 beq.n 8000504 8000500: 2301 movs r3, #1 8000502: e000 b.n 8000506 8000504: 2300 movs r3, #0 8000506: 2b00 cmp r3, #0 8000508: d103 bne.n 8000512 state = 99; 800050a: 4b10 ldr r3, [pc, #64] @ (800054c ) 800050c: 2263 movs r2, #99 @ 0x63 800050e: 601a str r2, [r3, #0] break; 8000510: e013 b.n 800053a } for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) 8000512: 2300 movs r3, #0 8000514: 81bb strh r3, [r7, #12] 8000516: e003 b.n 8000520 { __asm("NOP"); 8000518: bf00 nop for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) 800051a: 89bb ldrh r3, [r7, #12] 800051c: 3301 adds r3, #1 800051e: 81bb strh r3, [r7, #12] 8000520: 89bb ldrh r3, [r7, #12] 8000522: f240 42db movw r2, #1243 @ 0x4db 8000526: 4293 cmp r3, r2 8000528: d9f6 bls.n 8000518 for (uint16_t i = 0; i < ms; ++i) 800052a: 89fb ldrh r3, [r7, #14] 800052c: 3301 adds r3, #1 800052e: 81fb strh r3, [r7, #14] 8000530: 89fa ldrh r2, [r7, #14] 8000532: 88fb ldrh r3, [r7, #6] 8000534: 429a cmp r2, r3 8000536: d3d9 bcc.n 80004ec } } } 8000538: bf00 nop 800053a: bf00 nop 800053c: 3714 adds r7, #20 800053e: 46bd mov sp, r7 8000540: f85d 7b04 ldr.w r7, [sp], #4 8000544: 4770 bx lr 8000546: bf00 nop 8000548: 48000400 .word 0x48000400 800054c: 2000001c .word 0x2000001c 08000550 : * * Default interrupt handler for core interrupts. * Enables the green and red LED on the STefi Light board. \* ------------------------------------------------------------------------------------ */ void ISR_error(void) { 8000550: b480 push {r7} 8000552: af00 add r7, sp, #0 /* init */ RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // PA: clock on (LEDs) 8000554: 4b10 ldr r3, [pc, #64] @ (8000598 ) 8000556: 6cdb ldr r3, [r3, #76] @ 0x4c 8000558: 4a0f ldr r2, [pc, #60] @ (8000598 ) 800055a: f043 0301 orr.w r3, r3, #1 800055e: 64d3 str r3, [r2, #76] @ 0x4c GPIOA->ODR |= MASK_LED_ALL; 8000560: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000564: 695b ldr r3, [r3, #20] 8000566: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800056a: f043 030f orr.w r3, r3, #15 800056e: 6153 str r3, [r2, #20] GPIOA->MODER = (GPIOA->MODER & 0xFFFFFF00) | 0x11; 8000570: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000574: 681b ldr r3, [r3, #0] 8000576: f023 03ff bic.w r3, r3, #255 @ 0xff 800057a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800057e: f043 0311 orr.w r3, r3, #17 8000582: 6013 str r3, [r2, #0] while(1) { /* light up the LEDs permanently */ GPIOA->ODR &= ~(MASK_LED_GREEN | MASK_LED_RED); 8000584: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 8000588: 695b ldr r3, [r3, #20] 800058a: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 800058e: f023 0305 bic.w r3, r3, #5 8000592: 6153 str r3, [r2, #20] 8000594: e7f6 b.n 8000584 8000596: bf00 nop 8000598: 40021000 .word 0x40021000 0800059c : * * Default interrupt handler for non-core interrupts. * Enables the blue and yellow LED on the STefi Light board. \* ------------------------------------------------------------------------------------ */ void ISR_default(void) { 800059c: b480 push {r7} 800059e: af00 add r7, sp, #0 /* init */ RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // PA: clock on (LEDs) 80005a0: 4b10 ldr r3, [pc, #64] @ (80005e4 ) 80005a2: 6cdb ldr r3, [r3, #76] @ 0x4c 80005a4: 4a0f ldr r2, [pc, #60] @ (80005e4 ) 80005a6: f043 0301 orr.w r3, r3, #1 80005aa: 64d3 str r3, [r2, #76] @ 0x4c GPIOA->ODR |= MASK_LED_ALL; 80005ac: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80005b0: 695b ldr r3, [r3, #20] 80005b2: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80005b6: f043 030f orr.w r3, r3, #15 80005ba: 6153 str r3, [r2, #20] GPIOA->MODER = (GPIOA->MODER & 0xFFFFFF00) | 0x44; 80005bc: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80005c0: 681b ldr r3, [r3, #0] 80005c2: f023 03ff bic.w r3, r3, #255 @ 0xff 80005c6: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80005ca: f043 0344 orr.w r3, r3, #68 @ 0x44 80005ce: 6013 str r3, [r2, #0] while(1) { /* light up the LEDs permanently */ GPIOA->ODR &= ~(MASK_LED_BLUE | MASK_LED_YELLOW); 80005d0: f04f 4390 mov.w r3, #1207959552 @ 0x48000000 80005d4: 695b ldr r3, [r3, #20] 80005d6: f04f 4290 mov.w r2, #1207959552 @ 0x48000000 80005da: f023 030a bic.w r3, r3, #10 80005de: 6153 str r3, [r2, #20] 80005e0: e7f6 b.n 80005d0 80005e2: bf00 nop 80005e4: 40021000 .word 0x40021000 080005e8 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr r0, =_estack 80005e8: 480c ldr r0, [pc, #48] @ (800061c ) mov sp, r0 /* set stack pointer */ 80005ea: 4685 mov sp, r0 /* Call the clock system initialization function.*/ // bl SystemInit /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 80005ec: 480c ldr r0, [pc, #48] @ (8000620 ) ldr r1, =_edata 80005ee: 490d ldr r1, [pc, #52] @ (8000624 ) ldr r2, =_sidata 80005f0: 4a0d ldr r2, [pc, #52] @ (8000628 ) movs r3, #0 80005f2: 2300 movs r3, #0 b LoopCopyDataInit 80005f4: e002 b.n 80005fc 080005f6 : CopyDataInit: ldr r4, [r2, r3] 80005f6: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 80005f8: 50c4 str r4, [r0, r3] adds r3, r3, #4 80005fa: 3304 adds r3, #4 080005fc : LoopCopyDataInit: adds r4, r0, r3 80005fc: 18c4 adds r4, r0, r3 cmp r4, r1 80005fe: 428c cmp r4, r1 bcc CopyDataInit 8000600: d3f9 bcc.n 80005f6 /* Zero fill the bss segment. */ ldr r2, =_sbss 8000602: 4a0a ldr r2, [pc, #40] @ (800062c ) ldr r4, =_ebss 8000604: 4c0a ldr r4, [pc, #40] @ (8000630 ) movs r3, #0 8000606: 2300 movs r3, #0 b LoopFillZerobss 8000608: e001 b.n 800060e 0800060a : FillZerobss: str r3, [r2] 800060a: 6013 str r3, [r2, #0] adds r2, r2, #4 800060c: 3204 adds r2, #4 0800060e : LoopFillZerobss: cmp r2, r4 800060e: 42a2 cmp r2, r4 bcc FillZerobss 8000610: d3fb bcc.n 800060a /* Call static constructors */ bl __libc_init_array 8000612: f000 f80f bl 8000634 <__libc_init_array> /* Call the application's entry point.*/ bl main 8000616: f7ff fdff bl 8000218
0800061a : LoopForever: b LoopForever 800061a: e7fe b.n 800061a ldr r0, =_estack 800061c: 20008000 .word 0x20008000 ldr r0, =_sdata 8000620: 20000000 .word 0x20000000 ldr r1, =_edata 8000624: 20000000 .word 0x20000000 ldr r2, =_sidata 8000628: 0800069c .word 0x0800069c ldr r2, =_sbss 800062c: 20000000 .word 0x20000000 ldr r4, =_ebss 8000630: 20000020 .word 0x20000020 08000634 <__libc_init_array>: 8000634: b570 push {r4, r5, r6, lr} 8000636: 4d0d ldr r5, [pc, #52] @ (800066c <__libc_init_array+0x38>) 8000638: 4c0d ldr r4, [pc, #52] @ (8000670 <__libc_init_array+0x3c>) 800063a: 1b64 subs r4, r4, r5 800063c: 10a4 asrs r4, r4, #2 800063e: 2600 movs r6, #0 8000640: 42a6 cmp r6, r4 8000642: d109 bne.n 8000658 <__libc_init_array+0x24> 8000644: 4d0b ldr r5, [pc, #44] @ (8000674 <__libc_init_array+0x40>) 8000646: 4c0c ldr r4, [pc, #48] @ (8000678 <__libc_init_array+0x44>) 8000648: f000 f818 bl 800067c <_init> 800064c: 1b64 subs r4, r4, r5 800064e: 10a4 asrs r4, r4, #2 8000650: 2600 movs r6, #0 8000652: 42a6 cmp r6, r4 8000654: d105 bne.n 8000662 <__libc_init_array+0x2e> 8000656: bd70 pop {r4, r5, r6, pc} 8000658: f855 3b04 ldr.w r3, [r5], #4 800065c: 4798 blx r3 800065e: 3601 adds r6, #1 8000660: e7ee b.n 8000640 <__libc_init_array+0xc> 8000662: f855 3b04 ldr.w r3, [r5], #4 8000666: 4798 blx r3 8000668: 3601 adds r6, #1 800066a: e7f2 b.n 8000652 <__libc_init_array+0x1e> 800066c: 08000694 .word 0x08000694 8000670: 08000694 .word 0x08000694 8000674: 08000694 .word 0x08000694 8000678: 08000698 .word 0x08000698 0800067c <_init>: 800067c: b5f8 push {r3, r4, r5, r6, r7, lr} 800067e: bf00 nop 8000680: bcf8 pop {r3, r4, r5, r6, r7} 8000682: bc08 pop {r3} 8000684: 469e mov lr, r3 8000686: 4770 bx lr 08000688 <_fini>: 8000688: b5f8 push {r3, r4, r5, r6, r7, lr} 800068a: bf00 nop 800068c: bcf8 pop {r3, r4, r5, r6, r7} 800068e: bc08 pop {r3} 8000690: 469e mov lr, r3 8000692: 4770 bx lr