This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to modify the auto generated Makefile in ARM DS?

I am trying to figure out how to modify the contents of the auto generated Makefile in ARM DS. Currently it deletes all .o, .d, and .axf files.

My linker creates some .txt files and a binary and I have a post-build command that produces an image file. I want to force the make clean to also include the linker outputs and the application image. Is the auto-generated makefile modifiable so that I can add those files to the clean function or do I need to write a script that does this?

Parents
  • Hi

    My name is Stephen and I work at Arm.

    The auto-generated makefiles are not directly modifiable by the user, but only indirectly when changing options via the GUI.

    I'm not aware of any way to force the auto-generated makefiles to clean away artifacts created from a post-build step.

    To clean away artifacts created from a post-build step, some options for you are to:
    1) add a pre-build step to delete them, or
    2) change the default build command (in Properties > C/C++ Build) so that instead of invoking make, it calls a script that first deletes them and then calls make, or
    3) write a hand-crafted makefile that does what you need, then change your project to be a makefile-builder project (to use the hand-crafted makefile) rather than a managed-builder project (which auto-generates its own makefiles).  There are plenty of examples of hand-crafted makefiles in the supplied Arm DS examples.

    Hope this helps

    Stephen

Reply
  • Hi

    My name is Stephen and I work at Arm.

    The auto-generated makefiles are not directly modifiable by the user, but only indirectly when changing options via the GUI.

    I'm not aware of any way to force the auto-generated makefiles to clean away artifacts created from a post-build step.

    To clean away artifacts created from a post-build step, some options for you are to:
    1) add a pre-build step to delete them, or
    2) change the default build command (in Properties > C/C++ Build) so that instead of invoking make, it calls a script that first deletes them and then calls make, or
    3) write a hand-crafted makefile that does what you need, then change your project to be a makefile-builder project (to use the hand-crafted makefile) rather than a managed-builder project (which auto-generates its own makefiles).  There are plenty of examples of hand-crafted makefiles in the supplied Arm DS examples.

    Hope this helps

    Stephen

Children