Commit Graph

440 Commits

Author SHA1 Message Date
Marius Vikhammer
5cbd311ecf system: add kconfig option for using parts of SRAM1 for IRAM
Using parts of SRAM1 for IRAM allows apps with more statically allocated IRAM

Closes https://github.com/espressif/esp-idf/issues/9824
2023-04-07 07:12:58 +00:00
Mahavir Jain
f22daec784 Merge branch 'feature/secure_set_efuses_to_prevent_brick_chip' into 'master'
security: write-protect DIS_ICAHE and DIS_DCACHE

Closes IDF-5177

See merge request espressif/esp-idf!22640
2023-03-29 11:51:09 +08:00
KonstantinKondrashov
a3232e4a5b bootloader: Adds an option to leave DIS_CACHE writeable 2023-03-29 00:02:25 +08:00
KonstantinKondrashov
efbafb873b bootloader_support: Adds API to detect Factory reset has happened
Closes https://github.com/espressif/esp-idf/issues/10753
2023-03-22 02:21:54 +08:00
Armando
89fa53f1c0 mmu: support configurable mmu page size 2023-03-04 02:48:40 +00:00
Armando
0fb0be3817 ld: fixed bootloader and app potential overlap issue 2023-03-01 10:39:30 +08:00
KonstantinKondrashov
f3394c488a efuse: Add support for esp32h2 2023-02-21 08:18:14 +00:00
wuzhenghui
a5467f42a0 codeclean: only S series chip VDDSDIO is configurable 2023-01-31 22:12:58 +08:00
cje
0fb408cc68 pmu active state ICG map initialize and modify i2c master force enable to enable 2023-01-31 22:12:27 +08:00
wuzhenghui
05e37ba214 esp32h2 memory: update esp32h2 memory layout 2023-01-06 05:30:24 +00:00
Cao Sen Miao
4713a9a7f2 ESP32H2: Introduce new chip target esp32h2, hello_world example supported 2022-12-29 12:29:14 +08:00
KonstantinKondrashov
92de037883 efuse: Hides the FLASH_ENCRYPTION_MODE_RELEASE option when using EFUSE_VIRTUAL 2022-12-22 20:03:42 +08:00
Mahavir Jain
188017d6b1
docs: Fix Secure DL mode documentation about flash read being unsupported
Simple flash read command is not supported if Secure DL mode is enabled on the target.
Remove reference of this from the relevant docs part.

Related: https://github.com/espressif/esptool/issues/810
Related: ESPTOOL-567
Closes IDF-6468
2022-12-14 10:03:46 +05:30
Marius Vikhammer
4144451bdc bootloader: increase iram_loader_seq size on S2
Segment was full when compiling with -O0
2022-11-28 15:16:48 +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
wuzhenghui
66fb86972d bootloader: update bootloader memory map 2022-09-29 11:13:06 +08:00
wuzhenghui
1c820b0a6d esp32c6: add bootloader support 2022-09-26 20:24:52 +08:00
Roland Dobai
d08898aabc Merge branch 'fix/tools-gdbinit-with-elf-symbols' into 'master'
tools: fixed elf symbols load if gdbinit specified

Closes IDF-4991 and GCC-246

See merge request espressif/esp-idf!18089
2022-09-26 16:20:19 +08:00
Alexey Lapshin
29655fe22a tools: fixed elf symbols load if gdbinit specified
ROM and bootloader symbols add to use in GDB (via 'idf.py gdb')
2022-09-21 22:39:03 +04:00
Ivan Grokhotkov
c392c06216
cmake: remove -D prefix from COMPILE_DEFINITIONS property
Unlike COMPILE_OPTIONS, COMPILE_DEFINITIONS CMake property assumes
values without the -D prefix, such as NAME or NAME=VAL.
Previously, IDF build system was passing COMPILE_DEFINITIONS build
property to CMake COMPILE_OPTIONS property, so -D prefix was not
a problem.
Now that COMPILE_DEFINITIONS CMake property is used, -D prefix has
to be removed.

(Note that this doesn't affect 'target_compile_definitions' function,
which strips -D prefix before adding the definition to the property.)
2022-09-20 11:08:02 +02:00
Marius Vikhammer
572e79530c Merge branch 'bugfix/c2_skip_validate' into 'master'
bootloader: allow skip image validation on C2

Closes IDF-5827

