Commit Graph

418 Commits

Author SHA1 Message Date
Mahavir Jain
e241ee32e7 Merge branch 'bugfix/fix_ota_crash_backport_v4.3' into 'release/v4.3'
spi_flash: fix app crash when OTA because the OTA task's stack is in rtc fast memory(backport v4.3)

See merge request espressif/esp-idf!15858
2021-11-19 04:54:25 +00:00
Mahavir Jain
a397a70373 Merge branch 'bugfix/nvs_partition_encrypted_flag_compatibility_v4.3' into 'release/v4.3'
nvs: add config to ignore "encrypted" flag of nvs partitions (v4.3)

See merge request espressif/esp-idf!15921
2021-11-17 03:56:42 +00:00
Mahavir Jain
2b4604ce8e spi_flash: minor cleanup, use type/subtype from esp_partition.h 2021-11-12 09:44:04 +05:30
Mahavir Jain
893342794f nvs: add config to ignore "encrypted" flag of nvs partitions
This is to allow having pre IDF v4.3 behavior where "encrypted"
flag was not being checked for NVS partitions.

It is recommended to enable this new config only if you have
production devices where NVS partition was being set with "encrypted"
flag by mistake.

Please see commit aca9ec28b3 which
introduced check to not allow NVS partitions with "encrypted" flag set.

More discussion on this at:
https://github.com/espressif/esp-idf/issues/5747#issuecomment-956223024
https://github.com/espressif/esp-idf/issues/7839#issuecomment-961477667

Closes https://github.com/espressif/esp-idf/issues/7839
Closes IDFGH-6162
2021-11-12 09:44:04 +05:30
jingli
04ac2b319a fix: app crash when OTA because the OTA task's stack is in rtc fast memory 2021-11-09 19:51:35 +08:00
KonstantinKondrashov
208b41975b partition_table: Fix case when a few similar to otadata partitions in the table
It was when in the partition table there is a partition with type="data" and suptype=""(empty),
in this case type=1, suptype=0. It is similar to otadata partition.

This commit fixes it, now it will handle it as type=1, suptype=6 (ESP_PARTITION_SUBTYPE_DATA_UNDEFINED).
2021-10-26 16:07:31 +08:00
Michael (XIAO Xufeng)
61bd1eb225 Merge branch 'bugfix/xmc_overerase_v4.3' into 'release/v4.3'
bootloader: add xmc spi_flash startup flow to improve reliability (v4.3)

See merge request espressif/esp-idf!14768
2021-10-15 16:52:25 +00:00
Cao Sen Miao
fa0dc23a71 Merge branch 'flash/support_gd_32Mb' into 'release/v4.3'
spi_flash: support 32Mb-addess flash(backport v4.3)

See merge request espressif/esp-idf!13654
2021-10-15 01:48:59 +00:00
Michael (XIAO Xufeng)
e00f6cbde9 bootloader: add xmc spi_flash startup flow to improve reliability 2021-10-15 01:49:46 +08:00
Cao Sen Miao
e226a65a1f spi_flash: add support for 32Mbit address GD flash, for GD25Q256 2021-10-12 10:53:07 +08:00
Cao Sen Miao
ea06ee1ad6 spi_flash: move the unlock patch to bootloader and add support for GD 2021-10-11 10:52:52 +08:00
Jakob Hasse
a6371d2a97 [nvs] nvs page host runs in CI, fix build failure
* nvs host page unit test now runs in ci
* fixed nvs host page unit test build failure
2021-09-10 13:02:51 +08:00
Michael (XIAO Xufeng)
c42ee1b790 Merge branch 'bugfix/spi_flash_cs_setup_v4.3' into 'release/v4.3'
spi_flash: fix cs line setup to make the flash driver more stable(backport v4.3)

See merge request espressif/esp-idf!13967
2021-06-27 14:37:08 +00:00
Michael (XIAO Xufeng)
9249f05fc9 spi_flash: reverted unwilling cs_setup argument
Partially reverted 08f1bbe0c7.

