Post build step in IDF v3.2 using make

wacbrayk
Posts: 5
Joined: Thu Aug 08, 2019 6:23 pm

Post build step in IDF v3.2 using make

Postby wacbrayk » Mon Feb 03, 2020 5:12 pm

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.

wacbrayk
Posts: 5
Joined: Thu Aug 08, 2019 6:23 pm

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

Postby wacbrayk » Mon Feb 10, 2020 3:02 pm

I haven't been able to figure this out yet, and am hopeful someone can provide some assistance.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Mon Feb 10, 2020 11:29 pm

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

Who is online

Users browsing this forum: No registered users and 97 guests