Commit Graph

370 Commits

Author SHA1 Message Date
Ivan Grokhotkov
9924d9f271
esp_system: usb_console support for ESP32-S3
Closes https://github.com/espressif/esp-idf/issues/8879
Closes https://github.com/espressif/esp-idf/issues/8738
2023-04-12 11:17:41 +02:00
Ivan Grokhotkov
4a91ccf4ce
esp_rom: implement usb deinit functions added in S3 ROM for S2
This cleans up usb_console.c and prepares it for S3 support.
2023-04-12 11:08:43 +02:00
Ivan Grokhotkov
74fa41f434
esp_rom: add USB_OTG "port" number for S2 and S3 2023-04-12 11:08:42 +02:00
Marius Vikhammer
03c2c8db77 Merge branch 'feature/esp_sys_iram_cleanup' into 'master'
esp-system: move uncessary IRAM functions to flash

Closes IDF-7138 and IDF-7148

See merge request espressif/esp-idf!23121
2023-04-10 17:24:14 +08:00
Marius Vikhammer
db059b155a esp-system: move uncessary IRAM functions to flash 2023-04-10 11:10:28 +08:00
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
Konstantin Kondrashov
6c5a7da77c Merge branch 'feature/unicore_bootloader_can_run_multicore_app' into 'master'
esp_system: Fix case when multicore app can not be run if bootloader is unicore

Closes IDFGH-9336

See merge request espressif/esp-idf!22664
2023-03-29 21:56:26 +08:00
Zim Kalinowski
ce9d466324 Merge branch 'bugfix/esp-system-ignored-warnings' into 'master'
esp_system: fixed and reenable no-format warnings

Closes IDF-6801

See merge request espressif/esp-idf!22710
2023-03-29 20:18:14 +08:00
Marius Vikhammer
2608c1ec1e system: remove unused C2 cache kconfig option 2023-03-29 10:06:13 +08:00
KonstantinKondrashov
975c138fad 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-03-28 23:17:16 +08:00
Zim Kalinowski
fb7aafd348 esp_system: fix and reenable no-format warning 2023-03-28 13:42:44 +02:00
Marius Vikhammer
a5c70c24e5 Merge branch 'bugfix/memprot_cleanup_iram_attr' into 'master'
memprot: move memprot functions out of IRAM

See merge request espressif/esp-idf!20697
2023-03-28 10:18:22 +08:00
Mahavir Jain
86b6f87d68 Merge branch 'bugfix/ram_loadable_elf_flash_mmap_issue' into 'master'
Fix flash mmap data integrity issue for RAM loadable ELF case

See merge request espressif/esp-idf!22802
2023-03-23 12:13:35 +08:00
Michael (XIAO Xufeng)
dbbc1ba5be Merge branch 'feat/merge_nuttx_patch' into 'master'
G0, G1: fix issues that prevents using G0/G1 components on other platforms

See merge request espressif/esp-idf!22521
2023-03-21 20:48:21 +08:00
Jiang Jiang Jian
fdea5289a2 Merge branch 'bugfix/static_ram_size' into 'master'
system: fixed USE_FIXED_STATIC_RAM_SIZE option

See merge request espressif/esp-idf!21368
2023-03-20 13:57:38 +08:00
Mahavir Jain
7b995355ba
startup: fix incorrect MMU configuration issue for the RAM loadable ELF
For RAM loadable ELF, entire firmware is running from RAM and hence the
IROM/DROM size must be treated as 0 (no cache mappings created for
code/rodata).
2023-03-20 11:12:06 +05:30
Jakob Hasse
7dbe9687f9 Merge branch 'bugfix/esp_shared_stack_watchpoint_setting' into 'master'
bugfix(esp_system): made watchpoint setting configuration-dependent

Closes IDFGH-9003