The host should have this flexibility, which is consistent to the cs_hold argument.

However, the user should know as less as possible about the host.
So the wrapper layer (esp_flash_spi_init.c) should cover this, helping to set cs_setup to 1, to meet the common requirements.
2021-06-17 12:26:11 +08:00
Cao Sen Miao
9c7d2c7595 spi_flash: fix cs line setup to make the flash driver more stable 2021-06-15 15:27:51 +08:00
Angus Gratton
58a3e08895 paritition_table: Verify the partition table md5sum when loading the app
Additionally, always enable the partition MD5 check if flash encryption is on in
Release mode. This ensures the partition table ciphertext has not been modified
(CVE-2021-27926).

The exception is pre-V3.1 ESP-IDF bootloaders and partition tables, which
don't have support for the MD5 entry.
2021-05-30 23:21:14 +00:00
Angus Gratton
467c7af33e Merge branch 'doc/general_notes_v4.3' into 'release/v4.3'
doc: Update docs about startup sequence and memory types (v4.3)

See merge request espressif/esp-idf!13316
2021-05-03 06:48:07 +00:00
wuzhenghui
29ad86ed5b remove othercore cache disable 2021-04-27 14:40:52 +08:00
Angus Gratton
8a39b5237d doc: update the memory types and startup docs 2021-04-23 22:48:47 +10:00
Cao Sen Miao
44b81cb280 esp_flash: fix host number for passing ci 2021-04-21 13:54:26 +08:00
Omar Chebib
84dc42c4b0 gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3
When `DIS_USB_JTAG` eFuse is NOT burned (`False`), it is not possible
to set pins 18 and 19 as GPIOs. This commit solves this by manually
disabling USB JTAG when using pins 18 or 19.
The functions shall use `gpio_hal_iomux_func_sel` instead of
`PIN_FUNC_SELELECT`.
2021-04-12 17:45:06 +08:00
Armando
670b057b04 spi: remove HSPI macro on esp32c3 and esp32s3 2021-04-06 15:30:28 +08:00
Cao Sen Miao
4906779d50 spi_flash: make suspend off by default and add more information for using suspend 2021-03-29 12:02:43 +08:00
jiangguangming
a643ea9432 spi_flash: make spiflash compatible with ESP32C3 and ESP32S3 ROM 2021-03-19 16:37:34 +08:00
Michael (XIAO Xufeng)
1329747dc1 Merge branch 'bugfix/flash_s3_v4.3' into 'release/v4.3'
spi_flash: remove useless dummy and make rom compatible on esp32s3(backport v4.3)

See merge request espressif/esp-idf!12704
2021-03-11 13:38:52 +00:00
Cao Sen Miao
268787c5fb spi_flash: remove useless dummy and make rom compatible on esp32s3 2021-03-11 14:31:27 +08:00
Cao Sen Miao
1ea548ecb3 ota: fix ota with flash encryption 2021-03-05 18:39:32 +08:00
Michael (XIAO Xufeng)
1de12526eb spi_flash: update docs after adding CONFIG_SPI_FLASH_AUTO_SUSPEND 2021-02-25 18:08:23 +08:00
Marius Vikhammer
360e7c4d51 system: enable shared stack watchpoint
Enable shared stack watchpoint for overflow detection

Enable unit tests:
 * "test printf using shared buffer stack" for C3
 * "Test vTaskDelayUntil" for S2
 * "UART can do poll()" for C3
2021-02-19 16:59:29 +08:00
Marius Vikhammer
9083ef97e5 spi_flash: disable mmap into instr space unit test for C3
On C3 the cache is programmatically split between Icache and dcache and with the default setup we dont leave a lot pages
available for additional mmaps into instruction space. Disabling this test for now since any hypothetical use case for this
is no longer supported "out of the box"
2021-02-19 16:58:47 +08:00
Michael (XIAO Xufeng)
2c0962f727 Merge branch 'feature/spi_flash_auto_suspend_default_on_c3' into 'master'
spi_flash: make the auto_suspend default y on C3

