Commit Graph

60 Commits

Author SHA1 Message Date
Martin Vychodil
d581312451 System: fix RTCFAST section alignment
This bugfix contains 3 fixes:
1. .rtc_dummy section is removed (not needed for C3)
2. .rtc_text section is padded with 16B for possible CPU prefetch
3. .rtc_text section is aligned to 4B boundary to comply with PMS Memprot requirements
2021-12-23 02:09:46 +01:00
Konstantin Kondrashov
8140b10a16 esp_system: Adds sync of FRC & RTC counters in esp_restart (v4.3) 2021-10-28 17:33:46 +00:00
Jeroen Domburg
d6cdb3e0ae usb_serial_jtag: support usb_serial_jtag on esp32c3
USB serial/jtag controller: Add vfs (logging/printf), panic handler, gdb support.

See merge request espressif/esp-idf!12925
2021-10-11 17:34:24 +08:00
Martin Vychodil
7689a801d4 System/Memprot: fixed voltage glitching detection logic
When the application is being debugged it should check the call result (esp_cpu_in_ocd_debug_mode())
is not given volt.glitch attack - so the result is triple-checked by ESP_FAULT_ASSERT macro. In case
the check fails, the system is reset immediately

IDF-4014
2021-10-04 19:25:32 +02:00
morris
be1539f926 Merge branch 'bugfix/rotary_encoder_v4.3' into 'release/v4.3'
bugfix:rotary encoder example isr service install(backport v4.3)

See merge request espressif/esp-idf!14351
2021-09-17 08:57:05 +00:00
Sachin Parekh
c215bb04f6 hmac: Added Downstream JTAG enable mode for esp32c3
If JTAG is disabled temporarily by burning SOFT_DIS_JTAG, it can be
re-enabled temporarily through esp_hmac_jtag_enable API
2021-09-14 17:05:01 +05:30
simon.chupin
34ab97f081 Tools: Fix memory calculations of idf_size.py 2021-09-01 16:36:48 +02:00
Shu Chen
706a17bdf1 openthread: enable ot_cli on esp32h2 2021-09-01 16:36:47 +02:00
Michael (XIAO Xufeng)
95c572c0d2 Merge branch 'bugfix/fix_uart_reset_issue_on_esp32c3_backport_v4.3' into 'release/v4.3'
bugfix(uart): reset uart0 core before uart apb reset(backport v4.3)

See merge request espressif/esp-idf!14462
2021-07-30 06:27:22 +00:00
Martin Vychodil
e9dc39730f System/memprot: ESP32C3 IRAM section alignment fix (LD)
IRAM section didn't contain sufficient padding for possible CPU instruction prefetch,
ie instruction fetch could happen in DRAM section which is prohibited by the Memprot module.
This is fixed by adding 16B to the end of IRAM section in LD script (C3 CPU prefetch buffer depth is 4 words)

Closes IDF-3554
2021-07-25 12:39:48 +02:00
Wangjialin
427fe1bcde uart: fix esp32c3 uart output garbage value after resetting 2021-07-21 15:31:50 +08:00
bizhuangyang
835d1b0bac bugfix:rotary encoder example isr service install
Fix the issue mentioned when using two or more encoders. Modify PCNT_CTRL_GND_IO
to avoid the affect of USB JTAG(origin pin 19 is used for USB D-). Update esp32c3.
peripherals.ld and docs for esp32s3.

Closes https://github.com/espressif/esp-idf/issues/6889
2021-07-14 10:13:21 +08:00
Zhang Jun Hao
5e600d5b31 esp_wifi: move unused WiFi log to noload section to save binary size 2021-07-01 14:11:38 +08:00
Angus Gratton
362c9234dc Merge branch 'bugfix/fix_ld_relinking_on_modification_v4.3' into 'release/v4.3'
build: fix linker scripts edition not triggering a rebuild (backport v4.3)

See merge request espressif/esp-idf!13450
2021-06-22 00:29:11 +00:00
Angus Gratton
9f6e09d0d3 Merge branch 'bugfix/flash_rodata_any_alignement_v4.3' into 'release/v4.3'
build: Fix cache issue and add dedicated section for (Custom) App version info (backport v4.3)

