Commit Graph

19183 Commits

Author SHA1 Message Date
chenjianhua
25394b6ac4 update bt-lib for ESP32
fix ble disconnect due to channel map update instant passed
2023-02-28 09:11:40 +00:00
Jiang Jiang Jian
d4253e703f Merge branch 'fix/heap-iram-to-flash-call' into 'release/v4.3'
heap: Fix call to substract_poison_overhead() in IRAM function

See merge request espressif/esp-idf!22525
2023-02-28 17:10:57 +08:00
Guillaume Souchere
7e6f20218b heap: Fix call to substract_poison_overhead() in IRAM function
When release sdkconfig is set, substract_poison_overhead() is not inlined
and called from IRAM in multi_heap_get_allocated_size(). By wlways inlining
substract_poison_overhead(), we assure that this problem will not happen.
2023-02-27 06:57:36 +01:00
Jiang Jiang Jian
e214989c58 Merge branch 'docs/fix_errors_in_esp32-c3-devkitm-1_pin_list_v4.3' into 'release/v4.3'
Docs/Fix Errors in ESP32-C3-DevKitM-1 Pin List (v4.3)

See merge request espressif/esp-idf!22496
2023-02-26 15:53:02 +08:00
Jiang Jiang Jian
ba4b47d24e Merge branch 'bugfix/secure_boot_v2_part_size_check_make_build' into 'release/v4.3'
partition_table: update make build for new "--secure [v1/v2]" argument

See merge request espressif/esp-idf!22437
2023-02-26 15:52:11 +08:00
Jiang Jiang Jian
1f739d7185 Merge branch 'bugfix/blufi_notify_v4.3' into 'release/v4.3'
BluFi : Fixed hdr getting free twice (v4.3)

See merge request espressif/esp-idf!22450
2023-02-26 15:51:54 +08:00
Jiang Jiang Jian
690b971f99 Merge branch 'feature/tlsf-dynamic-control-size_v4.3' into 'release/v4.3'
heap: Update tlsf to use dynamic metadata size and lower RAM usage of heap component (backport v4.3)

See merge request espressif/esp-idf!21783
2023-02-26 15:51:45 +08:00
Jiang Jiang Jian
043958e39f Merge branch 'bugfix/fix_gpio_wakeup_related_issues_in_ssc_sleep_test_backport_v4.3' into 'release/v4.3'
sleep: fix gpio wakeup related issues(backport v4.3)

See merge request espressif/esp-idf!22334
2023-02-26 15:51:29 +08:00
Jiang Jiang Jian
6f5e6b3841 Merge branch 'feature/add_bootloader_sector_pad_option_v4.3' into 'release/v4.3'
esptool_py: Added a --pad-to-size flag to align the bootloader image (v4.3)

See merge request espressif/esp-idf!22328
2023-02-26 15:51:09 +08:00
Jiang Jiang Jian
24aa00d99d Merge branch 'fix/heap-get-allocated-size_v4.3' into 'release/v4.3'
heap: Fix erroneous value returned by heap_caps_get_allocated_size() when poisoning is enabled (backport v4.3)

See merge request espressif/esp-idf!22190
2023-02-26 15:50:54 +08:00
Jiang Jiang Jian
3a4755e547 Merge branch 'bugfix/build_err_with_ssr_enabled_v4.3' into 'release/v4.3'
bt: Fixed build errors when sniff subrating is enabled (v4.3)

See merge request espressif/esp-idf!22352
2023-02-26 15:50:11 +08:00
Jiang Jiang Jian
fcf33944cd Merge branch 'bugfix/clear_pmk_cache_for_missing_reason_codes_v4.3' into 'release/v4.3'
Fix missing disconnected callback (Backport v4.3)

See merge request espressif/esp-idf!22518
2023-02-26 15:49:59 +08:00
Shyamal Khachane
179fc63526 esp_wifi: Fix missing disconnected callback 2023-02-24 18:44:28 +05:30
Wang Ning
470b7e0ad0 docs/fix_errors_in_esp32-c3-devkitm-1_pin_list 2023-02-23 15:19:27 +08:00
Guillaume Souchere
a82cf0b00c heap: Fix erroneous value returned by heap_caps_get_allocated_size() when poisoning is enabled
When light (or comprehensive) poisoning is enabled, the size requested by the user for allocation
is extended by a few bytes to store the canary header and footer. heap_caps_get_allocated_size() should
return the original size asked by the user (without the additional canary bytes).

test_malloc.c extended with a new test assuring that  heap_caps_get_allocated_size() returns the proper size
regardless of the degree of poisoning.
2023-02-22 10:45:00 +00:00
isha.pardikar@espressif.com
9c0ad412ed BluFi : Fixed hdr getting free twice
Closes IDFGH-9378
2023-02-21 11:47:39 +05:30
Mahavir Jain
62e58ba624
partition_table: fix make build for new "--secure [v1/v2]" argument 2023-02-20 17:05:35 +05:30
Guillaume Souchere
73fca2c851 esp_system: fix placement of __stack_chk_fail from flash to RAM
When stack check is enabled, certain functions (sometimes placed in RAM)
are being decorated with stack guards and a call to __stask_chk_fail() in
case ofr stack corruption. For this reason, __stack_chk_fail() must be
placed in RAM too.

