This adds support for the retargetable locking implementation in
newlib 3. This feature will be enabled in the future toolchain builds.
With the present version of the toolchain, this code doesn't get used.
When _RETARGETABLE_LOCKING gets enabled, newlib locking implementation
will be modified as follows:
- Legacy ESP-specific _lock_xxx functions are preserved. This is done
because ROM copies of newlib in ESP32 and ESP32-S2 rely on these
functions through the function pointer table. Also there is some
code in IDF which still uses these locking functions.
- New __retarget_lock_xxx functions are introduced. Newlib expects
these functions to be provided by the system. These functions work
pretty much the same way as the ESP-specific _lock_xxx functions,
except one major difference: _lock_acquire receives the lock pointer
by value, and as such doesn't support lazy initialization.
- Static locks used by newlib are now explicitly initialized at
startup. Since it is unlikely that these static locks are used at
the same time, all compatible locks are set to point to the same
mutex. This saves a bit of RAM. Note that there are still many locks
not initialized statically, in particular those inside FILE
structures.
Don’t allow the compiler to convert malloc + memset into calloc,
causing a recursive call in _calloc_r. Fixes crash when building with
-O2 optimization level.
Fix warnings where undefined vars are used.
Make Kconfig emit "FOO=" for unset bool options
To ensure make variables are always defined, even if empty.
When writing auto.conf, include symbols disabled by dependency to make sure all make variables are always defined.
Fixesespressif/esp-idf#137
Cherry-picked from https://github.com/espressif/esp-idf/pull/138
For config-only components, component.mk should now contain "COMPONENT_CONFIG_ONLY := 1"
Also refactored some of the generation of linker paths, library list. This required cleaning up the way the bootloader
project works, it's now mostly independent from the parent.
- add two versions of libc: libc.a and libc_nano.a. First one has full C99 formatting support, second one uses “nano” formatting functions available in ROM.
- fix linker error for fmod, fmodf, atof, atoff
- update tests
New makefile component_wrapper.mk allows some variables to be set
before component.mk is evaluated. This properly fixes problems with
sdkconfig being hard to access in all phases of the build.
Including component_common.mk is no longer necessary and will print a
deprecation warning for components which use it.
Reduces number of make invocations, allows variables exported in project
to be seen in all component make processes, not just the main ones.
Also makes a no-op build about 3x faster than it was.
- spaces->tabs in tasks.c
- update vfs_uart.c to use per-UART locks
- add license to vfs_uart.c
- allocate separate streams for stdout, stdin, stderr, so that they can be independently reassigned
- fix build system test failure
Fixes problems with Eclipse trying to build in directories it shouldn't.
This is a breaking change for existing repositories, they need to rename
any component Makefiles to component.mk and rename their references to
$(IDF_PATH)/make/component.mk to $(IDF_PATH)/make/component_common.mk