See merge request espressif/esp-idf!13448
2021-06-22 00:23:49 +00:00
Marius Vikhammer
8efb2bb1ed ci: run Example_GENERIC for C3
Add support for running example_GENERIC tests for C3 on label.

Fix examples that fail.
2021-05-20 14:32:47 +10:00
KonstantinKondrashov
c270a9f0b9 esp32c3: Updates a description in Kconfig about Universal MAC Address strategy 2021-05-20 04:30:31 +00:00
Omar Chebib
831d470a75 build: fix linker scripts edition not triggering a rebuild
Fix the dependencies in CMakeLists files for triggering a relink
when linker script file is modified.
2021-05-06 12:19:01 +08:00
Ivan Grokhotkov
b7707c54ce freertos: fix TLS run-time address calculation
Since dd849ffc, _rodata_start label has been moved to a different
linker output section from where the TLS templates (.tdata, .tbss)
are located. Since link-time addresses of thread-local variables are
calculated relative to the section start address, this resulted in
incorrect calculation of THREADPTR/$tp registers.

Fix by introducing new linker label, _flash_rodata_start, which points
to the .flash.rodata output section where TLS variables are located,
and use it when calculating THREADPTR/$tp.

Also remove the hardcoded rodata section alignment for Xtensa targets.
Alignment of rodata can be affected by the user application, which is
the issue dd849ffc was fixing. To accommodate any possible alignment,
save it in a linker label (_flash_rodata_align) and then use when
calculating THREADPTR. Note that this is not required on RISC-V, since
this target doesn't use TPOFF.
2021-05-06 11:42:14 +08:00
Omar Chebib
375f969d43 build: (Custom) App version info is now on a dedicated section, independent of the rodata alignment
It is now possible to have any alignment restriction on rodata in the user
applicaiton. It will not affect the first section which must be aligned
on a 16-byte bound.

Closes https://github.com/espressif/esp-idf/issues/6719
2021-05-06 11:40:57 +08:00
Omar Chebib
c29dbda5fd build: fix cache issue when .flash.text section alignment is uncommon
rodata dummy section has now the same alignment as flash text section,
and at least the same size. For these reasons, the cache will map
correctly the following rodata section.
2021-05-06 11:40:47 +08:00
Michael (XIAO Xufeng)
2bffeb7265 uart: fix misleading files for UART2
Includes: header files, ld files and clk.c

ESP32-C3 only have UART0 and UART1.
2021-04-29 14:23:13 +08:00
ChenJianxing
a17b57b062 fix esp32c3 default mac addr count 2021-04-20 02:38:31 +00:00
Angus Gratton
da47503c14 Merge branch 'bugfix/deep_sleep_skip_verify_rtc_mem_heap_v4.3' into 'release/v4.3'
Fix bootloader "skip validate on exiting deep sleep" option if "use RTC memory as heap" is enabled (v4.3)

See merge request espressif/esp-idf!13096
2021-04-12 08:18:21 +00:00
Martin Vychodil
6dfff2fdbd esp32c3: memprot API upgrade and test application
Closes IDF-2641
2021-04-12 10:21:58 +10:00
Angus Gratton
2ed3e8b344 Merge branch 'bugfix/prefetch_invalid_v4.3' into 'release/v4.3'
soc: add dummy bytes to ensure instr prefetch always valid (v4.3)

See merge request espressif/esp-idf!12993
2021-04-09 14:49:07 +00:00
Angus Gratton
17e30c9e89 esp32c3: Reserve RTC memory from bootloader in the app linker script 2021-04-09 19:15:43 +10:00
KonstantinKondrashov
54908d3a42 esp32c3: Default supported ESP32-C3 Revision ECO3 2021-04-08 15:09:14 +08:00
Marius Vikhammer
5036ec363b soc: add dummy bytes to ensure instr prefetch always valid
The CPU might prefetch instructions, which means it in some cases
will try to fetch instruction located after the last instruction in
flash.text.

Add dummy bytes to ensure fetching these wont result in an error,
 e.g. MMU exceptions
2021-04-01 10:23:44 +08:00
Jiang Jiang Jian
1af5bc2f7d Merge branch 'bugfix/esp32c3_light_sleep_gpio_reset_issue_v4.3' into 'release/v4.3'
backport v4.3: add software workaround for esp32c3 gpio reset issue

