From 00aa73c6cf0aa9a6f462e1d42ea15dba0a269eee Mon Sep 17 00:00:00 2001 From: Dmitry Yakovlev Date: Wed, 26 Apr 2017 07:47:37 +0300 Subject: [PATCH 1/2] Restart sequence requires set up for app cpu. --- components/bootloader/src/main/bootloader_start.c | 2 ++ components/esp32/cpu_start.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/bootloader/src/main/bootloader_start.c b/components/bootloader/src/main/bootloader_start.c index 9a439e58fe..ce6420b30f 100644 --- a/components/bootloader/src/main/bootloader_start.c +++ b/components/bootloader/src/main/bootloader_start.c @@ -262,6 +262,8 @@ void bootloader_main() memset(&bs, 0, sizeof(bs)); ESP_LOGI(TAG, "compile time " __TIME__ ); + ets_set_appcpu_boot_addr(0); + /* disable watch dog here */ REG_CLR_BIT( RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_FLASHBOOT_MOD_EN ); REG_CLR_BIT( TIMG_WDTCONFIG0_REG(0), TIMG_WDT_FLASHBOOT_MOD_EN ); diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 7211b8b479..582b0975e6 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -173,6 +173,8 @@ void IRAM_ATTR call_start_cpu1() "wsr %0, vecbase\n" \ ::"r"(&_init_start)); + ESP_EARLY_LOGI(TAG, "Set ets_set_appcpu_boot_addr."); + ets_set_appcpu_boot_addr(0); cpu_configure_region_protection(); #if CONFIG_CONSOLE_UART_NONE From baeab37560f1bbd2a0cb566fb3c6fc3b04f28bed Mon Sep 17 00:00:00 2001 From: Dmitry Yakovlev Date: Wed, 26 Apr 2017 10:31:05 +0300 Subject: [PATCH 2/2] Debug info removed. --- components/esp32/cpu_start.c | 1 - 1 file changed, 1 deletion(-) diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 582b0975e6..331727321a 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -173,7 +173,6 @@ void IRAM_ATTR call_start_cpu1() "wsr %0, vecbase\n" \ ::"r"(&_init_start)); - ESP_EARLY_LOGI(TAG, "Set ets_set_appcpu_boot_addr."); ets_set_appcpu_boot_addr(0); cpu_configure_region_protection();