Commit graph

13428 commits

Author SHA1 Message Date
Angus Gratton
bb0a95b17c spi_flash s2: Fix encrypted writes when legacy implementation disabled
ROM function didn't use correct Addr bitlen if legacy was disabled on ESP32-S2
2020-04-24 12:43:47 -03:00
Angus Gratton
dbdce93d23 spi_flash: Use per-chip flash_ops files for legacy API
Looks like when ESP32-S2 Beta support was merged, the separate files
were dropped by accident.
2020-04-24 12:43:47 -03:00
Felipe Neves
95bc186846 flash_encryption: Fix next spi boot crypt counter value after a plaintext flash 2020-04-24 12:43:47 -03:00
Felipe Neves
f7ccc081a5 flash_encryption: replace spi crypt count efuse burning function by a esp_efuse_API
flash_encryption: modify additional efuses burning method to fix them are not being written

flass_encryption: burn efuse to disable boot from RAM space

flash_encryption: added better checking for key generation state plus set read and write protect for them

soc esp32s2: Add register-level bit definitions for read & wrote protect bits

esp32s2: Fixes for flash encryption

- Write efuses in a batch
- Fix some detection of whether existing efuse blocks are read/write protected
2020-04-24 12:43:47 -03:00
Felipe Neves
6f27992430 flash_encryption: return more clear error codes when bootloader encryption fails 2020-04-24 12:43:47 -03:00
Felipe Neves
b3d8847406 flash_encryption: added wdt feed during encryption process to avoid undesired reset. 2020-04-24 12:43:47 -03:00
Felipe Neves
7635dce502 bootloader/flash_encrypt: added esp32s2 flash encryption code on build system and enabled example
flash_enctryption: enabled flash encryption example on esp32s2

bootloader: raise WDT overflow value providing sufficient interval to encrypt app partition

flash_ encrypt: Fixed the TODOs on flash encryption key generation for esp32s2

flash_encryption: added secure boot features to flash enctryption for esp32s2

bootloader: leave only esp32s2 compatible potentially insecure options on menuconfig.

flash_encryption: removed secure boot version 1 from esp32s2 encryption code

flash_encryption:  added  CONFIG_SECURE_FLASH_REQUIRE_ALREADY_ENABLED option for esp32s2

flash_encryption: fixed the count of left plaintext flash

flash_encryption: disable dcache and icache download when using encryption in release mode

flash_encryption:  add cache potentally insecure options for s2 chips

flash_encryption: fixed bug which bricked some chips in relase mode
2020-04-24 12:43:47 -03:00
Ivan Grokhotkov
cd1aba595e Merge branch 'bugfix/mpu_panic' into 'master'
Fix issue with mpu illegal access test

See merge request espressif/esp-idf!8418
2020-04-24 20:54:08 +08:00
Michael (XIAO Xufeng)
77d5e4b4e2 Merge branch 'bugfix/timer_group_intr_enable' into 'master'
Bugfix/timer group intr enable

Closes IDFGH-3082

See merge request espressif/esp-idf!8340
2020-04-24 18:28:36 +08:00
Renz Bagaporo
5abb4f6455 esp_system, esp_common: fixes to some panic handler refactor issues 2020-04-24 16:34:15 +08:00
Renz Bagaporo
4571fb219f soc: change region in mpu test
Previously, the test uses region 3 for the illegal access test
(0x60000000 - 0x7fffffff). This caused issues with there being
peripherals located in that memory range. Change to use region 4
(0x8000000 - 0x9fffffff) instead).
2020-04-24 16:34:15 +08:00
David Cermak
9e58d94a42 esp-mesh: Added example showing internal IP capable mesh network 2020-04-24 07:32:58 +02:00
David Cermak
bcee69ae06 esp-netif: Enable easier configuration of custom DHCP server address 2020-04-24 07:32:58 +02:00
Angus Gratton
b26f93415e secure boot v2: Add anti-FI check that secure boot not enabled yet
Prevent a fault from causing bootloader to trust the provided signature incorrectly.
2020-04-24 15:03:31 +10:00
Angus Gratton
fc4b653729 secure boot v2: Don't check efuse BLK2 if only boot-time signature verification is enabled 2020-04-24 15:03:03 +10:00
Angus Gratton
fc0d6a99f8 secure boot v2: Don't log warnings when BLK2 is empty as expected
If BLK2 is empty then it's OK to continue with a warning (otherwise it may spook users into thinking
something this is wrong, but this is the expected workflow.)

