Menu

#49 setting filename for binary output

Version 1.x
closed
None
5
2014-04-12
2014-04-01
erikS
No

Please give me a hint how to set my own name for the binary output file.
At the moment the "project_name.elf" will be changed into "project_name.bin".
I find no way to change this. So I have manually to rename this file permanently.

Discussion

  • Liviu Ionescu (ilg)

    there is no official way of setting the output file name for a specific build step, all names are derived from the project name.

    but if you explain me the use case that requires such a different name, maybe I can think of some workaround.

     
  • Liviu Ionescu (ilg)

    • status: open --> accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • erikS

    erikS - 2014-04-01

    I need a fix name for the bin "update.bin". This is my final file which I can copy to a SD card and my system will use the file. For this reason it will be nice to have this file after a every new build.

     
  • Liviu Ionescu (ilg)

    a dirty kludge would be to edit the 'Command line pattern' in the 'Cross ARM GNU Create Flash Image', and replace the '${OUTPUT_PREFIX}${OUTPUT}' with 'update.bin'.

     
    • Liviu Ionescu (ilg)

      a cleaner solution would probably be to add a post build step (C/C++ Build -> Settings -> Build Steps -> Post-build steps), where to copy the existing file to update.bin.

      this will also prevent running the 'Create Flash Image' unnecessary, as it happens when modifying the tool output without keeping it in sync with the makefile.

       
  • erikS

    erikS - 2014-04-02

    This is io for me. I will use this solution. Many thanks for your help.

     
  • Liviu Ionescu (ilg)

    ok, good luck!

    is there anything I can do to help you, or we can close this ticket?

     
  • erikS

    erikS - 2014-04-02

    Sometime I get mail which I can read here and some time not. I have not totally understand the system here. Where I should answer mail not here listed? Reply directly?
    Regarding the content of you message: Yes I will try this method with the post build step if it is "cleaner". I have not totally understand what I would be "unnecessary" and what means in sync wiht the makefile.

     
  • Liviu Ionescu (ilg)

    Reply directly?

    no, please use only the web interface to reply

    makefile

    if you look inside the generated makefile, it has a target instructing 'if proj_name.bin does not exist, run the objcopy command to create it". if you change the output of the command, objdump will never create the proj_name.bin, but the generated make will still refer to it, and the make will still try to create it, even if you run build immediately after another build, when nothing should be done.

     
  • Liviu Ionescu (ilg)

    • status: accepted --> closed