Why make -j8 flash rebuilds the project?
Posted: Tue May 14, 2019 9:31 pm
Is there a switch for just flash without rebuilding the whole project?
I am using Eclipse.
Thanks
Paul
I am using Eclipse.
Thanks
Paul
Here's an example using msys32 command line...bonmotwang wrote: ↑Tue May 14, 2019 9:31 pmIs there a switch for just flash without rebuilding the whole project?
I am using Eclipse.
Thanks
Paul
It has to do this because there's no way for Make to know what you changed. For example, if the change added a compiler flag to CFLAGS for every source file compilation then it needs to rebuild every source file to get the correct build output. The exact change can be subtle, so we rebuild the whole project if any top-level makefile changes.
To expand on this answer, if you do a normal "make" build then the correct esptool.py flashing command is printed as the last output of the build. Running make and then running this command is the same as running "make flash".fly135 wrote: ↑Wed May 15, 2019 3:25 pmHere's an example using msys32 command line...bonmotwang wrote: ↑Tue May 14, 2019 9:31 pmIs there a switch for just flash without rebuilding the whole project?
I am using Eclipse.
Thanks
Paul
$IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 --port "COM3" --baud 921600 --before "default_reset" --after "hard_reset" write_flash -z --flash_mode "dio" --flash_freq "40m" --flash_size detect 0x1000 ./build/bootloader/bootloader.bin 0x10000 ./build/<application name>.bin 0x8000 ./build/<partition file name>.bin
Ok, but this behavior stopped me from being able to autoincrement the build version on each build. Is there a way of doing this without rebuilding everything?ESP_Angus wrote: ↑Thu May 16, 2019 3:23 amIt has to do this because there's no way for Make to know what you changed. For example, if the change added a compiler flag to CFLAGS for every source file compilation then it needs to rebuild every source file to get the correct build output. The exact change can be subtle, so we rebuild the whole project if any top-level makefile changes.
Probably... put something like this in your Makefilegunar.kroeger wrote: ↑Thu May 16, 2019 5:40 pmOk, but this behavior stopped me from being able to autoincrement the build version on each build. Is there a way of doing this without rebuilding everything?
Code: Select all
ifndef MAKE_RESTARTS
_IGNORE := $(shell ./increment_build_number.sh)
endif