With MINIMAL_BUILD enabled, menuconfig will only display configuration
options for components included in the build through main component
dependencies. This means that configuration options for excluded
components will not appear in menuconfig. This might be confusing, as
most examples currently do not use a trimmed build, and all components
detected by the build system are available in menuconfig, even if their
configuration has no effect because the components may not be linked or
used. Adding a note in the components menu of menuconfig could help
users realize they need to add a component to the main component
requirements to see its configuration options. Unfortunately, Kconfig
does not support multiline comments, so there are three separate
comments intended to adequately describe the potentially missing
component configurations.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
The test_build_cmake_library_psram_workaround verifies that the
mfix-esp32-psram-cache-issue flag is applied to all compile commands in
compile_commands.json when CONFIG_SPIRAM_CACHE_WORKAROUND=y. Although
the import_lib does not need the esp_psram component, this test does. To
avoid adding the esp_psram dependency to the import_lib, disable
MINIMAL_BUILD for this test by explicitly setting the COMPONENTS
variable.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
The check_public_headers.py script does not function well with
MINIMAL_BUILD enabled, as some headers from excluded components may be
missing. While it might be possible to address this issue with
exclusions, it is likely more effective and provides more coverage to
include all components, not just those required by the blink example.
Therefore, MINIMAL_BUILD has been disabled for this test, ensuring that
all registered components are included in the build. If defined, the
COMPONENTS variable takes precedence over the MINIMAL_BUILD property, so
setting "-DCOMPONENTS=" overrides the MINIMAL_BUILD property.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Currently, several example dependencies rely on the fact that all
registered components are added to the build, along with components
specified in common requirements. This results in longer build times
because even unused components must be built. Switch all examples to use
idf_minimal_build to compile only the components actually required by
the example.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Introduce a MINIMAL_BUILD property to streamline the build process by
including only the main component and its direct and indirect
dependencies. This serves as a convenient shortcut for using
set(COMPONENTS main). The MINIMAL_BUILD build property is ignored if the
COMPONENTS variable is defined, as COMPONENTS takes precedence.
To enable a minimal build, add "idf_build_set_property(MINIMAL_BUILD ON)"
to the project's CMake configuration.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Currently, several examples do not explicitly state their component
dependencies, relying instead on the default behavior that includes all
registered components and commonly required ones in the build.
Explicitly adding component dependencies can reduce build time when
set(COMPONENTS main) is used.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
The object files are compiled simultaneously, which can result in
several error messages about missing headers. The current regex used to
find missing headers in the compiler's output employs a greedy search,
potentially capturing multiple error messages from different compilation
units. This can cause bug reports where the original component cannot be
identified. Strengthen the regex to ensure it only processes the first
reported error.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file
allow to pass custom options to "idf.py gdb":
--gdb-commands: command line arguments for gdb. (without changes)
-ex: pass command to gdb.
-x: pass gdbinit file to gdb. Alias for old --gdbinit command
The default newlib read/write syscalls automatically convert newline
endings from LF to CRLF on stdout. Therefore, the test should not
specifically check for LF in the expected output, as the standard
conversion for stdout is CRLF. While it is possible to change the
expected line ending in the test from LF to CRLF, it seems more
dependable to just avoid verifying line endings entirely.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>