See merge request espressif/esp-idf!19755
2022-09-06 14:21:15 +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
Marius Vikhammer
c36cd5238c bootloader: allow skip image validation on C2
BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not supported on C2 due to
no RTC memory, but BOOTLOADER_SKIP_VALIDATE_ALWAYS should still be
supported.
2022-08-25 16:51:44 +08:00
wuzhenghui
5e8ba9cea8 use enum and designated initializers in soc_memory_type define 2022-07-29 17:07:41 +08:00
wuzhenghui
2ad49a9be5 update bootloader.ld rom_boot ram usage info 2022-07-29 10:51:47 +08:00
wuzhenghui
d6461d91e2 update bootloader memory allocation 2022-07-29 10:51:47 +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
Omar Chebib
3c9856bdd1 (Xtensa) Build: add .xt.prop and .xt.lit to the compiled ELF file
Adding prop and lit sections to the ELF will let the debugger and the disassembler
have more info about data bytes present in the middle of the Xtensa
instructions, usually used for padding.
2022-07-05 04:39:29 +00:00
Alexey Lapshin
69b317368e esp_system: Fix esp32c2/esp32c3/esp32h2 TLS size
The change fixes thread-local-storage size by removing .srodata section
from it. It initially was included in TLS section by mistake.
The issue was found when stack size increased after building applications
with GCC-11.1 compiler. Stack size became bigger because some new data
appeared in .srodata. See more details here:
adce62f53d
2022-06-27 03:29:08 +00:00
Ivan Grokhotkov
8ee3decdba
bootloader, esp_system: increase static allocation space for esp32s3
The previously used splits between memory allocated for ROM code,
2nd stage bootloader and the app were somewhat safe and conservative.
This resulted in some space being unavailable for static allocation
in the app.

This commit increases the space available for static allocation to the
maximum possible amount.

1. Some of the ROM code static allocation is only used in UART/USB/SPI
   download modes. This region ("shared buffers") has been placed at
   the lower end of ROM memory area, to be reusable in flash boot
   mode. The 2nd stage bootloader linker script is modified to "pack"
   all sections exactly up to the end but with roughly 8K margin between
   startup stacks.
2. Instead of calculating the sections placement and hardcoding the
   addresses in the LD script again, rewrite it to calculate the
   start address of each memory region automatically based on the
   logic above.
3. Adjust the app memory layout (SRAM_IRAM_END) accordingly,
   increasing the space available for static allocation.

Overall these changes increase the space available for static
allocation by about 78kB.

The downside of these changes is that the 2nd stage bootloader .data
segment is now directly adjacent to the startup stack on the PRO CPU.
Previously, there was effectively about 78kB of extra stack space for
the PRO CPU, before the stack would run into the data segment.
2022-06-15 17:57:11 +05:30
KonstantinKondrashov
b4d14902e7 bootloader: Allows app partition length not 64KB aligned for NO SECURE BOOT 2022-06-02 22:40:12 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
KonstantinKondrashov
505e18237a bootloader: Support Flash Encryption for ESP32-C2 2022-05-31 11:12:21 +00:00
jingli
e70c434780 fix compile error for esp32c2, since esp32c2 no longer support RTC fast mem 2022-05-27 19:29:38 +08:00
Marius Vikhammer
0687daf2c8 kconfig: move remaining kconfig options out of target component
The kconfig options are moved to the component where they are used,
mostly esp_hw_support and esp_system.
2022-05-23 17:57:45 +08:00
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
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
Mahavir Jain
03aafb5d52 bootloader: use SOC capability macros for security features related configuration 2022-04-01 09:38:34 +00:00
KonstantinKondrashov
754a563750 esp32c3: Adds ECO4 revision 2022-03-30 00:09:46 +08:00
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
KonstantinKondrashov
21dd929c72 bootloader: Adds a level selection for the app's test pin.
Closes https://github.com/espressif/esp-idf/issues/8332
2022-03-09 19:52:37 +08:00
KonstantinKondrashov
9605f3eb1a soc: Adds efuse hal
Replaced eFuse ROM funcs with hal layer
2022-02-24 22:20:09 +08:00
KonstantinKondrashov
ebdc52d4e2 efuse(esp32c2): Support eFuse key APIs 2022-02-01 17:30:31 +08:00
laokaiyao
cf049e15ed esp8684: rename target to esp32c2 2022-01-19 11:08:57 +08:00
morris
869bed1bb5 soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00