app_main在哪里被调用了
setup和loop函数在app_main中被调用了,那么app_main函数在哪里被调用了?在 esp32/hardware/esp32/1.0.3/tools/sdk/lib/libesp32.a 这个静态库文件中。
下面是用readelf读取的结果,app_main在第54
File: ./1.0.3/tools/sdk/lib/libesp32.a(cpu_start.o)
Symbol table '.symtab' contains 118 entries:
Num: ValueSize Type Bind Vis Ndx Name
0: 00000000 0 NOTYPELOCALDEFAULTUND
1: 00000000 0 FILE LOCALDEFAULTABS cpu_start.c
2: 00000000 0 SECTION LOCALDEFAULT 13
3: 00000000 0 SECTION LOCALDEFAULT 14
4: 00000000 0 SECTION LOCALDEFAULT 15
5: 00000000 0 SECTION LOCALDEFAULT 16
6: 00000000 0 SECTION LOCALDEFAULT 17
7: 00000000 64 FUNC LOCALDEFAULT 17 cpu_configure_region_prot
8: 00000000 0 SECTION LOCALDEFAULT 19
9: 00000000 0 SECTION LOCALDEFAULT 20
10: 00000000 10 OBJECTLOCALDEFAULT 32 __func__$8664
11: 00000000 108 FUNC LOCALDEFAULT 20 main_task
12: 00000000 0 SECTION LOCALDEFAULT 22
13: 00000000 41 FUNC LOCALDEFAULT 22 intr_matrix_clear
14: 00000000 0 SECTION LOCALDEFAULT 24
15: 00000000 40 OBJECTLOCALDEFAULT 31 ob$8651
16: 00000000 37 FUNC LOCALDEFAULT 24 do_global_ctors
17: 00000000 0 SECTION LOCALDEFAULT 26
18: 00000000 45 FUNC LOCALDEFAULT 26 wdt_reset_cpu1_info_enabl
19: 00000000 0 SECTION LOCALDEFAULT 28
20: 00000000 19 OBJECTLOCALDEFAULT 33 __func__$8638
21: 00000000 1 OBJECTLOCALDEFAULT 34 app_cpu_started
22: 00000160 72 FUNC LOCALDEFAULT 28 call_start_cpu1
23: 00000000 0 SECTION LOCALDEFAULT 30
24: 00000000 0 SECTION LOCALDEFAULT 31
25: 00000000 0 SECTION LOCALDEFAULT 32
26: 00000000 0 SECTION LOCALDEFAULT 33
27: 00000000 0 SECTION LOCALDEFAULT 34
28: 00000000 0 SECTION LOCALDEFAULT 35
29: 00000000 0 SECTION LOCALDEFAULT 37
30: 00000000 0 SECTION LOCALDEFAULT 39
31: 00000000 0 SECTION LOCALDEFAULT 40
32: 00000000 0 SECTION LOCALDEFAULT 42
33: 00000000 0 SECTION LOCALDEFAULT 44
34: 00000000 0 SECTION LOCALDEFAULT 46
35: 00000000 0 SECTION LOCALDEFAULT 48
36: 00000000 0 SECTION LOCALDEFAULT 1
37: 00000000 0 SECTION LOCALDEFAULT 3
38: 00000000 0 SECTION LOCALDEFAULT 5
39: 00000000 0 SECTION LOCALDEFAULT 7
40: 00000000 0 SECTION LOCALDEFAULT 9
41: 00000000 0 SECTION LOCALDEFAULT 11
42: 00000000 0 SECTION LOCALDEFAULT 49
43: 00000000 0 SECTION LOCALDEFAULT 50
44: 00000000 0 SECTION LOCALDEFAULT 51
45: 00000000 0 SECTION LOCALDEFAULT 53
46: 00000000 0 NOTYPEGLOBAL DEFAULTUND memcpy
47: 00000000 0 NOTYPEGLOBAL DEFAULTUND port_xSchedulerRunning
48: 00000000 0 NOTYPEGLOBAL DEFAULTUND heap_caps_enable_nonos_st
49: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_task_wdt_init
50: 00000000 0 NOTYPEGLOBAL DEFAULTUND _esp_error_check_failed
51: 00000000 0 NOTYPEGLOBAL DEFAULTUND xTaskGetIdleTaskHandleFor
52: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_task_wdt_add
53: 00000000 0 NOTYPEGLOBAL DEFAULTUND rtc_wdt_disable
54: 00000000 0 NOTYPEGLOBAL DEFAULTUND app_main
55: 00000000 0 NOTYPEGLOBAL DEFAULTUND vTaskDelete
56: 00000000 0 NOTYPEGLOBAL DEFAULTUND intr_matrix_set
57: 00000000 0 NOTYPEGLOBAL DEFAULTUND __init_array_end
58: 00000000 0 NOTYPEGLOBAL DEFAULTUND __eh_frame
59: 00000000 0 NOTYPEGLOBAL DEFAULTUND __init_array_start
60: 00000000 0 NOTYPEGLOBAL DEFAULTUND __register_frame_info
61: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_dport_access_reg_read
62: 00000000 0 NOTYPEGLOBAL DEFAULTUND _global_impure_ptr
63: 00000000 0 NOTYPEGLOBAL DEFAULTUND g_flash_guard_default_ops
64: 00000000 0 NOTYPEGLOBAL DEFAULTUND g_coex_adapter_funcs
65: 00000000 298 FUNC GLOBAL DEFAULT 28 start_cpu0_default
66: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_setup_syscall_table
67: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_clk_init
68: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_perip_clk_init
69: 00000000 0 NOTYPEGLOBAL DEFAULTUND uart_div_modify
70: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_brownout_init
71: 00000000 0 NOTYPEGLOBAL DEFAULTUND rtc_gpio_force_hold_dis_a
72: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_vfs_dev_uart_register
73: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_reent_init
74: 00000000 0 NOTYPEGLOBAL DEFAULTUND fopen
75: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_timer_init
76: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_set_time_from_rtc
77: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_dbg_stubs_init
78: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_pthread_init
79: 00000000 0 NOTYPEGLOBAL DEFAULTUND __assert_func
80: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_int_wdt_init
81: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_int_wdt_cpu_init
82: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_cache_err_int_init
83: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_crosscore_int_init
84: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_dport_access_int_init
85: 00000000 0 NOTYPEGLOBAL DEFAULTUND spi_flash_init
86: 00000000 0 NOTYPEGLOBAL DEFAULTUND spi_flash_guard_set
87: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_coex_adapter_register
88: 00000000 0 NOTYPEGLOBAL DEFAULTUND xTaskCreatePinnedToCore
89: 00000000 0 NOTYPEGLOBAL DEFAULTUND vTaskStartScheduler
90: 00000000 0 NOTYPEGLOBAL DEFAULTUND abort
91: 00000000 298 FUNC WEAK DEFAULT 28 start_cpu0
92: 0000012c 50 FUNC GLOBAL DEFAULT 28 start_cpu1_default
93: 00000000 0 NOTYPEGLOBAL DEFAULTUND xPortStartScheduler
94: 0000012c 50 FUNC WEAK DEFAULT 28 start_cpu1
95: 00000000 0 NOTYPEGLOBAL DEFAULTUND _init_start
96: 00000000 0 NOTYPEGLOBAL DEFAULTUND ets_set_appcpu_boot_addr
97: 00000000 0 NOTYPEGLOBAL DEFAULTUND uartAttach
98: 00000000 0 NOTYPEGLOBAL DEFAULTUND ets_install_uart_printf
99: 00000000 0 NOTYPEGLOBAL DEFAULTUND uart_tx_switch
100: 00000000 0 NOTYPEGLOBAL DEFAULTUND _bss_end
101: 00000000 0 NOTYPEGLOBAL DEFAULTUND _bss_start
102: 00000000 0 NOTYPEGLOBAL DEFAULTUND _rtc_bss_end
103: 00000000 0 NOTYPEGLOBAL DEFAULTUND _rtc_bss_start
104: 000001a8 346 FUNC GLOBAL DEFAULT 28 call_start_cpu0
105: 00000000 0 NOTYPEGLOBAL DEFAULTUND rtc_get_reset_reason
106: 00000000 0 NOTYPEGLOBAL DEFAULTUND memset
107: 00000000 0 NOTYPEGLOBAL DEFAULTUND bootloader_common_set_fla
108: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_log_timestamp
109: 00000000 0 NOTYPEGLOBAL DEFAULTUND ets_printf
110: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_dport_access_stall_ot
111: 00000000 0 NOTYPEGLOBAL DEFAULTUND Cache_Flush_rom
112: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_dport_access_stall_ot
113: 00000000 0 NOTYPEGLOBAL DEFAULTUND Cache_Read_Enable_rom
114: 00000000 0 NOTYPEGLOBAL DEFAULTUND esp_cpu_unstall
115: 00000000 0 NOTYPEGLOBAL DEFAULTUND ets_delay_us
116: 00000000 0 NOTYPEGLOBAL DEFAULTUND heap_caps_init
117: 00000000 7 FUNC GLOBAL DEFAULT 30 __cxx_eh_arena_size_get
页:
[1]