If BLK2 is not empty and doesn't match then we need to fail because it won't be possible to
trust the signature.
2020-04-24 14:43:55 +10:00
Jiang Jiang Jian
741960d5ce Merge branch 'bugfix/Add_softap_example_channel_configuration' into 'master'
esp_wifi:Add softap example channel configuration

See merge request espressif/esp-idf!8387
2020-04-24 11:21:45 +08:00
Jiang Jiang Jian
79288f25e4 Merge branch 'bugfix/fix_esp32s2_package_recv_issue' into 'master'
esp_wifi: Update esp32s2 phy lib v303

Closes WIFI-2141 and WIFI-2142

See merge request espressif/esp-idf!8321
2020-04-24 11:19:48 +08:00
Ivan Grokhotkov
8a007dcbc2 Merge branch 'bugfix/ci_unterminated_sdkconfig_defaults' into 'master'
CI: Add EOL to sdkconfig.defaults before adding sdkconfig.ci

See merge request espressif/esp-idf!8437
2020-04-23 22:49:18 +08:00
Ivan Grokhotkov
275ed32a11 Merge branch 'feature/esp32s2_iram_dram_protection' into 'master'
esp32s2: IRAM/DRAM memory protection

See merge request espressif/esp-idf!8156
2020-04-23 21:52:54 +08:00
David Čermák
3d868ec05d Merge branch 'bugfix/ppp_test_check_netif' into 'master'
ppp-test: addressing stability of PPP test

See merge request espressif/esp-idf!8373
2020-04-23 21:47:40 +08:00
morris
91e62f4e37 timer_group: update hal api && fix intr_enable
timer group interrupt enable is controled by level_int_ena instead of int_ena

Closes https://github.com/espressif/esp-idf/issues/5103
2020-04-23 19:29:15 +08:00
morris
e0b9f7be6d periph_clk_gating: add reference counter 2020-04-23 19:29:15 +08:00
morris
99f0dc78c8 soc: remove mcpwm description file from esp32s2 2020-04-23 19:26:55 +08:00
Marius Vikhammer
dc2c753a7d doc: remove links to translation if building PDF
Closes IDF-1579
2020-04-23 18:59:37 +08:00
Angus Gratton
8a349d7102 Merge branch 'fix/ci_example_test_prov' into 'master'
CI: Fix prov example test exception handle

See merge request espressif/esp-idf!8413
2020-04-23 17:00:10 +08:00
xueyunfei
4e2989e40c fixbug for tcp kill state assert 2020-04-23 15:38:49 +08:00
David Cermak
a245f5047a ppp-test: wait for graceful disconnect when PPP shutdowns 2020-04-23 05:55:17 +00:00
David Cermak
b3749e38f9 ppp-test: check if ppp interface is active and IP address correct before starting the test
Addressing stability of pppos test:
* listing active network interfaces for presence of "ppp0" interface
* fixed IPv6 address regex to prevent ttfw accept partial address only
(less than 8 octets)
* workaround crash after exiting app_main()
2020-04-23 05:55:17 +00:00
Michael (XIAO Xufeng)
7ec4d64b80 spi: Update documents about the bus lock and how to use SPI Master on SPI1 bus 2020-04-23 12:27:25 +08:00
Ivan Grokhotkov
28efe511f4 Merge branch 'bugfix/semihosting_write' into 'master'
Semihosting fixes for write and the  semihost example

See merge request espressif/esp-idf!8290
2020-04-23 06:26:41 +08:00
Shivani Tipnis
745e979283 CI: Fix prov example test cryptography package version exception handling 2020-04-23 00:27:40 +05:30
Mahavir Jain
44939a6b1e Merge branch 'feature/iram_data_bss' into 'master'
esp32: IRAM_DATA_ATTR and IRAM_BSS_ATTR introduced