See merge request espressif/esp-idf!12233
2021-02-09 19:50:48 +08:00
Michael (XIAO Xufeng)
747ac00f9b Merge branch 'bugfix/flash_encyption_80Mflash_40Mram' into 'master'
flash_encryption/psram: fixed the issue that block when flash_encryption_write

See merge request espressif/esp-idf!12177
2021-02-05 22:00:26 +08:00
Cao Sen Miao
c1b41ece32 flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/6254 2021-02-05 20:10:42 +08:00
Cao Sen Miao
b1d3d0ac74 suspend_test: delay more time for erase 2021-02-04 16:47:41 +08:00
Cao Sen Miao
e38326d715 spi_flash: fix the issue that ext flash hold is not controlled properly 2021-02-04 14:44:51 +08:00
Cao Sen Miao
8020c46da7 spi_flash: enable ext flash unit-test on esp32c3 2021-02-04 14:44:50 +08:00
Michael (XIAO Xufeng)
a0573f5b9f spi_flash: make the auto_suspend default y on C3 2021-02-04 14:11:04 +08:00
Mahavir Jain
e712a91488 spi_flash: add config option to enable encrypted partition read/write
This feature can be disabled to save some IRAM (approx 1KB) for cases
where flash encryption feature is not required.
2021-01-28 12:19:21 +00:00
Mahavir Jain
8a01cc2c26 Revert "esp_partition: disable encrypted reads/writes if flash encryption is disabled"
This reverts commit bf35ef1ce7.

It has been noticed that there are scenarios where even though firmware is not enabled
with flash encryption config feature, it should be able to write to encrypted partitions.

This revert adds the feature back which was removed around v4.0 timelines, and same
change will be backported to all releases (upto v4.0) for consistency.
2021-01-28 12:19:21 +00:00
Cao Sen Miao
f3e79ca166 spi_flash(c3): add boya chip support for suspend feature 2021-01-25 11:14:06 +08:00
Cao Sen Miao
9905da46e0 spi_flash: Add auto suspend mode on esp32c3 2021-01-25 11:14:02 +08:00
KonstantinKondrashov
1f37a5f162 spi_flash(esp32-s2): Add the workaround of a reboot issue when SPI HW suspend is enabled 2021-01-25 11:13:38 +08:00
KonstantinKondrashov
60e58eaddb spi_flash: Add auto-suspend mode for ESP32-S2
Uses HW auto_wait_idle, HW auto_suspend and SW resume
2021-01-25 11:13:38 +08:00
KonstantinKondrashov
afef16c2e9 spi_flash: Support suspend/resume mode for operations
- Adds arbitration between the erase and write in suspend mode
     (If the flash memory is suspended then only a read operation can be performed.)
- espcoredump: Dump does not use suspend feature, just resume before continue.
- spi_flash: Add release_cpu() to do suspend/release_cpu/resume
2021-01-25 11:13:38 +08:00
Angus Gratton
a7da0c894b Merge branch 'feature/c3_master_flash_enc_support' into 'master'
flash encryption: merge C3 flash encryption changes to master

See merge request espressif/esp-idf!12040
2021-01-22 12:58:38 +08:00
Cao Sen Miao
d69a07ae20 spi_flash: enable spi_flash write unit-test on esp32c3 2021-01-19 12:04:57 +08:00
Marius Vikhammer
03fa63b0c9 bootloader: add flash encryption support for C3
Adds flash encryption support for C3 and updates docs for S2 & C3
2021-01-18 14:10:54 +08:00
morris
753a929525 global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
Angus Gratton
edac64b703 Merge branch 'feature/c3_master_unit_test' into 'master'
C3: build unit tests for C3

See merge request espressif/esp-idf!11856
2021-01-11 18:11:06 +08:00
Marius Vikhammer
9c8e4fd4c5 C3: build and run unit tests
Enable building and running of unit tests in CI for C3 as well as fix
related compile errors

Also enables building of C3 test apps
2021-01-11 11:34:37 +08:00