See merge request espressif/esp-idf!21738
2023-03-20 10:19:05 +08:00
Marius Vikhammer
43784e7a24 memprot: move memprot functions out of IRAM
Memprot functions are no longer placed by default in IRAM,
selecting ESP_PANIC_HANDLER_IRAM will still force panic related memprot
functions to be placed in IRAM.
2023-03-17 14:51:20 +08:00
Marius Vikhammer
585f05596b system: fixed USE_FIXED_STATIC_RAM_SIZE option
The USE_FIXED_STATIC_RAM_SIZE was not actually causing the heap to start
at a fixed address.

Closes https://github.com/espressif/esp-idf/issues/10270
Closes https://github.com/espressif/esp-idf/issues/10271
2023-03-16 16:23:59 +08:00
Gustavo Henrique Nihei
3672144c9f efuse: Remove dependency on bootloader component headers
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-16 01:50:21 +08:00
Armando
785bd812e9 cpu_start: move esp_rom_spiflash_attach earilier
esp_rom_spiflash_attach is called in cpu_start.c when it's
CONFIG_APP_BUILD_TYPE_RAM && !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP.

This function will:
- reset MSPI
- configure MSPI IOs
- configure MSPI into slow read mode

Prior to this commit, this function is put quite late. It's OK for chips
earlier than C6. On C6 and H2, MMU registers are in SPI_MEM_x, so
resetting MSPI registers will also reset MMU registers.

After this commit, this funciton is called eariler, before
cpu_start.c: bootloader_init().
2023-03-15 10:59:20 +08:00
Jakob Hasse
03bc6488de bugfix(esp_system): made watchpoint setting configuration-dependent
esp_execute_shared_stack_function always restored the stack watchpoint
regardless of CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK. This would lead
to an abondoned but active watchpoint on a former stack once the task
calling esp_execute_shared_stack_function is deleted, if
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is inactive.
This has been fixed now.

Closes https://github.com/espressif/esp-idf/issues/10414
2023-03-13 14:24:15 +08:00
Cao Sen Miao
8b5f4f54fc system: Clean up code, some single core chips have useless dual-core code 2023-03-13 10:27:57 +08:00
Cao Sen Miao
bc655a6890 spi_flash: Allow clock frequency up to 64M, and make it default on ESP32H2 2023-03-10 11:39:53 +08:00
Jiang Guang Ming
fc9538c63d Merge branch 'feature/add_more_pytest_config_to_flash_mmap' into 'master'
flash mmap: more config options for flash mmap test app

See merge request espressif/esp-idf!21991
2023-03-08 13:44:29 +08:00
jiangguangming
87f2eb9e2a esp_rom: put rom cache related functions to cache.h 2023-03-07 14:51:24 +08:00
jiangguangming
91b86f55d5 esp_system: use ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE instead of IDF_TARGET_XXX 2023-03-06 20:32:04 +08:00
Jiang Guang Ming
5414eda027 flash mmap: disable mmap into instruction address when SPI_FLASH_ROM_IMPL enabled 2023-03-06 19:47:18 +08:00
Gustavo Henrique Nihei
3cbac3dd1d esp_system: Ensure TIMG0 clock is always enabled during normal operation
If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
registers (Flashboot protection included) will be re-enabled, and some
seconds later, will trigger an unintended reset.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-06 04:58:11 +00:00
Wu Zheng Hui
2066977b48 Merge branch 'feature/bringup_esp32c6_deepsleep_support_master' into 'master'
esp32c6: bringup deepsleep examples

Closes IDF-6051, IDF-6052, IDF-5349, IDF-5924, and WIFI-5352

See merge request espressif/esp-idf!22300
2023-03-03 23:53:10 +08:00
Song Ruo Jing
51777a6862 gpio: Fix io hold functionality on esp32c6 and esp32h2 2023-03-02 18:10:10 +08:00
harshal.patil
04cc562180 mbedtls: enable RSA support for esp32h2 2023-03-01 14:18:57 +05:30
Song Ruo Jing
8486a2c3ad Merge branch 'bugfix/revert_rtc_clock_bbpll_power_on_with_usb' into 'master'
usb_serial_jtag: Improve the code for the issue of usb cdc device unable to work during sleep

