Created
June 15, 2020 18:36
-
-
Save thalesfragoso/aaf316b1d379b6b46859d5b2108e9d78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) info address _SEGGER_RTT | |
Symbol "_SEGGER_RTT" is at 0x20003c68 in a file compiled without debugging. | |
Dump of assembler code for function f4_adc::init: | |
44 #[app(device = stm32f4xx_hal::stm32, peripherals = true)] | |
0x08003d48 <+0>: push {r4, r5, r6, r7, lr} | |
0x08003d4a <+2>: add r7, sp, #12 | |
0x08003d4c <+4>: stmdb sp!, {r8, r9, r10, r11} | |
0x08003d50 <+8>: sub.w sp, sp, #22912 ; 0x5980 | |
0x08003d54 <+12>: sub sp, #116 ; 0x74 | |
0x08003d56 <+14>: movw r1, #14336 ; 0x3800 | |
0x08003d5a <+18>: str r0, [sp, #28] | |
0x08003d5c <+20>: movt r1, #16386 ; 0x4002 | |
0x08003d60 <+24>: add.w lr, sp, #2 | |
0x08004c08 <+3776>: add.w sp, sp, #22912 ; 0x5980 | |
0x08004c0c <+3780>: add sp, #116 ; 0x74 | |
0x08004c0e <+3782>: ldmia.w sp!, {r8, r9, r10, r11} | |
0x08004c12 <+3786>: pop {r4, r5, r6, r7, pc} | |
45 const APP: () = { | |
46 struct Resources { | |
47 #[init(0)] | |
48 instant: i64, | |
49 timer: Timer<TIM1>, | |
50 eth: Eth<'static, 'static>, | |
51 //dma_stream: Transfer<Stream0<DMA2>, Channel0, ADC1, PeripheralToMemory, Box<AdcPool>>, | |
52 } | |
53 | |
54 #[init] | |
55 fn init(cx: init::Context) -> init::LateResources { | |
56 static mut RX_RING: Option<[RingEntry<RxDescriptor>; 8]> = None; | |
57 static mut TX_RING: Option<[RingEntry<TxDescriptor>; 2]> = None; | |
58 | |
59 let rcc = cx.device.RCC.constrain(); | |
60 let gpioa = cx.device.GPIOA.split(); | |
61 let gpiob = cx.device.GPIOB.split(); | |
62 let gpioc = cx.device.GPIOC.split(); | |
63 | |
64 let clocks = rcc | |
65 .cfgr | |
66 .use_hse(8.mhz()) | |
67 .sysclk(144.mhz()) | |
68 .require_pll48clk() | |
69 .pclk2(36.mhz()) | |
70 .freeze(); | |
71 | |
72 rtt_init_print!(); | |
73 rprintln!("Init"); | |
74 | |
75 let mut led = gpioa.pa6.into_push_pull_output(); | |
76 led.set_high().ok(); | |
77 | |
78 stm32_eth::setup(); | |
79 let eth_pins = EthPins { | |
80 ref_clk: gpioa.pa1, | |
81 md_io: gpioa.pa2, | |
82 md_clk: gpioc.pc1, | |
83 crs: gpioa.pa7, | |
84 tx_en: gpiob.pb11, | |
85 tx_d0: gpiob.pb12, | |
86 tx_d1: gpiob.pb13, | |
87 rx_d0: gpioc.pc4, | |
88 rx_d1: gpioc.pc5, | |
89 }; | |
90 eth_pins.setup(); | |
91 | |
92 *RX_RING = Some(Default::default()); | |
0x0800458e <+2118>: movw r9, #0 | |
0x08004592 <+2122>: movt r9, #8192 ; 0x2000 | |
0x08004596 <+2126>: movw r2, #1522 ; 0x5f2 | |
0x0800459e <+2134>: add.w lr, sp, #48 ; 0x30 | |
0x080045a6 <+2142>: add.w r1, lr, #10752 ; 0x2a00 | |
0x080045c6 <+2174>: movs r0, #1 | |
0x080045c8 <+2176>: str.w r0, [r9] | |
0x080045cc <+2180>: movs r0, #0 | |
0x080045ce <+2182>: strd r0, r0, [r9, #4] | |
0x080045d2 <+2186>: strd r6, r0, [r9, #12] | |
0x080045d6 <+2190>: str.w r0, [r9, #20] | |
0x080045da <+2194>: add.w r0, r9, #24 | |
0x080045de <+2198>: bl 0x801151c <__aeabi_memcpy8> | |
0x080045e2 <+2202>: add.w lr, sp, #8192 ; 0x2000 | |
0x080045e6 <+2206>: movw r2, #1522 ; 0x5f2 | |
0x080045ea <+2210>: ldrh.w r0, [lr, #2604] ; 0xa2c | |
0x080045ee <+2214>: add.w lr, sp, #48 ; 0x30 | |
0x080045f2 <+2218>: strh.w r0, [r9, #1550] ; 0x60e | |
0x080045f6 <+2222>: add.w r1, lr, #9216 ; 0x2400 | |
0x080045fa <+2226>: ldr.w r0, [r11, #1536] ; 0x600 | |
0x080045fe <+2230>: str.w r0, [r9, #1546] ; 0x60a | |
0x08004602 <+2234>: add.w r0, r9, #1568 ; 0x620 | |
0x08004606 <+2238>: str.w r10, [r9, #1552] ; 0x610 | |
0x0800460a <+2242>: str.w r6, [r9, #1556] ; 0x614 | |
0x0800460e <+2246>: str.w r10, [r9, #1560] ; 0x618 | |
0x08004612 <+2250>: str.w r10, [r9, #1564] ; 0x61c | |
0x08004616 <+2254>: bl 0x801151c <__aeabi_memcpy8> | |
0x0800461a <+2258>: add.w lr, sp, #8192 ; 0x2000 | |
0x0800461e <+2262>: movw r2, #1522 ; 0x5f2 | |
0x08004622 <+2266>: ldrh.w r0, [lr, #1068] ; 0x42c | |
0x08004626 <+2270>: add.w lr, sp, #16 | |
0x0800462a <+2274>: strh.w r0, [r9, #3094] ; 0xc16 | |
0x0800462e <+2278>: add.w r1, lr, #7712 ; 0x1e20 | |
0x08004632 <+2282>: ldr.w r0, [r11] | |
0x08004636 <+2286>: str.w r0, [r9, #3090] ; 0xc12 | |
0x0800463a <+2290>: addw r0, r9, #3112 ; 0xc28 | |
0x0800463e <+2294>: str.w r10, [r9, #3096] ; 0xc18 | |
0x08004642 <+2298>: str.w r6, [r9, #3100] ; 0xc1c | |
0x08004646 <+2302>: str.w r10, [r9, #3104] ; 0xc20 | |
0x0800464a <+2306>: str.w r10, [r9, #3108] ; 0xc24 | |
0x0800464e <+2310>: bl 0x801151c <__aeabi_memcpy8> | |
0x08004652 <+2314>: movw r0, #4644 ; 0x1224 | |
0x08004656 <+2318>: movw r1, #4634 ; 0x121a | |
0x0800465a <+2322>: str.w r6, [r9, r0] | |
0x0800465e <+2326>: mov.w r0, #4640 ; 0x1220 | |
0x08004662 <+2330>: add.w lr, sp, #4096 ; 0x1000 | |
0x08004666 <+2334>: str.w r10, [r9, r0] | |
0x0800466a <+2338>: movw r2, #1522 ; 0x5f2 | |
0x0800466e <+2342>: ldr.w r0, [r4, #3072] ; 0xc00 | |
0x08004672 <+2346>: str.w r0, [r9, r1] | |
0x08004676 <+2350>: movw r0, #4648 ; 0x1228 | |
0x0800467a <+2354>: str.w r10, [r9, r0] | |
0x0800467e <+2358>: add r0, r9 | |
0x08004680 <+2360>: str.w r10, [r0, #4] | |
0x08004684 <+2364>: add.w r0, r9, r1 | |
0x08004688 <+2368>: ldrh.w r1, [lr, #3628] ; 0xe2c | |
0x0800468c <+2372>: add.w lr, sp, #16 | |
0x08004690 <+2376>: strh r1, [r0, #4] | |
0x08004692 <+2378>: movw r0, #4656 ; 0x1230 | |
0x08004696 <+2382>: add r0, r9 | |
0x08004698 <+2384>: add.w r1, lr, #6176 ; 0x1820 | |
0x0800469c <+2388>: bl 0x801151c <__aeabi_memcpy8> | |
0x080046a0 <+2392>: movw r0, #6188 ; 0x182c | |
0x080046a4 <+2396>: movw r1, #6178 ; 0x1822 | |
0x080046a8 <+2400>: str.w r6, [r9, r0] | |
0x080046ac <+2404>: movw r0, #6184 ; 0x1828 | |
0x080046b0 <+2408>: add.w lr, sp, #4096 ; 0x1000 | |
0x080046b4 <+2412>: str.w r10, [r9, r0] | |
0x080046b8 <+2416>: movw r2, #1522 ; 0x5f2 | |
0x080046bc <+2420>: ldr.w r0, [r4, #1536] ; 0x600 | |
0x080046c0 <+2424>: str.w r0, [r9, r1] | |
0x080046c4 <+2428>: movw r0, #6192 ; 0x1830 | |
0x080046c8 <+2432>: str.w r10, [r9, r0] | |
0x080046cc <+2436>: add r0, r9 | |
0x080046ce <+2438>: str.w r10, [r0, #4] | |
0x080046d2 <+2442>: add.w r0, r9, r1 | |
0x080046d6 <+2446>: ldrh.w r1, [lr, #2092] ; 0x82c | |
0x080046da <+2450>: add.w lr, sp, #16 | |
0x080046de <+2454>: strh r1, [r0, #4] | |
0x080046e0 <+2456>: movw r0, #6200 ; 0x1838 | |
0x080046e4 <+2460>: add r0, r9 | |
0x080046e6 <+2462>: add.w r1, lr, #4640 ; 0x1220 | |
0x080046ea <+2466>: bl 0x801151c <__aeabi_memcpy8> | |
0x080046ee <+2470>: movw r0, #7732 ; 0x1e34 | |
0x080046f2 <+2474>: movw r1, #7722 ; 0x1e2a | |
0x080046f6 <+2478>: str.w r6, [r9, r0] | |
0x080046fa <+2482>: movw r0, #7728 ; 0x1e30 | |
0x080046fe <+2486>: add.w lr, sp, #4096 ; 0x1000 | |
0x08004702 <+2490>: str.w r10, [r9, r0] | |
0x08004706 <+2494>: movw r2, #1522 ; 0x5f2 | |
0x0800470a <+2498>: ldr r0, [r4, #0] | |
0x0800470c <+2500>: str.w r0, [r9, r1] | |
0x08004710 <+2504>: movw r0, #7736 ; 0x1e38 | |
0x08004714 <+2508>: str.w r10, [r9, r0] | |
0x08004718 <+2512>: add r0, r9 | |
0x0800471a <+2514>: str.w r10, [r0, #4] | |
0x0800471e <+2518>: add.w r0, r9, r1 | |
0x08004722 <+2522>: ldrh.w r1, [lr, #556] ; 0x22c | |
0x08004726 <+2526>: strh r1, [r0, #4] | |
0x08004728 <+2528>: add.w r0, r9, #7744 ; 0x1e40 | |
0x0800472c <+2532>: add.w r1, sp, #3120 ; 0xc30 | |
0x08004730 <+2536>: bl 0x801151c <__aeabi_memcpy8> | |
0x08004734 <+2540>: mov.w r0, #9280 ; 0x2440 | |
0x08004738 <+2544>: ldr.w r1, [sp, #3112] ; 0xc28 | |
0x0800473c <+2548>: str.w r10, [r9, r0] | |
0x08004740 <+2552>: movw r0, #9276 ; 0x243c | |
0x08004744 <+2556>: movw r2, #1522 ; 0x5f2 | |
0x08004748 <+2560>: str.w r6, [r9, r0] | |
0x0800474c <+2564>: movw r0, #9272 ; 0x2438 | |
0x08004750 <+2568>: str.w r10, [r9, r0] | |
0x08004754 <+2572>: movw r0, #9266 ; 0x2432 | |
0x08004758 <+2576>: str.w r1, [r9, r0] | |
0x0800475c <+2580>: add.w r1, r9, #9280 ; 0x2440 | |
0x08004760 <+2584>: add r0, r9 | |
0x08004762 <+2586>: str.w r10, [r1, #4] | |
0x08004766 <+2590>: ldrh.w r1, [sp, #3116] ; 0xc2c | |
0x0800476a <+2594>: strh r1, [r0, #4] | |
0x0800476c <+2596>: movw r0, #9288 ; 0x2448 | |
0x08004770 <+2600>: add r0, r9 | |
0x08004772 <+2602>: add.w r1, sp, #1584 ; 0x630 | |
0x08004776 <+2606>: bl 0x801151c <__aeabi_memcpy8> | |
0x0800477a <+2610>: movw r0, #10824 ; 0x2a48 | |
0x0800477e <+2614>: movw r1, #10820 ; 0x2a44 | |
0x08004782 <+2618>: str.w r10, [r9, r0] | |
0x08004786 <+2622>: add r0, r9 | |
0x08004788 <+2624>: str.w r6, [r9, r1] | |
0x0800478c <+2628>: mov.w r1, #10816 ; 0x2a40 | |
0x08004790 <+2632>: str.w r10, [r9, r1] | |
0x08004794 <+2636>: movw r1, #10810 ; 0x2a3a | |
0x08004798 <+2640>: ldr.w r2, [sp, #1576] ; 0x628 | |
0x0800479c <+2644>: str.w r2, [r9, r1] | |
0x080047a0 <+2648>: movw r2, #1522 ; 0x5f2 | |
0x080047a4 <+2652>: str.w r10, [r0, #4] | |
0x080047a8 <+2656>: add.w r0, r9, r1 | |
0x080047ac <+2660>: ldrh.w r1, [sp, #1580] ; 0x62c | |
0x080047b0 <+2664>: strh r1, [r0, #4] | |
0x080047b2 <+2666>: movw r0, #10832 ; 0x2a50 | |
0x080047b6 <+2670>: add r0, r9 | |
0x080047b8 <+2672>: add r1, sp, #48 ; 0x30 | |
0x080047ba <+2674>: bl 0x801151c <__aeabi_memcpy8> | |
0x080047be <+2678>: movw r1, #12354 ; 0x3042 | |
0x080047c2 <+2682>: ldr r2, [sp, #40] ; 0x28 | |
0x080047c4 <+2684>: str.w r2, [r9, r1] | |
0x080047c8 <+2688>: add r1, r9 | |
0x080047ca <+2690>: add.w lr, sp, #8 | |
0x080047ce <+2694>: ldrh.w r0, [sp, #44] ; 0x2c | |
0x080047d2 <+2698>: add.w r4, lr, #18432 ; 0x4800 | |
0x080047d6 <+2702>: strh r0, [r1, #4] | |
0x080047d8 <+2704>: movs r0, #0 | |
0x080047da <+2706>: movt r0, #28688 ; 0x7010 | |
93 *TX_RING = Some(Default::default()); | |
0x0800485c <+2836>: movw r8, #12360 ; 0x3048 | |
0x08004860 <+2840>: movt r8, #8192 ; 0x2000 | |
0x08004864 <+2844>: movs r1, #1 | |
0x0800486e <+2854>: strd r1, r10, [r8] | |
0x08004872 <+2858>: movw r10, #0 | |
0x0800489a <+2898>: str.w r10, [r8, #8] | |
0x080048b0 <+2920>: add.w r0, r8, #12 | |
0x080048b4 <+2924>: ldmia.w r6, {r1, r2, r3} | |
0x080048b8 <+2928>: stmia r0!, {r1, r2, r3} | |
0x080048ba <+2930>: add.w r0, r8, #24 | |
0x080048be <+2934>: mov r1, r4 | |
0x080048c0 <+2936>: movw r2, #1522 ; 0x5f2 | |
0x080048c4 <+2940>: bl 0x801151c <__aeabi_memcpy8> | |
0x080048c8 <+2944>: add.w lr, sp, #8192 ; 0x2000 | |
0x080048cc <+2948>: ldr.w r1, [r5, #1544] ; 0x608 | |
0x080048d0 <+2952>: str.w r10, [r8, #1552] ; 0x610 | |
0x080048d4 <+2956>: ldrh.w r0, [lr, #2612] ; 0xa34 | |
0x080048d8 <+2960>: strh.w r0, [r8, #1550] ; 0x60e | |
0x080048dc <+2964>: addw r0, r8, #1556 ; 0x614 | |
0x080048e0 <+2968>: str.w r1, [r8, #1546] ; 0x60a | |
0x080048e4 <+2972>: ldmia.w r11, {r1, r2, r3} | |
0x080048e8 <+2976>: stmia r0!, {r1, r2, r3} | |
0x080048ea <+2978>: add.w r0, r8, #1568 ; 0x620 | |
0x080048ee <+2982>: movw r1, #1522 ; 0x5f2 | |
0x080048f2 <+2986>: bl 0x80115d2 <__aeabi_memclr4> | |
0x080048fa <+2994>: add.w lr, sp, #8192 ; 0x2000 | |
0x080048fe <+2998>: ldr r3, [r5, #8] | |
0x08004904 <+3004>: ldrh.w r2, [lr, #1076] ; 0x434 | |
0x0800490a <+3010>: strh.w r2, [r8, #3094] ; 0xc16 | |
0x0800490e <+3014>: str.w r3, [r8, #3090] ; 0xc12 | |
94 let eth = Eth::new( | |
95 cx.device.ETHERNET_MAC, | |
96 cx.device.ETHERNET_DMA, | |
97 &mut RX_RING.as_mut().unwrap()[..], | |
98 &mut TX_RING.as_mut().unwrap()[..], | |
99 ); | |
100 eth.enable_interrupt(); | |
101 | |
102 let mut timer = Timer::tim1(cx.device.TIM1, 1.khz(), clocks); | |
0x08004ad0 <+3464>: add.w r0, sp, #16384 ; 0x4000 | |
0x08004ad4 <+3468>: add.w r2, sp, #16384 ; 0x4000 | |
0x08004ad8 <+3472>: ldrh.w r0, [r0, #528] ; 0x210 | |
0x08004adc <+3476>: strh.w r0, [r2, #3584] ; 0xe00 | |
0x08004ae0 <+3480>: movw r2, #14336 ; 0x3800 | |
103 timer.listen(Event::TimeOut); | |
104 | |
105 rprintln!("Finished init"); | |
106 init::LateResources { timer, eth } | |
0x08004bd2 <+3722>: ldr r0, [sp, #20] | |
0x08004bd4 <+3724>: movs r2, #8 | |
0x08004bd6 <+3726>: strb.w lr, [r3, #49] ; 0x31 | |
0x08004bda <+3730>: strb.w r0, [r3, #48] ; 0x30 | |
0x08004bde <+3734>: ldr r0, [sp, #8] | |
0x08004be0 <+3736>: strd r9, r6, [r3, #32] | |
0x08004be4 <+3740>: str r4, [r3, #40] ; 0x28 | |
0x08004be6 <+3742>: str r0, [r3, #44] ; 0x2c | |
0x08004be8 <+3744>: movs r0, #0 | |
0x08004bea <+3746>: strd r8, r2, [r3] | |
0x08004bee <+3750>: strd r0, r5, [r3, #8] | |
0x08004bf2 <+3754>: strd r1, r0, [r3, #16] | |
0x08004bf6 <+3758>: ldr r0, [sp, #16] | |
0x08004bf8 <+3760>: str.w r12, [r3, #24] | |
0x08004bfc <+3764>: str r0, [r3, #28] | |
0x08004bfe <+3766>: add.w r0, sp, #16384 ; 0x4000 | |
0x08004c02 <+3770>: ldrh.w r0, [r0, #2056] ; 0x808 | |
0x08004c06 <+3774>: strh r0, [r3, #50] ; 0x32 | |
End of assembler dump. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment