Commit Graph

619 Commits

Author SHA1 Message Date
Jakob Hasse
fa099f23f3 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-30 13:21:17 +08:00
KonstantinKondrashov
861a5fb863 esp_system: Do not rely on bootloader cache settings, do cache settings unconditionally at startup app
It makes multicore app runnable by unicore bootloader

Closes https://github.com/espressif/esp-idf/issues/10714
2023-05-11 05:55:32 +00:00
Marius Vikhammer
b7ad0e0ad1 Merge branch 'bugfix/make_clean_files_v5.0' into 'release/v5.0'
build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES (v5.0)

See merge request espressif/esp-idf!23662
2023-05-11 10:39:58 +08:00
Marius Vikhammer
124a43e9ec build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
2023-05-10 09:56:15 +08:00
KonstantinKondrashov
76291d0095 efuse: Fix load_efuses_from_flash when FE is on
esp_efuse_utility_load_efuses_from_flash() read emul_efuse
as an encrypted partition, but that is not correct,
this partition was never encrypted.
Need to read it as not encrypted partition.

Fxed the case: If FE is already on then EFUSE VIRT mode can work with it.

Closes https://github.com/espressif/esp-idf/issues/10929
2023-03-29 14:58:50 +08:00
KonstantinKondrashov
e8fcb93d0f bootloader_support(esp32c2): Fix esp_secure_boot_cfg_verify_release_mode API
When FE and SB keys are set then:
- 128 low bits are read protected
- 128 hi bits are readable
2023-01-24 18:21:37 +08:00
KonstantinKondrashov
1cb0472520 bootloader_support(esp32c2): Fix WR_DIS_RD_DIS burn for secure boot key
SB key is left readable, the corresponding bit in RD_DIS is unset.
We set write-protection for RD_DIS to ensure that the SB key is always readable.
2023-01-23 21:35:31 +08:00
KonstantinKondrashov
5d37e26d35 security: Adds new APIs to check that all eFuse security features are enabled correctly 2023-01-23 21:02:55 +08:00
Jiang Jiang Jian
96db537020 Merge branch 'feature/apply_new_version_logic_v5.0' into 'release/v5.0'
all: Apply new version logic (major * 100 + minor) (v5.0)

See merge request espressif/esp-idf!20941
2023-01-12 16:18:23 +08:00
KonstantinKondrashov
df9e24a8ca bootloader_support: Fix iram_loader_seg overflow for ESP32-S2 when -O0 2023-01-06 02:00:52 +08:00
KonstantinKondrashov
823024c10c all: Apply new version logic (major * 100 + minor) 2023-01-06 02:00:52 +08:00
Omar Chebib
0714847552 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT
Closes https://github.com/espressif/esp-idf/issues/9938
2022-12-19 15:06:15 +01:00
Aditya Patwardhan
04cdc55efc esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely. 2022-12-08 10:28:30 +05:30
Jiang Jiang Jian
67f1ff7fa1 Merge branch 'feature/gd_e_hpm_support_v5.0' into 'release/v5.0'
spi_flash: Add GD25QxxE and ZBit flash HPM(120M) support(backport v5.0)

See merge request espressif/esp-idf!20240
2022-12-08 11:52:21 +08:00
Zim Kalinowski
9af06d112c Merge branch 'bugfix/rtc_retain_mem_always_erased_v5.0' into 'release/v5.0'
Bootloader: retained memory can now be kept after reboot when custom data enabled (backport v5.0)

See merge request espressif/esp-idf!21232
2022-12-05 16:38:08 +08:00
Mahavir Jain
76657faec3 Merge branch 'fix/secure_boot_v2_fix_warning_message_v5.0' into 'release/v5.0'
Fix/secure boot v2 fix warning message (v5.0)

See merge request espressif/esp-idf!21274
2022-12-05 12:21:31 +08:00
Ivan Grokhotkov
bdf2153a88 Merge branch 'bugfix/esp32s3_rom_has_ets_printf_issue_v5.0' into 'release/v5.0'
esp_rom: fix esp32s3 rom ets_printf bug (backport to v5.0)

