AnsweredAssumed Answered

CubeMx and custom code in Makefile

Question asked by Krix N on Sep 29, 2017
Latest reply on Sep 29, 2017 by waclawek.jan

Using CubeMx with automatic Makefile generation.

I want to alter the build target name.

Example:

CubeMx creates a build target in the Makefile:

TARGET = myfirmware

But I want to append a version:

TARGET = myfirmware_$(FW_VERSION)

However my custom change is overwritten each time CubeMx auto generates a new makefile.

Does anyone know how to work around this?

I have not found documentation on how to protect parts of the Makefile from updating.

Outcomes