Add stack check config in heap tests on all targets to find eventual flash to RAM
calls due to stack checks when running callgraph_check.py
2023-02-16 08:48:00 +00:00
Guillaume Souchere
dbc4572814 heap: fix linker issues and remove spi flash dependencies 2023-02-16 08:48:00 +00:00
Guillaume Souchere
9b51759e8f feat: remove tlsf_fls and tlsf_ffs from linker as they are inlined. 2023-02-16 08:48:00 +00:00
Guillaume Souchere
f5e3585a9c tools: update list of references to not include symbold used by __assert_func calls
On xtensa architecture, the call to __assert_func uses a reference to __func__ that can
sometimes be placed in flash. Since the __asert_func can be called from functions in IRAM
the check_callgraph script can report an error when checking for invalid calls from IRAM
to flash sections. However, the __asert_func prevents this scenario at runtime so the
check_callgraph script reports a 'flas positive' situation. For this reasson, all references
to __func__$x found prior to a call to __assert_func are droped in the parsing of the rtl files.
2023-02-16 08:48:00 +00:00
Guillaume Souchere
598e77e287 heap: add check for usage of flash content from iram
this commits:
- adds build-time test to check that no call to flash regions are done from IRAM functions

- resolves problems related to IRAM function using content in flash memory

- update heap_caps_alloc_failed to use a default function name in DRAM
  when necessary instead of creating a function name variable in DRAM for
  each call of heap_caps_alloc_failed. This allows to save some extra bytes
  in RAM.
2023-02-16 08:48:00 +00:00
Guillaume Souchere
5f735a22ec heap: add documentation about the function placement in IRAM and its usage in ISR
This commits adds a internal.md file in the heap directory to clarify the idea behind
which functions is placed in IRAM or in flash.

A section in mem_alloc.rst documentation is added to specify which functions from the
heap component API can be used in interrupt handlers.
2023-02-16 08:48:00 +00:00
Guillaume Souchere
8700bdc156 heap: add selective placement of function in IRAM
This commit aims to place in the IRAM section only the functions that
are relevent for performance instead of placing the entire content of
multi_heap.c, mullti_heap_poisoning.c and tlsf.c in the IRAM.
2023-02-16 08:48:00 +00:00
Guillaume Souchere
7ce0620d32 heap: Update host tests after incorporation of the new TLSF implementation 2023-02-16 08:48:00 +00:00
Guillaume Souchere
48b0000e22 heap: update the calculation of fl index max and use bitfield in control_t
The calculation of fl index max is changed to always be the smallest
number that includes the size of the registered memory.

The control_construct() function now checks for minimum size as the control structure
parameters are calculated.

There is no longer a minimum configuration for fl index max so the tlsf_config
enum is striped down to remove unecessary compile time values.

the tlsf_size() function will fail if no tlsf pointer is passed as parameter since there
is no way to calculate a default tlsf size anymore.

bitfields are now used in control_t when possible which reduces the size of the structure
from 56 bytes to 36 bytes.
2023-02-16 08:48:00 +00:00
Guillaume Souchere
9f6b549dea Revert "tlsf control's structure should remain opaque"
This reverts commit 7010314c4a.
2023-02-16 08:48:00 +00:00
Philippe
6a3f3e9421 add host test with multiple heap size 2023-02-16 08:48:00 +00:00
Philippe
30bd908f97 clarify parameter usage in tslf_create 2023-02-16 08:48:00 +00:00
Philippe
a7b9e7a8bd tlsf control's structure should remain opaque 2023-02-16 08:48:00 +00:00
Philippe
e45d350b97 dynamic control block per heap 2023-02-16 08:48:00 +00:00
harshal.patil
4e77c32afc esptool_py: Added a sector-pad option for bootloader image
When SECURE BOOT V2 is enabled and CONFIG_SECURE_BOOT_SIGNED_BINARIES
is not set, sector-pad the bootloader image, which is required for an
external PKCS#11 interface to generate a signature.

esptool_py: Update submodule to release/v3 (4bc311767b7c6df41def6f95a50f87b1c9406cbd)
2023-02-15 16:10:31 +05:30
jingli
805db259b7 sleep: fix gpio wakeup not working properly in some cases
Before this fix, when we call esp_pm_configure after gpio_wakeup_enable,
the configuration of GPIO in sleep state in gpio_wakeup_enable will be
overwritten by esp_pm_configure.
2023-02-13 19:54:17 +08:00
jingli
f556ac1b92 soc_caps: remove SOC_GPIO_SUPPORT_SLP_SWITCH
all esp chips support this feature
2023-02-13 19:54:11 +08:00
Jin Cheng
7fc5d19730 Fixed build errors when sniff subrating is enabled. 2023-02-13 17:28:15 +08:00
Jiang Jiang Jian
ea8de4ddca Merge branch 'feature/efuse_rev_major_minor_v4.3' into 'release/v4.3'
efuse: Adds major and minor versions (v4.3)