See merge request espressif/esp-idf!20798
2022-12-02 19:28:14 +08:00
Armando
c60257e862 bootloader: fix bootloader_sha256_flash_contents mmap issue 2022-12-01 21:46:24 +08:00
Aditya Patwardhan
5dbfe4d502 secure_boot_v2: Fix warning message 2022-11-25 18:34:10 +05:30
Omar Chebib
62ad5c2258 Bootloader: retained memory can now be kept after reboot when custom data enabled
User's custom data are not taken into account during the CRC calculation anymore.
Which means taht the retained mem structure is not systematically erased
on each reboot anymore.
2022-11-24 17:35:55 +08:00
jiangguangming
8b0d0cbf5d esp_rom: remove ESP_ROM_SUPPORT_MULTIPLE_UART 2022-11-11 10:07:14 +08:00
jiangguangming
7472018f06 esp_rom: fix esp32s3 rom ets_printf bug 2022-11-11 10:04:00 +08:00
Michael (XIAO Xufeng)
f8d4bc8911 soc: upgrade version printing to vX.Y 2022-11-10 06:21:11 +00:00
Cao Sen Miao
9c09372132 bootloader_flash: Some bootloader flash functions are not put in IRAM 2022-09-20 11:39:05 +08:00
Zim Kalinowski
362f1a778e Merge branch 'bugfix/bootloader_assert_v5.0' into 'release/v5.0'
bootloader: dont print assert msg if CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is set (v5.0)

See merge request espressif/esp-idf!19942
2022-09-13 16:44:52 +08:00
Mahavir Jain
40c1529b4b
bootloader_support: fix stringop-overflow warning with PERF compiler optimization
This commit fixes build issue because of function `bootloader_common_reset_rtc_retain_mem`
getting inlined with compiler optimization level set to `PERF` (-O2).

Build failure log:
-----------------

In function 'bootloader_common_reset_rtc_retain_mem',
    inlined from 'bootloader_common_update_rtc_retain_mem' at /h/esp-idf/components/bootloader_support/src/bootloader_common_loader.c:183:13:
/h/esp-idf/components/bootloader_support/src/bootloader_common_loader.c:159:5: error: 'memset' writing 16 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  159 |     memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-05 13:40:22 +05:30
Marius Vikhammer
587aab3720 bootloader: dont print assert msg if CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is set
Closes https://github.com/espressif/esp-idf/pull/7518
2022-09-05 12:31:23 +08:00
Laukik Hase
5545b3790f
esp_app_format: Fixed build errors and resolved dependencies 2022-08-24 14:46:32 +05:30
Ivan Grokhotkov
9cd98fbd4a Merge branch 'bugfix/add_signature_in_image_len_v5.0' into 'release/v5.0'
bootloader_support: consider signature sector in image length validation (v5.0)

See merge request espressif/esp-idf!19483
2022-08-23 20:19:24 +08:00
Mahavir Jain
db7c4e4938
bootloader_support: consider signature sector in image length validation
For secure boot enabled cases, bootloader and firmware images have signature
appended and size is variable based on scheme being used. This appended data
must be considered while verifying image length against allocated partition
size to avoid any possibilities of going beyond reserved size.

Closes IDF-5617
2022-08-10 10:38:02 +05:30
jingli
8cd7c30bc7 kconfig: refactor xtal freq kconfig to common configuration item 2022-08-08 13:53:02 +08:00
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Darian
c8ee369a7c Merge branch 'feature/deprecate-old-cpu-api' into 'master'
HAL: Deprecate old CPU/SoC/Interrupt Controller HAL API

Closes IDF-4919 and IDF-5032