Closes IDFGH-6887

See merge request espressif/esp-idf!20973
2023-02-27 23:18:54 +08:00
Song Ruo Jing
1a66459b44 usb_serial_jtag: Improve the code for the issue of usb cdc device unable to work during sleep
1. Remove RTC_CLOCK_BBPLL_POWER_ON_WITH_USB Kconfig option
   During sleep, BBPLL clock always gets disabled
   esp_restart does not disable BBPLL clock, so that first stage bootloader log can be printed
2. Add a new Kconfig option PM_NO_AUTO_LS_ON_USJ_CONNECTED
   When this option is selected, IDF will constantly monitor USB CDC port connection status.
   As long as it gets connected to a HOST, automatic light-sleep will not happen.

Closes https://github.com/espressif/esp-idf/issues/8507
2023-02-27 12:10:49 +08:00
Armando
4997689de5 cache: support h2 and c6 cache error 2023-02-24 16:16:46 +08:00
Alexey Lapshin
49af663dfb esp_system: fix gcc-12 compile errors 2023-02-22 05:33:03 +00:00
Song Ruo Jing
987fd3208a Merge branch 'feature/esp32h2_clock_basic_support' into 'master'
clk: Add basic clock support for esp32h2

Closes IDF-6265 and IDF-5973

See merge request espressif/esp-idf!21943
2023-02-21 16:16:05 +08:00
Jing Li
75a82988f1 Merge branch 'refactor/wdt_use_unified_type' into 'master'
wdt: refactor wdt codes to use unified type

Closes IDF-5653

See merge request espressif/esp-idf!22378
2023-02-21 09:46:06 +08:00
Song Ruo Jing
2c2a62e323 clk_tree: Add basic clock support for esp32h2
- Support SOC ROOT clock source switch
- Support CPU frequency change
- Support RTC SLOW clock source switch
- Support RTC SLOW clock + RC FAST calibration

Remove FPGA build for esp32h2
2023-02-20 17:15:02 +08:00
morris
195f6b99ad rmt: expose private API to get channel ID
Closes https://github.com/espressif/esp-idf/issues/10596
2023-02-16 11:37:25 +08:00
jingli
9c37441b17 wdt: refactor wdt codes to use unified type 2023-02-15 12:08:55 +08:00
Wu Zheng Hui
d1b6ff6cca Merge branch 'bugfix/reset_modem_lpcon_in_soft_reset' into 'master'
bugfix: reset modem lpcon in soft reset

See merge request espressif/esp-idf!22347
2023-02-14 10:31:17 +08:00
wuzhenghui
0afeac9951 bugfix: reset modem lpcon in soft reset 2023-02-13 17:04:35 +08:00
Armando
06e7c02da7 esp_mm: h2 support 2023-02-07 20:23:53 +08:00
Armando
e76c52d4df cache: fix s2 dcache size 0 issue when psram disabled 2023-02-07 20:23:52 +08:00
Armando
d6844051fc esp_mm: new virtual memory mapping apis via mmu 2023-02-07 20:23:52 +08:00
jingli
f8cc2ec86d esp32c2: support rtc time feature depend on rtc memory, since c2 does not have rtc memory 2023-02-02 20:25:59 +08:00
Wu Zheng Hui
04987ac201 Merge branch 'feature/add_ram_loadable_app_support' into 'master'
feature: add ram loadable app support

See merge request espressif/esp-idf!19465
2023-02-02 10:28:13 +08:00
wuzhenghui
44df5b31af feature: add ram loadable app support 2023-02-01 17:57:22 +08:00
Li Shuai
59cf87fe7d pmu: sleep initialization and sleep start support for esp32c6
Initialize the pmu sleep machine constant when pmu is initialized, and calculate
the pmu sleep time adjustment value and hardware configuration value according
to the machine constant during system sleep.

Calibrate fast OSC before each sleep and use the calibration value to calculate
PMU hardware wait cycles when use the fast OSC as the work clock.
2023-01-31 22:12:27 +08:00