See merge request espressif/esp-idf!19544
2023-02-11 20:01:59 +08:00
Michael (XIAO Xufeng)
3e269ffc0d esp32s3: fixed bug chip v0.0 detected as vX.Y
A typical value is 2.8.

Previous commit 32ef2b321a doesn't fix the issue cleanly. The MSB of wafer_minor also has this problem.
2023-02-11 08:06:49 +00:00
Michael (XIAO Xufeng)
611339564d esp32s3: fixed bug chip v0.0 detected as vX.0
A typical value is 2.0.
2023-02-11 08:06:49 +00:00
KonstantinKondrashov
3dcdcc08eb efuse: Adds major and minor versions and others 2023-02-11 08:06:49 +00:00
Jiang Jiang Jian
ab6735155a Merge branch 'bugfix/newlib_tz_env_mutex_v4.3' into 'release/v4.3'
newlib: Use correct recursive mutex for env and regular mutex for tz (v4.3)

See merge request espressif/esp-idf!22295
2023-02-11 12:32:55 +08:00
Jiang Jiang Jian
9ee1cda5e3 Merge branch 'bugfix/fatfs_mtime_dst_v4.3' into 'release/v4.3'
fatfs: fix incorrect mtime returned for files created during DST (v4.3)

See merge request espressif/esp-idf!18459
2023-02-11 09:01:31 +08:00
Jiang Jiang Jian
97454c017f Merge branch 'bugfix/fix_some_wifi_bugs_230209_v4.3' into 'release/v4.3'
esp_wifi: fix some wifi bugs(Backport v4.3)

See merge request espressif/esp-idf!22290
2023-02-11 03:10:08 +08:00
Jiang Jiang Jian
3250b88828 Merge branch 'optimization/lwip_dhcp_coarse_timer_4.3' into 'release/v4.3'
lwip:optimization dhcp coarse timer for 4.3

See merge request espressif/esp-idf!22287
2023-02-11 02:31:30 +08:00
Jiang Jiang Jian
3dc1ab532e Merge branch 'bugfix/secure_boot_v2_part_size_check_v4.3' into 'release/v4.3'
gen_esp32part: allow secure boot v2 based app partition size 4K aligned (v4.3)

See merge request espressif/esp-idf!22288
2023-02-10 19:24:46 +08:00
Jiang Jiang Jian
3d366e1959 Merge branch 'bugfix/rtc_8md256_deepsleep_time_esp32_v4.3' into 'release/v4.3'
pm: Fixed sleep time inaccurate bug when select 8MD256 as rtc slow clock on ESP32 (v4.3)

See merge request espressif/esp-idf!21823
2023-02-10 19:12:25 +08:00
morris
00746db03c Merge branch 'bugfix/no_more_public_adc2_dma_on_c3_s3_v4.3' into 'release/v4.3'
adc: no longer support adc2 continuous mode on esp32c3 (v4.3)

See merge request espressif/esp-idf!21650
2023-02-10 03:55:58 +08:00
cje
d8fc054115 sleep: fix sleep time inaccurate bug when select 8MD256 as rtc slow clock on ESP32
Related to: https://github.com/espressif/esp-idf/issues/6687
2023-02-10 01:36:40 +08:00
Ivan Grokhotkov
d7db6c3148 fatfs: fix incorrect mtime returned for files created during DST
mktime function uses tm_isdst member as an indicator whether the time
stamp is expected to be in daylight saving time (1) or not (0).
FAT filesystem uses local time as mtime, so no information about DST
is available from the filesystem.

According to mktime documentation, tm_isdst can be set to -1, in which
case the C library will try to determine if DST was or wasn't in
effect at that time, and will set UTC time accordingly.

Note that the conversion from UTC to local time and then back to UTC
(time_t -> localtime_r -> FAT timestamp -> mktime -> time_t) does not
always recover the same UTC time. In particular, the local time in the
hour before DST comes into effect can be interpreted as "before DST"
or "after DST", which would correspond to different UTC values. In
this case which option the C library chooses is undefined.

Closes https://github.com/espressif/esp-idf/issues/9039
Originally reported in https://github.com/espressif/arduino-esp32/issues/6786
2023-02-09 11:28:29 +00:00
xueyunfei
b5e8c68b59 lwip:optimization dhcp coarse timer 2023-02-09 19:28:28 +08:00
Steve Jothen
98c2470040 Use correct recursive mutex for env and regular mutex for tz 2023-02-09 16:04:47 +08:00