make: Fix COMPONENT_OWNBUILDTARGET

Add build system test to match

Partial fix for https://github.com/espressif/esp-idf/issues/3664
This commit is contained in:
Angus Gratton
2021-08-03 10:40:39 +08:00
committed by Zim Kalinowski
parent 5d82d7c6ee
commit dea52a92b9
5 changed files with 39 additions and 3 deletions
+1 -1
View File
@@ -497,7 +497,7 @@ Fully Overriding The Component Makefile
Obviously, there are cases where all these recipes are insufficient for a certain component, for example when the component is basically a wrapper around another third-party component not originally intended to be compiled under this build system. In that case, it's possible to forego the esp-idf build system entirely by setting COMPONENT_OWNBUILDTARGET and possibly COMPONENT_OWNCLEANTARGET and defining your own targets named ``build`` and ``clean`` in ``component.mk`` target. The build target can do anything as long as it creates $(COMPONENT_LIBRARY) for the project make process to link into the app binary.
(Actually, even this is not strictly necessary - if the COMPONENT_ADD_LDFLAGS variable is overridden then the component can instruct the linker to link other binaries instead.)
It is possible for the component build target to build additional libraries and add these to the linker arguments as well. It's even possible for the default $(COMPONENT_LIBRARY) to be a dummy library, however it's used to track the overall build status so the build target should always create it.
.. note:: When using an external build process with PSRAM, remember to add ``-mfix-esp32-psram-cache-issue`` to the C compiler arguments. See :ref:`CONFIG_SPIRAM_CACHE_WORKAROUND` for details of this flag.