Skip to content

Commit cecef8e

Browse files
author
me-no-dev
committedNov 14, 2020
IDF release/v3.3 68b237fe5
1 parent a8e99ba commit cecef8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+29
-4
lines changed
 

‎tools/sdk/include/config/sdkconfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,5 @@
395395
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR 1
396396
#define CONFIG_ESP32_WIFI_IRAM_OPT 1
397397
#define CONFIG_FATFS_API_ENCODING_ANSI_OEM 1
398-
#define CONFIG_ARDUINO_IDF_COMMIT "44ec7972b"
398+
#define CONFIG_ARDUINO_IDF_COMMIT "68b237fe5"
399399
#define CONFIG_ARDUINO_IDF_BRANCH "release/v3.3"

‎tools/sdk/include/esp32/esp_panic.h

+26-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern "C"
2020
#ifndef __ASSEMBLER__
2121

2222
#include "esp_err.h"
23+
#include "soc/soc.h"
2324

2425

2526
/**
@@ -61,12 +62,36 @@ esp_err_t esp_set_watchpoint(int no, void *adr, int size, int flags);
6162
*/
6263
void esp_clear_watchpoint(int no);
6364

65+
/**
66+
* @brief Checks stack pointer in dram
67+
*/
68+
inline static bool esp_stack_ptr_in_dram(uint32_t sp)
69+
{
70+
//Check if stack ptr is in between SOC_DRAM_LOW and SOC_DRAM_HIGH, and 16 byte aligned.
71+
return !(sp < SOC_DRAM_LOW + 0x10 || sp > SOC_DRAM_HIGH - 0x10 || ((sp & 0xF) != 0));
72+
}
73+
74+
#if CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
75+
/**
76+
* @brief Checks stack pointer in external ram
77+
*/
78+
inline static bool esp_stack_ptr_in_extram(uint32_t sp)
79+
{
80+
//Check if stack ptr is in between SOC_EXTRAM_DATA_LOW and SOC_EXTRAM_DATA_HIGH, and 16 byte aligned.
81+
return !(sp < SOC_EXTRAM_DATA_LOW + 0x10 || sp > SOC_EXTRAM_DATA_HIGH - 0x10 || ((sp & 0xF) != 0));
82+
}
83+
#endif
84+
6485
/**
6586
* @brief Checks stack pointer
6687
*/
6788
static inline bool esp_stack_ptr_is_sane(uint32_t sp)
6889
{
69-
return !(sp < 0x3ffae010UL || sp > 0x3ffffff0UL || ((sp & 0xf) != 0));
90+
#if CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
91+
return (esp_stack_ptr_in_dram(sp) || esp_stack_ptr_in_extram(sp));
92+
#else
93+
return esp_stack_ptr_in_dram(sp);
94+
#endif
7095
}
7196
#endif
7297

0 commit comments

Comments
 (0)