See merge request espressif/esp-idf!18987
2022-07-23 00:37:33 +08:00
Cao Sen Miao
ec6a56ed0c spi_flash: re-enable the HPM mode on several XMC chips 2022-07-22 09:54:56 +08:00
morris
c4e84751a5 driver: fix public header exceptions for driver 2022-07-22 00:12:36 +00:00
Guillaume Souchere
0bac33ed41 esp_system: Remove deprecate section from esp_cpu.h
- Remove esp_cpu_in_ocd_mode() from esp_cpu.h. Users should call esp_cpu_dbgr_is_attached() instead.
- Remove esp_cpu_get_ccount() from esp_cpu.h. Users should call esp_cpu_get_cycle_count() instead.
- Remove esp_cpu_set_ccount() from esp_cpu.h. Users should call esp_cpu_set_cycle_count() instead.
- Other IDF components updated to call esp_cpu_dbgr_is_attached(), esp_cpu_get_cycle_count() and esp_cpu_set_cycle_count() as well.
2022-07-22 00:06:06 +08:00
Guillaume Souchere
6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00
Jing Li
66395a5c00 system/sleep: further fix spi flash/ram current leakage 2022-07-21 19:14:26 +08:00
Jakob Hasse
33a3616635 refactor (bootloader_support, efuse)!: remove target-specific rom includes
The following two functions in bootloader_support are private now:
* esp_secure_boot_verify_sbv2_signature_block()
* esp_secure_boot_verify_rsa_signature_block()
They have been moved into private header files
inside bootloader_private/

* Removed bootloader_reset_reason.h and
  bootloader_common_get_reset_reason() completely.
  Alternative in ROM component is available.

* made esp_efuse.h independent of target-specific rom header
2022-07-13 10:29:02 +08:00
Song Ruo Jing
ea97cc93ea Merge branch 'feature/c2_systimer_26mhz' into 'master'
esp32c2: 26 MHz XTAL support: Kconfig option, systimer support

Closes IDF-5412 and IDF-5413

See merge request espressif/esp-idf!18835
2022-07-11 16:17:25 +08:00
Marius Vikhammer
6cc871d793 Merge branch 'feature/ulp_riscv_adc' into 'master'
ulp-riscv: add support for using ADC as well as an example show-casing it.

Closes IDFGH-7564 and IDF-1714

See merge request espressif/esp-idf!18767
2022-07-11 12:30:31 +08:00
songruojing
b3d8db3ae2 bootloader, esp_system: esp32c2 console uart to support 26MHz xtal
Gets the XTAL frequency from the RTC storage register, remove UART_CLK_FREQ_ROM macro from soc.h
2022-07-11 12:24:58 +08:00
Marius Vikhammer
e8b5096f52 ulp-riscv: add support for using ADC as well as an example show-casing it. 2022-07-11 09:31:22 +08:00
Ivan Grokhotkov
f0f9890096 bootloader: set the initial XTAL frequency based on the Kconfig option 2022-07-08 15:04:26 +08:00
KonstantinKondrashov
0f8ff5aa15 efuse: Adds major and minor versions and others 2022-07-05 14:38:27 +08:00
Omar Chebib
7e42038c86 Merge branch 'refactor/move_regi2c_headers' into 'master'
Refactor: move regi2c_*.h header files from esp_hw_support to soc component

See merge request espressif/esp-idf!18676
2022-07-04 11:32:30 +08:00
Cao Sen Miao
a690a87829 spi_flash: Remove legacy spi_flash drivers 2022-07-01 11:01:34 +08:00
Omar Chebib
cd48baf979 Refactor: move regi2c_*.h header files from esp_hw_support to soc component
When creating G0 layer, some regi2c_*.h headers were moved out from
esp_hw_support (G1) to soc (G0). In order to be consistent with that change,
move all the remaining regi2c_*.h headers to soc too.
2022-06-30 09:40:44 +00:00
Omar Chebib
8fae0f0753 G0: Support Xtensa targets for G0-only compilation
G0-only example now supports Xtensa targets. This means that G0 layer
does not depend on G1+ layers anymore
2022-06-20 11:34:20 +00:00
Konstantin Kondrashov
7f109b8181 Merge branch 'bugfix/adds_iram_attr_for_efuse_apis' into 'master'
bootloader_efuse: Adds IRAM_ATTR for efuse API

Closes IDFGH-7601

See merge request espressif/esp-idf!18517
2022-06-17 13:24:41 +08:00