See merge request espressif/esp-idf!8377
2020-04-22 21:44:44 +08:00
Roland Dobai
14978aef70 CI: Add EOL to sdkconfig.defaults before adding sdkconfig.ci 2020-04-22 15:29:06 +02:00
Roland Dobai
511135989c tools: Autodetect the target of MAP files in idf_size.py 2020-04-22 13:12:56 +02:00
michael
1ca25688a8 freertos: place xQueueGenericCreateStatic into flash
`xQueueGenericCreateStatic` is placed into flash by the linker script to
reduce IRAM usage.  This will also cause the `xRingbufferCreate` not
not callable when cache is disabled.
2020-04-22 16:06:13 +08:00
michael
fdf983e0c4 spi: fix config break and reduce overhead of the bus lock on SPI1
The SPI bus lock on SPI1 introduces two side effects:

1. The device lock for the main flash requires the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` to be selected, however this
option is disabled by default in earlier IDF versions. Some developers
may find their project cannot be built by their old sdkconfig files.

2. Usually we don't need the lock on the SPI1 bus, due to it's
restrictions. However the overhead still exists in this case, the IRAM
cost for static version of semaphore functions, and the time cost when
getting and releasing the lock.

This commit:

1. Add a CONFIG_SPI_FLASH_BYPASS_MAIN_LOCK option, which will forbid the
space cost, as well as the initialization of the main bus lock.

2. When the option is not selected, the bus lock is used, the
`CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION` will be selected explicitly.

3. Revert default value of `CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION`
to `n`.

introduced in 49a48644e4.

Closes https://github.com/espressif/esp-idf/issues/5046
2020-04-22 16:06:13 +08:00
He Yin Ling
c2e068f0e4 Merge branch 'bugfix/ci_partition_table_detection' into 'master'
CI: Fix partition table detection if "partition" is in the project name

See merge request espressif/esp-idf!8223
2020-04-22 15:10:11 +08:00
Wang Jia Lin
e3f85faee5 Merge branch 'bugfix/fix_spi_flash_clock_config_error' into 'master'
flash: fix spi flash clock config error

Closes IDFGH-3077

See merge request espressif/esp-idf!8384
2020-04-22 12:44:17 +08:00
Krzysztof Budzynski
0842aed2bc Merge branch 'doc/submodule_links' into 'master'
doc: roles for linking files now correctly links to submodule repositories

Closes IDF-1584

See merge request espressif/esp-idf!8405
2020-04-22 01:49:18 +08:00
Alexey Gerenkov
c0610a49b4 tools: Updates OpenOCD version to 'v0.10.0-esp32-20200420' 2020-04-21 19:43:58 +03:00
Martin Vychodil
7491ea677a esp32s2: IRAM/DRAM memory protection
* new mem_prot API
* mem_prot on & locked by default (see Kconfig)
* feature activated in start_cpu0_default()

JIRA IDF-1355
2020-04-21 15:10:58 +02:00
Michael (XIAO Xufeng)
e2fc591a20 Merge branch 'bugfix/esp_flash_revert_qe_clear' into 'master'
esp_flash: fix the regression of non-quad mode by default chip driver, bugs in add_device and deprecate cs_id

See merge request espressif/esp-idf!8260
2020-04-21 17:52:42 +08:00
xueyunfei
b2a3b2a4f4 fixbug for set dhcp time fail 2020-04-21 14:28:39 +08:00
Angus Gratton
2433fe664d Merge branch 'doc/wdt_config' into 'master'
docs: Add details about WDT config

See merge request espressif/esp-idf!7838
2020-04-21 11:51:42 +08:00
Ivan Grokhotkov
1a7dbe22da Merge branch 'bugfix/wrong_cpp_guard' into 'master'
Bugfix/wrong cpp guard

Closes IDFGH-3129 and IDF-1219

See merge request espressif/esp-idf!8403
2020-04-20 18:47:28 +08:00
Ivan Grokhotkov
28b9acabe2 Merge branch 'bugfix/shell_runner_fails_pacman' into 'master'
Fix cmake component management test on shell runners

See merge request espressif/esp-idf!8398
2020-04-20 18:23:42 +08:00
Jiang Jiang Jian
80e5eb896c Merge branch 'optimization/DNS_get_function' into 'master'
lw-ip:optimization DNS get function

Closes WIFI-1566

See merge request espressif/esp-idf!8244
2020-04-20 16:52:22 +08:00
Marius Vikhammer
e7d92b857e doc: roles for linking files now correctly links to submodule repositories
Closes IDF-1584
2020-04-20 15:59:41 +08:00
Sergei Silnov
44d77c7100 Fix cmake component management test on shell runners 2020-04-20 09:25:03 +02:00