ESP32 上的 SYS_STARTUP_FN() 是什么?
SYS_STARTUP_FN() 在应用程序启动过程中 call_start_cpu0() 的末尾被调用(在引导加载程序已完成执行之后)。
它本质上只是为当前核心调用函数指针 g_startup_fn:
sys_startup_macro_example.cpp
#define SYS_STARTUP_FN() ((*g_startup_fn[(cpu_hal_get_core_id())])())g_startup_fn 反过来在这段相当复杂但概念上仍然简单的代码中被定义为基本上是 start_cpu0 和 start_cpu1。
Check out similar posts by category:
Embedded, ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow