esp-idf/tools
Darian Leung a202ec2caf newlib: Add workaround for printf functions using 32-bit time_t on first call
sizeof(time_t) was previously switched from 4 to 8, ROM functions that use
time_t or dependent types (such as "struct stat") are no longer called due as
they still treat sizeof(time_t) as 4 (see commit
24c20d18).

However, there is a ROM callpath that was left out. If putchar is the first
stdio print related call, the call path will result in cantwrite() ->
__swsetup_r() -> __smakebuf_r() -> __swhatbuf_r() using the ROM "struct stat"
(where sizeof(time_t)==4).

Instead of removing all printf related ROM newlib functions (which will result
in increased binary size), this commit adds a workaround to setup the stdio
files before any print related calls occur.

This results in cantwrite() always returning false, thus the callpath described
above never being reached.

Closes https://github.com/espressif/esp-idf/issues/9269
2022-08-22 11:28:55 +08:00
..
ble feat: add requirements.ttfw.txt 2022-08-01 15:52:21 +08:00
catch Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
ci newlib: Add workaround for printf functions using 32-bit time_t on first call 2022-08-22 11:28:55 +08:00
cmake build system: remove -Wno-format global option 2022-08-03 16:42:47 +04:00
docker Tools: Disable Python constraint files with environment variable 2022-07-14 11:25:29 +02:00
esp_app_trace idf.py: Change copyright in tools dir 2022-05-24 14:01:50 +02:00
esp_prov docs: improve the installation instructions 2022-08-01 15:52:21 +08:00
gen_soc_caps_kconfig build-system: include soc_caps defines into kconfig 2021-12-06 12:37:07 +08:00
idf_monitor_base idf.py: Add automated hints on how to resolve errors 2022-07-04 08:15:23 +00:00
idf_py_actions tools: add hint for using esp-cryptoauthlib from manager 2022-08-18 20:15:19 +05:30
idf_size_yaml tools: update esp32c2_data_info_yaml 2022-02-15 15:14:42 +08:00
kconfig_new Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
ldgen Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
mass_mfg tools: Introduce support for blank lines in config and value files for mfg utility 2022-07-08 13:22:35 +00:00
mocks spi_flash: Remove legacy spi_flash drivers 2022-07-01 11:01:34 +08:00
requirements feat: add requirements.ttfw.txt 2022-08-01 15:52:21 +08:00
templates/sample_component add new command to idf 2020-09-21 23:38:52 +02:00
test_apps Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
test_idf_monitor core_dump: split corefile and coredump script from idf into a separate package 2022-03-24 13:57:48 +08:00
test_idf_py Tools: Export selected target actions 2022-07-19 20:02:55 +02:00
test_idf_size mdns: Remove internal component, examples, test and docs 2022-06-29 17:30:34 +04:00
test_idf_tools Tools: --disable-* argument for removing features 2022-06-30 12:31:59 +02:00
test_mkdfu mkdfu.py: Support setting flash parameters 2022-05-27 15:44:56 +02:00
test_mkuf2 idf.py: Change copyright in tools dir 2022-05-24 14:01:50 +02:00
unit-test-app kconfig: refactor xtal freq kconfig to common configuration item 2022-08-08 13:53:02 +08:00
check_python_dependencies.py Tools: Improve the message for missing setuptools in the Python checker 2022-07-18 11:56:32 +02:00
check_term.py check_term: allow alacritty term 2022-05-19 11:10:59 +08:00
detect_python.fish Tools: Use default value in the Python detections scripts 2022-03-11 11:00:31 +01:00
detect_python.sh Tools: Use default value in the Python detections scripts 2022-03-11 11:00:31 +01:00
eclipse-code-style.xml tools: add code formatter rules for Eclipse 2016-11-03 18:41:00 +08:00
format-minimal.sh global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs 2020-04-03 01:10:02 +02:00
format.sh global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs 2020-04-03 01:10:02 +02:00
gdb_panic_server.py newlib: ROM library is build with time_t 64bit on esp32c2 2022-06-09 10:48:31 +08:00
gen_esp_err_to_name.py Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
generate_debug_prefix_map.py build: create BUILD_DIR/prefix_map_gdbinit when enable reproducible build 2021-10-26 10:55:00 +08:00
idf_monitor.py Tools: fix a crash in idf_monitor.py 2022-07-18 21:34:18 -07:00
idf_size.py tools: GCC 11 uses both '.debug_line_str' and '.debug_str' sections 2022-05-27 15:06:56 +07:00
idf_tools.py Merge branch 'fix/flake8_v5_warnings_v5.0' into 'release/v5.0' 2022-08-14 02:51:36 +08:00
idf.py Tools: Detect missing component manager and print proper error message 2022-08-12 11:00:34 +02:00
install_util.py Tools: --disable-* argument for removing features 2022-06-30 12:31:59 +02:00
mkdfu.py mkdfu.py: Support setting flash parameters 2022-05-27 15:44:56 +02:00
mkuf2.py Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
python_version_checker.py Tools: Fix silent failure about the incompatible Python 2022-02-16 18:44:13 +01:00
requirements_schema.json Tools: Make easier the detection of the list of Python features 2022-02-03 19:02:14 +01:00
requirements.json feat: add requirements.ttfw.txt 2022-08-01 15:52:21 +08:00
set-submodules-to-github.sh global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs 2020-04-03 01:10:02 +02:00
split_paths_by_spaces.py tools: fixup version references related to paths with spaces 2022-05-02 19:05:47 +02:00
toolchain_versions.mk tools: update toolchain version to 'esp-2022r1-11.2.0' 2022-08-17 11:54:45 +02:00
tools_schema.json tools: add distro links for macos-arm64 2022-04-15 13:37:27 +02:00
tools.json tools: update toolchain version to 'esp-2022r1-11.2.0' 2022-08-17 11:54:45 +02:00