update esp32 component

This commit is contained in:
suda-morris 2019-04-08 18:02:05 +08:00
parent c926f7515e
commit 2f4c5c51f4
4 changed files with 23 additions and 17 deletions

View File

@ -31,11 +31,13 @@ mainmenu "Espressif IoT Development Framework Configuration"
config IDF_TARGET_ESP32
bool
default y if IDF_TARGET="esp32"
default "y" if IDF_TARGET="esp32"
default "n"
config IDF_TARGET_ESP32S2BETA
bool
default y if IDF_TARGET="esp32s2beta"
default "y" if IDF_TARGET="esp32s2beta"
default "n"
menu "SDK tool configuration"
config SDK_TOOLPREFIX

View File

@ -548,9 +548,12 @@ esp_err_t esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusre
//Statusreg should have a mask
if (intrstatusreg && !intrstatusmask) return ESP_ERR_INVALID_ARG;
//If the ISR is marked to be IRAM-resident, the handler must not be in the cached region
//ToDo: if we are to allow placing interrupt handlers into the 0x400c0000—0x400c2000 region,
//we need to make sure the interrupt is connected to the CPU0.
//CPU1 does not have access to the RTC fast memory through this region.
if ((flags&ESP_INTR_FLAG_IRAM) &&
(ptrdiff_t) handler >= 0x400C0000 &&
(ptrdiff_t) handler < 0x50000000 ) {
(ptrdiff_t) handler >= SOC_RTC_IRAM_HIGH &&
(ptrdiff_t) handler < SOC_RTC_DATA_LOW ) {
return ESP_ERR_INVALID_ARG;
}

View File

@ -61,8 +61,8 @@ TEST_CASE("Spiram cache flush on mmap", "[spiram]")
mem[0]=heap_caps_malloc(TSTSZ, MALLOC_CAP_SPIRAM);
mem[1]=heap_caps_malloc(TSTSZ, MALLOC_CAP_SPIRAM);
#else
mem[0]=(void*)0x3f800000;
mem[1]=(void*)0x3f800000+TSTSZ;
mem[0]=(void*)SOC_EXTRAM_DATA_LOW;
mem[1]=(void*)SOC_EXTRAM_DATA_LOW+TSTSZ;
#endif
assert(mem[0]);
assert(mem[1]);
@ -105,8 +105,8 @@ TEST_CASE("Spiram cache flush on write/read", "[spiram]")
mem[0]=heap_caps_malloc(TSTSZ, MALLOC_CAP_SPIRAM);
mem[1]=heap_caps_malloc(TSTSZ, MALLOC_CAP_SPIRAM);
#else
mem[0]=(void*)0x3f800000;
mem[1]=(void*)0x3f800000+TSTSZ;
mem[0]=(void*)SOC_EXTRAM_DATA_LOW;
mem[1]=(void*)SOC_EXTRAM_DATA_LOW+TSTSZ;
#endif
assert(mem[0]);
assert(mem[1]);
@ -148,7 +148,7 @@ IRAM_ATTR TEST_CASE("Spiram memcmp weirdness at 80MHz", "[spiram]") {
#if USE_CAPS_ALLOC
char *mem2=heap_caps_malloc(0x10000, MALLOC_CAP_SPIRAM);
#else
char *mem2=(void*)0x3f800000;
char *mem2=(void*)SOC_EXTRAM_DATA_LOW;
#endif
#if !CONFIG_SPIRAM_SPEED_80M

View File

@ -323,7 +323,8 @@ const char* esp_get_idf_version(void);
* @brief Chip models
*/
typedef enum {
CHIP_ESP32 = 1, //!< ESP32
CHIP_ESP32 = 1, //!< ESP32
CHIP_ESP32S2BETA = 2, //!< ESP32S2BETA
} esp_chip_model_t;
/* Chip feature flags, used in esp_chip_info_t */