See merge request espressif/esp-idf!12751
2021-03-31 03:12:09 +00:00
alex.li
9e97133481 Support new section addr and wifi lib for ESP32C3-ECO3. 2021-03-30 16:05:13 +08:00
Li Shuai
be56456add light sleep: add software workaround for esp32c3 gpio reset issue 2021-03-29 15:06:23 +08:00
Angus Gratton
67a1858bb1 esp32c3: Add support for building image with a minimum target revision 2021-03-26 18:29:53 +08:00
Marius Vikhammer
1c8fd4041e aes/sha: use a shared lazy allocated GDMA channel for AES and SHA
Removed the old dynamically allocated GDMA channel approach.
It proved too unreliable as we couldn't not ensure consumers of the mbedtls
would properly free the channels after use.

Replaced by a single shared GDMA channel for AES and SHA, which won't be
released unless user specifically calls API for releasing it.
2021-03-10 09:40:35 +08:00
Marius Vikhammer
c6ed522d60 deep_sleep: on S2 disable the brown out detector before deep sleeping
On S2 the brown out detector would occasionally trigger erroneously during deep sleep.

Disable it before sleeping to circumvent this issue.

Closes https://github.com/espressif/esp-idf/issues/6179
2021-02-25 10:53:06 +08:00
Angus Gratton
018d7c2551 Merge branch 'feature/add_pkg_and_revision_for_c3' into 'master'
efuse(esp32c3): Adds getting chip_revision and chip_pkg

See merge request espressif/esp-idf!12060
2021-02-04 16:04:36 +08:00
Ivan Grokhotkov
9a20283485 Merge branch 'bugfix/scan_test_missing_build_apps_without_tests' into 'master'
ci: bugfix: scan_test missing build apps without tests

See merge request espressif/esp-idf!12138
2021-01-28 17:48:24 +08:00
Martin Vychodil
69096ddce5 Security: ESP32C3 memory protection feature (IRAM0/DRAM0)
Software support for PMS module.
Allows controlled memory access to IRAM (R/W/X) and DRAM0 (R/W)
On/locked by default, configurable in Kconfig (esp_system)

Closes https://jira.espressif.com:8443/browse/IDF-2092
2021-01-27 08:44:03 +01:00
Fu Hanxi
e4e375f488 fix: add spi_flash.h for s2, s3, c3 targets in cpu_start.c
update s2, s3, c3 ld files spi_flash_attach to esp_rom_spiflash_attach
2021-01-27 12:35:49 +08:00
KonstantinKondrashov
3ed226c362 efuse(esp32c3): Adds getting chip_revision and chip_pkg 2021-01-25 19:37:40 +08:00
Armando
402ccacc10 system: update edma reset in system_api_esp32c3/s3.c 2021-01-25 04:51:40 +00:00
Michael (XIAO Xufeng)
d7d1dee208 system: reset dma when soft reset 2021-01-25 04:51:40 +00:00
Aditya Patwardhan
79c23a1886 esp32c3/Digital Signature: mbedtls integration through ESP-TLS 2021-01-22 11:54:16 +05:30
Li Shuai
f57ab2d69b add brownout reset option prompt to menuconfig 2021-01-21 10:03:32 +08:00
Angus Gratton
55970fe3a2 Merge branch 'feature/esp32c3_support_brownout' into 'master'
esp32c3: Adds support BROWNOUT reset

Closes IDF-2397

See merge request espressif/esp-idf!11910
2021-01-20 12:19:56 +08:00
KonstantinKondrashov
d81a93ae4c esp32c3: Adds support BROWNOUT reset 2021-01-18 15:38:09 +08:00
ninh
659d805411 esp_wifi: light sleep optimization 2021-01-18 15:31:03 +08:00
Jiang Jiang Jian
8b33695495 Merge branch 'feature/support_esp32c3_s3_ble_5.0_and_bug_fix' into 'master'
Feature/support esp32c3 s3 ble 5.0 and bug fix

See merge request espressif/esp-idf!12007
2021-01-17 17:06:12 +08:00
zwj
7c1c669799 component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
Marius Vikhammer
0713e93b8f TWAI: bringup for S3 and C3 2021-01-14 20:30:31 +08:00