KonstantinKondrashov
9fd8f3786a
all: Replaces memset/memcpy with hal_mem.. funcs where were used -Wstringop-overread, -Wstringop-overflow, -Warray-bounds
...
hal: Adds hal_memcpy and hal_memset
2022-11-30 19:22:41 +08:00
Mahavir Jain
bcb4fd7ead
Merge branch 'fix/fix_behaviour_of_api_to_set_fe_release_mode' into 'master'
...
esp_flash_encrypt: If it is supported then Enable secure download mode in...
See merge request espressif/esp-idf!21310
2022-11-30 14:02:34 +08:00
Aditya Patwardhan
8d047ea910
esp_flash_encrypt: If it is supported then Enable secure download mode in release mode instead of disabling it completely.
2022-11-29 11:44:18 +05:30
Song Ruo Jing
7466ddfa8c
ci: Make consistence between pytest_*.py and .build-test-rules.yml for esp32c6 (i.e. to pass check_test_scripts_build_test_rules.py)
2022-11-28 11:58:30 +08:00
Armando (Dou Yiwen)
2ad7b85a9e
Merge branch 'bugfix/improve_ext_virtual_memory_allocation_in_2nd_btld' into 'master'
...
bootloader: improve irom & drom mapping way in 2nd bootloader on esp32c6
Closes IDF-6331
See merge request espressif/esp-idf!21173
2022-11-25 15:24:06 +08:00
Aditya Patwardhan
dfcf5878f8
secure_boot_v2: Fix warning message
2022-11-25 03:25:36 +05:30
C.S.M
28b2deaf24
Merge branch 'feature/add_target_esp32h2' into 'master'
...
ESP32-H2: Introduce new target for ESP32H2
See merge request espressif/esp-idf!21190
2022-11-24 18:31:19 +08:00
Cao Sen Miao
86aa4df5b5
ESP32-H2: Introduce new target for ESP32H2
2022-11-23 14:38:05 +08:00
Armando
ad52655558
bootloader: improve irom/drom mapping way
2022-11-22 18:53:50 +08:00
Omar Chebib
cd21058097
C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT
...
Closes https://github.com/espressif/esp-idf/issues/9938
2022-11-21 16:18:08 +08:00
wuzhenghui
a7f952238e
bootloader: enable i2c clk at bootloader_hardware init
2022-11-18 11:17:08 +08:00
jiangguangming
8f807d8964
bootloader_support: fix uart1 no printing in the 2nd bootloader stage
2022-11-10 16:24:26 +08:00
Kevin (Lao Kaiyao)
5bed8fab49
Merge branch 'refactor/rename_h2_to_h4' into 'master'
...
esp32h2: renaming esp32h2 to esp32h4
Closes IDF-6098
See merge request espressif/esp-idf!20676
2022-11-09 19:19:43 +08:00
Cao Sen Miao
d9f01ed43c
spi_flash: bringup for esp32c6
2022-11-09 12:50:46 +08:00
laokaiyao
8677216576
esp32h2: renaming esp32h2 to esp32h4
2022-11-08 17:05:33 +08:00
KonstantinKondrashov
1f9260d790
all: Apply new version logic (major * 100 + minor)
2022-11-03 08:36:23 +00:00
Song Ruo Jing
986094482b
soc: Fix esp32c6 super watchdog wrong wprotect key causing chip keeps resetting due to swd
2022-11-01 17:21:49 +08:00
Song Ruo Jing
be0fdfa176
soc: Add a soc cap, SOC_CLK_RC_FAST_D256_SUPPORTED, for whether the target has the RC_FAST_D256 clock
2022-11-01 11:23:26 +08:00
Cao Sen Miao
2c9bb4eb7d
spi_flash: Support select flash mode automatically at run time(Quad flash or Octal flash)
2022-10-18 11:25:35 +08:00
jiangguangming
8774db59f0
esp_rom: remove ESP_ROM_SUPPORT_MULTIPLE_UART
2022-10-14 14:06:40 +08:00
jiangguangming
4c3ce9f21d
esp_rom: fix esp32s3 rom ets_printf bug
2022-10-14 11:43:46 +08:00
wuzhenghui
fbc19fad70
memory_utils: Modify esp_ptr_in_diram_iram to be compatible with esp32c6
2022-09-26 20:32:13 +08:00
wuzhenghui
1c820b0a6d
esp32c6: add bootloader support
2022-09-26 20:24:52 +08:00
Marius Vikhammer
7cef82e0df
bootloader support: move unit tests to pytest
2022-09-15 15:19:42 +08:00
Omar Chebib
3a429b8b7a
Bootloader: print date and time to the banner on boot
...
* Closes https://github.com/espressif/esp-idf/issues/9718
2022-09-08 06:08:49 +00:00
Mahavir Jain
6193e4c8e8
Merge branch 'bugfix/stringop_overflow_warning' into 'master'
...
bootloader_support: fix stringop-overflow warning with `PERF` compiler optimization
See merge request espressif/esp-idf!19932
2022-09-05 16:04:15 +08:00
Mahavir Jain
4aaf02b093
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 10:42:11 +05:30
Marius Vikhammer
a77dce6979
bootloader: dont print assert msg if CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is set
...
Closes https://github.com/espressif/esp-idf/pull/7518
2022-09-02 11:01:50 +08:00
Omar Chebib
779d880580
Merge branch 'bugfix/rtc_retain_mem_always_erased' into 'master'
...
Bootloader: retained memory can now be kept after reboot when custom data enabled
See merge request espressif/esp-idf!19809
2022-09-01 16:42:54 +08:00
Omar Chebib
26c4550e6d
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-08-31 03:23:30 +00:00
wuzhenghui
82ffe7e438
replacing reset by register operations with ROM interfaces to decouple the effects of register name changes
2022-08-31 01:59:36 +00:00
Cao Sen Miao
0de699532d
bootloader_flash: Some bootloader flash functions are not put in IRAM
2022-08-29 17:24:05 +08:00
songruojing
304a8f142d
esp32c6: introduce the target
...
Add esp32c6 target to tools and Kconfig
Create directories and files that are essential for `idf.py --preview set-target esp32c6`
2022-08-19 11:13:02 +08:00
Laukik Hase
0071ea498f
esp_app_format: Fixed build errors and resolved dependencies
2022-08-17 10:59:31 +05:30
Mahavir Jain
b1e1411f7d
Merge branch 'bugfix/add_signature_in_image_len' into 'master'
...
bootloader_support: consider signature sector in image length validation
Closes IDF-5617
See merge request espressif/esp-idf!19272
2022-08-08 20:52:59 +08:00
Mahavir Jain
384f7cd1da
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-08 03:22:14 +00:00
jingli
ee3423834e
kconfig: refactor xtal freq kconfig to common configuration item
2022-08-05 19:12:29 +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
Jakob Hasse
27bb68f2d3
Merge branch 'refactor/rename_bootloader_private_include_dir' into 'master'
...
bootloader_support: rename include_bootloader/ -> private_include/
See merge request espressif/esp-idf!18475
2022-06-15 18:46:30 +08:00
KonstantinKondrashov
c4bdcf3207
bootloader_efuse: Adds IRAM_ATTR for efuse API
...
Fixes startup of app for case:
bootloader with 40Mhz and app with 80Mhz (ESPTOOLPY_FLASHFREQ)
Closes https://github.com/espressif/esp-idf/issues/9156
2022-06-15 15:48:41 +08:00
Darian
e213e66ba3
Merge branch 'refactor/esp_hw_support_cpu' into 'master'
...
esp_hw_support: Add new esp_cpu.h abstraction
Closes IDF-4769
See merge request espressif/esp-idf!17091
2022-06-14 21:11:30 +08:00
Jakob Hasse
84082d365b
refactor (bootloader_support): include_bootloader/ -> private_include/
2022-06-14 17:27:50 +08:00
Michael (XIAO Xufeng)
7b8e5888ca
Merge branch 'refactor/add_clk_tree_ll' into 'master'
...
clk_tree: Stage3 - HAL for clock subsystem
Closes IDF-4334
See merge request espressif/esp-idf!18270
2022-06-14 17:16:29 +08:00
Darian Leung
a8a3756b38
hal: Route CPU and Interrupt Controller HAL/LL to esp_cpu calls
...
This commit makes changes to cpu_ll.h, cpu_hal.h, and interrupt_controller_hal.h:
- Moved to esp_hw_support in order to be deprecated in the future
- HAL/LL API now route their calls to esp_cpu.h functions instead
Also updated soc_hal.h as follows:
- Removed __SOC_HAL_..._OTHER_CORES() macros as they dependend on cpu_hal.h
- Made soc_hal.h and soc_ll.h interfaces always inline, and removed soc_hal.c.
This commit also updates the XCHAL_ERRATUM_572 workaround by
- Removing it's HAL function and invoking the workaround it directly the bootloader
- Added missing workaround for the ESP32-S3
2022-06-14 14:40:03 +08:00
Konstantin Kondrashov
7d942e0a5d
Merge branch 'feature/efuse_rst_is_treated_as_poweron_rst' into 'master'
...
reset_reasons: EFUSE_RST is treated as POWERON_RST + checks errors of eFuse BLOCK0
Closes IDF-3702
See merge request espressif/esp-idf!14742
2022-06-13 21:26:13 +08:00
songruojing
c8752cee6a
clk_tree: Refactor rtc_clk.c by adding HAL layer for clock subsystem
2022-06-13 17:47:50 +08:00
KonstantinKondrashov
46f0313d6b
reset_reasons: EFUSE_RST is treated as POWERON_RST
...
ESP32 does not have the EFUSE_RST, the rest chips has this reset reason.
2022-06-09 17:49:03 +08:00
Cao Sen Miao
6589daabb9
MMU: Add configurable mmu page size support on ESP32C2
2022-06-08 19:34:31 +08:00
Michael (XIAO Xufeng)
773715d900
Merge branch 'feature/support_refresh_brownout_v1' into 'master'
...
spi_flash: send reset when brownout detected on XMC flash
Closes IDF-3882
See merge request espressif/esp-idf!16873
2022-06-06 16:27:58 +08:00
Mahavir Jain
2acab7c783
Merge branch 'feature/c2_rng_support' into 'master'
...
esp32c2: Add support for RNG
Closes IDF-4021
See merge request espressif/esp-idf!18149
2022-06-06 12:38:28 +08:00
Michael (XIAO Xufeng)
6a8aed12ee
ci: partially enable ut tests for esp32c2
...
Disabled test cases are tracked in:
IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131
- test_fatfs: IDF-5136
- test_pm: IDF-5053
- test_cache_mmu: IDF-5138
- test_partitions: IDF-5137
- test_vfs: IDF-5139
- test_freertos: IDF-5140
- test_wpa_supplicant: IDF-5046
- test_mbedtls: IDF-5141
- test_pthread: IDF-5142
- test_protocomm: IDF-5143
- test_lightsleep: IDF-5053
- test_taskwdt: IDF-5055
- test_tcp_transport: IDF-5144
- test_app_update: IDF-5145
- test_timer: IDF-5052
- test_spi: IDF-5146
- test_rtc_clk: IDF-5060
- test_heap: IDF-5167
ci: fixed issues for tests of libgcc, ets_timer, newlib
test_pm: support on C2
2022-06-02 14:23:35 +08:00
Sachin Parekh
8ad3f2ba57
esp32c2: Add support for RNG
2022-06-02 11:36:23 +08:00
Cao Sen Miao
6a2d3509dc
spi_flash: Making XMC flash works more stable when brownout detected
2022-06-02 10:38:55 +08:00
KonstantinKondrashov
dd4642b6ba
secure_boot(esp32c2): Fix case when SB key is pre-loaded
2022-05-31 11:12:21 +00:00
KonstantinKondrashov
505e18237a
bootloader: Support Flash Encryption for ESP32-C2
2022-05-31 11:12:21 +00:00
Anton Maklakov
5751ecbbe9
Merge branch 'bugfix/bootloader_warnings' into 'master'
...
bootloader: minor fixes of warnings
See merge request espressif/esp-idf!18307
2022-05-31 13:36:01 +08:00
Jiang Jiang Jian
2bc5d58807
Merge branch 'feature/support_sleep_for_esp32c2' into 'master'
...
esp32c2: support power management
Closes IDF-4440 and IDF-4617
See merge request espressif/esp-idf!18174
2022-05-30 17:57:18 +08:00
Anton Maklakov
77c3bb9cfe
bootloader: suppress -Wstringop-overflow
2022-05-30 11:45:33 +07:00
Anton Maklakov
aeaebc0977
bootloader: explicit initialization
2022-05-30 11:45:33 +07:00
Wu Zheng Hui
b98622c624
efuse: update efuse name
2022-05-28 22:03:16 +08:00
jingli
ae127b04cd
fix ld err since esp32c2 do not suport config gpio of spi flash via efuse
2022-05-27 19:29:38 +08:00
songruojing
a5b09cf015
rtc_clk: Clean up some clock related enum and macro in soc/rtc.h, replace with new ones in
...
soc/clk_tree_defs.h
2022-05-24 22:59:41 +08:00
Sachin Parekh
7dd62bb044
esp32c2: Remove assert check on len for SHA calculation
2022-05-11 18:00:07 +05:30
Sachin Parekh
2c725264f7
esp32c2: Support Secure Boot V2 based on ECDSA scheme
2022-05-11 18:00:03 +05:30
Gustavo Henrique Nihei
8ffb157791
bootloader: Create option for enabling memory region protection
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-05-03 09:58:25 -03:00
Ivan Grokhotkov
871375cae3
Merge branch 'bugfix/bootloader_support_public_req' into 'master'
...
esp_hw_support: remove public dependency on bootloader_support
See merge request espressif/esp-idf!17792
2022-04-27 17:04:07 +08:00
Cao Sen Miao
4418a855ba
spi_flash: refactor the spi_flash clock configuration, and add support for esp32c2
2022-04-26 15:22:37 +08:00
Marius Vikhammer
d2872095f9
soc: moved kconfig options out of the target component.
...
Moved the following kconfig options out of the target component:
* CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system
* ESP*_REV_MIN -> esp_hw_support
* ESP*_TIME_SYSCALL -> newlib
* ESP*_RTC_* -> esp_hw_support
Where applicable these target specific konfig names were merged into
a single common config, e.g;
CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
2022-04-21 12:09:43 +08:00
Ivan Grokhotkov
85cb079838
esp_hw_support: remove public dependency on bootloader_support
...
In c4bcf111
, soc_memory_types.h header was moved from soc to
esp_hw_support. Since some of the functions are also used in
bootloader and because esp_hw_support is not part of the bootloader
build, part of the functions were moved into bootloader_support.
To make these functions available to the app, bootloader_support was
added as a public dependency of esp_hw_support.
Since esp_hw_support is in common requirements list, this has added
bootloader_support as a public requirement to every component in the
build. Adding new public requirements outside of common components
is undesirable, since components may accidentally include headers
from bootloader_support without explicitly declaring it as a
requirement.
This commit reverts this addition. Until a better solution is found,
some part of esp_memory_utils.h is duplicated into
bootloader_memory_utils.h. A CI check is added to make sure these
files stay in sync.
2022-04-16 10:50:12 +02:00
Jakob Hasse
3ceaba5b32
refactor (docs, rng): Clarify RNG usage
2022-04-11 10:55:28 +08:00
Armando
c4bcf1117c
esp_hw_support: move soc_memory_types.h helper functions into esp_hw_support
2022-04-08 11:46:10 +08:00
Omar Chebib
9380fd6bee
G0: remove components/esp32*
dependency on efuse component
2022-03-30 11:40:37 +08:00
morris
de662b987e
driver: fix issue found by coverity scan
2022-03-24 21:36:03 +08:00
Anton Maklakov
68e5d9d585
Remove IRAM_ATTR from any function declarations
...
IRAM_ATTR expands to a unique section attribute. Applying it to both
declaration and definition results in a section conflict.
2022-03-22 09:58:50 +00:00
Marius Vikhammer
453516fbbe
Merge branch 'bugfix/replace_deprecated_options' into 'master'
...
kconfig: replace deprecated options with new values
See merge request espressif/esp-idf!17494
2022-03-16 09:32:55 +08:00
Marius Vikhammer
ca3c056ac9
kconfig: replace deprecated options with new values
2022-03-15 16:28:53 +08:00
Rahul Tank
f376bb5d05
Add support in Nimble for ESP32H2
2022-03-14 11:57:53 +05:30
Michael (XIAO Xufeng)
aab535fe4a
Merge branch 'bugfix/regi2c_ctrl_spinlock_s2' into 'master'
...
hw_support: fixed regi2c not protected by lock on ESP32S2
See merge request espressif/esp-idf!16653
2022-03-13 02:47:53 +08:00
Michael (XIAO Xufeng)
d5bdf95580
hw_support: fixed regi2c not protected by lock on ESP32S2
2022-03-13 00:24:08 +08:00
Armando (Dou Yiwen)
6ed3ffbbf1
Merge branch 'refactor/remove_redundant_rom_cache_dependency' into 'master'
...
cache: remove redundant rom cache dependency in bootloader
Closes IDF-4523
See merge request espressif/esp-idf!17077
2022-03-12 10:11:39 +08:00
Armando
c1cbd7bbf6
cache/mmu: implememnt cache and mmu hal APIs in bootloader
2022-03-11 22:43:11 +08:00
Cao Sen Miao
8dce0cbf6b
spi_flash: Fix bug that in bootloader dummy is 0 when mosi is 0
2022-03-09 18:49:34 +08:00