mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
feat(esp8266): Add option to init OS before starting it
This commit is contained in:
@ -236,6 +236,15 @@ config CRYSTAL_USED_40MHZ
|
|||||||
bool "40MHz"
|
bool "40MHz"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
config INIT_OS_BEFORE_START
|
||||||
|
bool "Init OS before starting it"
|
||||||
|
default n
|
||||||
|
depends on DISABLE_FREERTOS
|
||||||
|
help
|
||||||
|
Some OSes should initialize their global data structure before starting them. rt-thread is like this one.
|
||||||
|
|
||||||
|
FreeRTOS need not do this.
|
||||||
|
|
||||||
config ESP8266_OTA_FROM_OLD
|
config ESP8266_OTA_FROM_OLD
|
||||||
bool "(**Expected**)ESP8266 update from old SDK by OTA"
|
bool "(**Expected**)ESP8266 update from old SDK by OTA"
|
||||||
default n
|
default n
|
||||||
|
@ -155,6 +155,11 @@ void call_user_start(size_t start_addr)
|
|||||||
|
|
||||||
heap_caps_init();
|
heap_caps_init();
|
||||||
|
|
||||||
|
#ifdef CONFIG_INIT_OS_BEFORE_START
|
||||||
|
extern int __esp_os_init(void);
|
||||||
|
assert(__esp_os_init() == 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NORMAL) || defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NANO)
|
#if defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NORMAL) || defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NANO)
|
||||||
esp_newlib_init();
|
esp_newlib_init();
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user