IDF master d93887f9f (#5336)

* Update toolchain

* Update package_esp32_index.template.json

* add optional component dependencies after Kconfig options are known (#5404)

Until this commit, Kconfig options (e.g. CONFIG_TINYUSB_ENABLED) were
used in conditions preceding idf_component_register to determine which
components need to be added to `arduino` component requirements.
However the Kconfig options aren't known at the early expansion stage,
when the component CMakeLists.txt files are expanded the first time
and requirements are evaluated. So all the conditions evaluated as if
the options were not set.
This commit changes the logic to only add these components as
dependencies when the Kconfig options are known. Dependencies become
"weak", which means that if one of the components isn't included into
the build for some reason, it is not added as a dependency.
This may happen, for example, if the component is not present in the
`components` directory or is excluded by setting `COMPONENTS` variable
in the project CMakeLists.txt file.
This also ensures that if the component is not present, it will not be
added as a dependency, and this will allow the build to proceed.

Follow-up to https://github.com/espressif/arduino-esp32/pull/5391.
Closes https://github.com/espressif/arduino-esp32/issues/5319.

* IDF master d93887f9f

* PlatformIO updates for CI (#5387)

* Update PlatformIO CI build script

- Switch to the latest toolchains 8.4.0 for ESP32, ESP32S2, ESP32C3
- Use PlatformIO from master branch for better robustness

* Update package.json for PlatformIO

Co-authored-by: Ivan Grokhotkov <ivan@espressif.com>
Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
This commit is contained in:
Me No Dev
2021-07-17 01:57:49 +03:00
committed by GitHub
parent 780588dce3
commit 16f4b0f5ba
812 changed files with 29998 additions and 7365 deletions

View File

@ -34,7 +34,6 @@ typedef struct {
* automatically assigned by the SPI bus lock.
*/
int cs_id;
uint32_t cs_setup; ///< (cycles-1) of prepare phase by spi clock
} esp_flash_spi_device_config_t;
/**

View File

@ -14,6 +14,7 @@
#pragma once
#include "esp_flash.h"
#include "esp_attr.h"
struct esp_flash_t;
typedef struct esp_flash_t esp_flash_t;
@ -33,6 +34,13 @@ typedef enum {
SPI_FLASH_REG_STATUS = 1,
} spi_flash_register_t;
typedef enum {
SPI_FLASH_CHIP_CAP_SUSPEND = BIT(0), ///< Flash chip support suspend feature.
SPI_FLASH_CHIP_CAP_32MB_SUPPORT = BIT(1), ///< Flash chip driver support flash size larger than 32M Bytes.
SPI_FLASH_CHIP_CAP_UNIQUE_ID = BIT(2), ///< Flash chip driver support read the flash unique id.
} spi_flash_caps_t;
FLAG_ATTR(spi_flash_caps_t)
/** @brief SPI flash chip driver definition structure.
*
* The chip driver structure contains chip-specific pointers to functions to perform SPI flash operations, and some
@ -193,6 +201,11 @@ struct spi_flash_chip_t {
* Read the chip unique ID.
*/
esp_err_t (*read_unique_id)(esp_flash_t *chip, uint64_t* flash_unique_id);
/**
* Get the capabilities of the flash chip. See SPI_FLASH_CHIP_CAP_* macros as reference.
*/
spi_flash_caps_t (*get_chip_caps)(esp_flash_t *chip);
};
/* Pointer to an array of pointers to all known drivers for flash chips. This array is used

View File

@ -370,7 +370,7 @@ esp_err_t spi_flash_common_set_io_mode(esp_flash_t *chip, esp_flash_wrsr_func_t
* transactions. Also prepare the command to be sent in read functions.
*
* @param chip Pointer to SPI flash chip to use. If NULL, esp_flash_default_chip is substituted.
* @param addr_32bit Whether 32 bit commands will be used (Currently only W25Q256 is supported)
* @param addr_32bit Whether 32 bit commands will be used (Currently only W25Q256 and GD25Q256 are supported)
*
* @return
* - ESP_OK if success

View File

@ -0,0 +1,67 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Currently the MSPI timing tuning related APIs are designed to be private.
* Because:
* 1. now we don't split SPI0 and SPI1, we don't have a component for SPI0, including PSRAM, Cache, etc..
* 2. SPI0 and SPI1 are strongly coupling.
*
* In the future, we may consider creating a component for SPI0, and spi_flash component will only work on SPI1 (and it
* can rely on SPI0). Therefore, we can put these APIs there.
*
*/
#pragma once
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/spi_flash.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/spi_flash.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/spi_flash.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/spi_flash.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Register ROM functions and init flash device registers to make use of octal flash
*/
esp_err_t esp_opiflash_init(void);
/**
* @brief Make MSPI work under 20Mhz
*/
void spi_timing_enter_mspi_low_speed_mode(void);
/**
* @brief Make MSPI work under the frequency as users set
*/
void spi_timing_enter_mspi_high_speed_mode(void);
/**
* @brief Tune MSPI flash timing to make it work under high frequency
*/
void spi_timing_flash_tuning(void);
/**
* @brief Tune MSPI psram timing to make it work under high frequency
*/
void spi_timing_psram_tuning(void);
/**
* @brief Set SPI1 registers to make ROM functions work
* @note This function is used for setting SPI1 registers to the state that ROM SPI functions work
*/
void spi_flash_set_rom_required_regs(void);
#ifdef __cplusplus
}
#endif