But is make build not also doing the same?ESP-IDF Programming Guide wrote:Compiling your project
make all
… will compile app, bootloader and generate a partition table based on the config.
Difference between make build and make all
Difference between make build and make all
What is the difference between make build and make all?
Re: Difference between make build and make all
Howdy,
Where are you finding "make build" as an exposed target for the Makesystem?
My understanding is that a Makefile can contain many potential targets that are not expected to be invoked directly but are instead used internally as sub-targets. If we run "make help" we see the following:
I would recommend sticking to these targets exclusively. If you find a "make build" documented, then its safe to use. I did a search of the source of the Makefiles and the "make build" target is found in "component_wrapper.mk".
Where are you finding "make build" as an exposed target for the Makesystem?
My understanding is that a Makefile can contain many potential targets that are not expected to be invoked directly but are instead used internally as sub-targets. If we run "make help" we see the following:
Code: Select all
Welcome to Espressif IDF build system. Some useful make targets:
make menuconfig - Configure IDF project
make defconfig - Set defaults for all new configuration options
make all - Build app, bootloader, partition table
make flash - Flash app, bootloader, partition table to a chip
make clean - Remove all build output
make size - Display the static memory footprint of the app
make size-components, size-files - Finer-grained memory footprints
make erase_flash - Erase entire flash contents
make monitor - Run idf_monitor tool to monitor serial output from app
make simple_monitor - Monitor serial output on terminal console
make list-components - List all components in the project
make app - Build just the app
make app-flash - Flash just the app
make app-clean - Clean just the app
See also 'make bootloader', 'make bootloader-flash', 'make bootloader-clean',
'make partition_table', etc, etc
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Difference between make build and make all
Kolban's answer is correct, the documented targets are the ones to use.
You had me really confused about how "make build" exists at all, because even though "build" is a (phony) target in each component's recursively sub-makefile, but you shouldn't be able to run it from the top-level as "make build"
I was very confused by this until I realised that "build" is also the name of the default build output directory, so "make build" is telling the build system to make sure this directory exists. It doesn't build anything else. If you set BUILD_DIR_BASE to some other name and remove the "build" directory, "make build" will start failing!
You had me really confused about how "make build" exists at all, because even though "build" is a (phony) target in each component's recursively sub-makefile, but you shouldn't be able to run it from the top-level as "make build"
I was very confused by this until I realised that "build" is also the name of the default build output directory, so "make build" is telling the build system to make sure this directory exists. It doesn't build anything else. If you set BUILD_DIR_BASE to some other name and remove the "build" directory, "make build" will start failing!
Who is online
Users browsing this forum: Google [Bot] and 48 guests