From 75fcd062e8bfea7e97317a4b31dc51af796ff135 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 19 Sep 2018 11:34:34 +0800 Subject: [PATCH] esp32: abort when running on single core chip in dual core mode Ref. https://esp32.com/viewtopic.php?f=2&t=7307 --- components/esp32/cpu_start.c | 6 ++++++ docs/en/get-started-cmake/index.rst | 5 +++++ docs/en/get-started/index.rst | 5 +++++ docs/zh_CN/get-started/index.rst | 4 ++++ 4 files changed, 20 insertions(+) diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 4d907f333c..abe142a4fc 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -29,6 +29,7 @@ #include "soc/io_mux_reg.h" #include "soc/rtc_cntl_reg.h" #include "soc/timer_group_reg.h" +#include "soc/efuse_reg.h" #include "driver/rtc_io.h" @@ -163,6 +164,11 @@ void IRAM_ATTR call_start_cpu0() ESP_EARLY_LOGI(TAG, "Pro cpu up."); #if !CONFIG_FREERTOS_UNICORE + if (REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_DIS_APP_CPU)) { + ESP_EARLY_LOGE(TAG, "Running on single core chip, but application is built with dual core support."); + ESP_EARLY_LOGE(TAG, "Please enable CONFIG_FREERTOS_UNICORE option in menuconfig."); + abort(); + } ESP_EARLY_LOGI(TAG, "Starting app cpu, entry point is %p", call_start_cpu1); //Flush and enable icache for APP CPU Cache_Flush(1); diff --git a/docs/en/get-started-cmake/index.rst b/docs/en/get-started-cmake/index.rst index 8b3318a40b..ab4557f542 100644 --- a/docs/en/get-started-cmake/index.rst +++ b/docs/en/get-started-cmake/index.rst @@ -248,6 +248,11 @@ Here are couple of tips on navigation and use of ``menuconfig``: * Pressing ``?`` while highlighting a configuration item displays help about that item. * Type ``/`` to search the configuration items. +.. attention:: + + When using ESP32-DevKitC board with ESP32-SOLO-1 module, enable single core mode (:envvar:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing example applications. + + .. _get-started-build-cmake: Build The Project diff --git a/docs/en/get-started/index.rst b/docs/en/get-started/index.rst index 188b6938d4..9d5dddad4d 100644 --- a/docs/en/get-started/index.rst +++ b/docs/en/get-started/index.rst @@ -204,6 +204,11 @@ Here are couple of tips on navigation and use of ``menuconfig``: If you are **Arch Linux** user, navigate to ``SDK tool configuration`` and change the name of ``Python 2 interpreter`` from ``python`` to ``python2``. +.. attention:: + + When using ESP32-DevKitC board with ESP32-SOLO-1 module, enable single core mode (:envvar:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing example applications. + + .. _get-started-build-flash: Build and Flash diff --git a/docs/zh_CN/get-started/index.rst b/docs/zh_CN/get-started/index.rst index 043569da5d..e585f74c20 100644 --- a/docs/zh_CN/get-started/index.rst +++ b/docs/zh_CN/get-started/index.rst @@ -200,6 +200,10 @@ ESP-IDF 的 :idf:`examples` 目录下有一系列示例工程,都可以按照 如果你是 **Arch Linux** 用户,需要进入 ``SDK tool configuration`` 将 ``Python 2 interpreter`` 从 ``python`` 修改为 ``python2``。 +.. attention:: + + 如果 ESP32-DevKitC 板载的是 ESP32-SOLO-1 模组,请务必在烧写示例程序之前在 menuconfig 中使能单核模式(:envvar:`CONFIG_FREERTOS_UNICORE`)。 + .. _get-started-build-flash: