Page 1 of 1

Post build step in IDF v3.2 using make

Posted: Mon Feb 03, 2020 5:12 pm
by wacbrayk
I'm looking to add a post build step to my build process. My project is using v3.2.2 and I'm building with make on Windows. I've found this post viewtopic.php?t=11528, which references how to do this using CMake. That doesn't quite apply in my case since I'm building with make, but I'm hopeful there is a way to do something similar.

Re: Post build step in IDF v3.2 using make

Posted: Mon Feb 10, 2020 3:02 pm
by wacbrayk
I haven't been able to figure this out yet, and am hopeful someone can provide some assistance.

Re: Post build step in IDF v3.2 using make

Posted: Mon Feb 10, 2020 11:29 pm
by ESP_Angus
Hi wacbrayk,

make doesn't have a concept that maps exactly to a post-build step.

Probably the easiest thing to do is to add a totally new target in your Makefile that depends on "all", and then run "make mytarget" instead of "make all". If you declare the target name before including project.mk then it can become the default target, so it also runs for "make" with no target name.

Code: Select all

PROJECT_NAME := my-project

mytarget:

include $(IDF_PATH)/make/project.mk

mytarget: all
	echo "post build step"
If you need something more subtle than this, can you please explain exactly what part of the build you need to post-process? There might be some more specific way to hook into a particular build step.

Angus