This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HalCoGen - prefix and/or postfix for generated file names

Other Parts Discussed in Thread: HALCOGEN

Hi there,

I would be happy, if I had the possibility to change the names of the files,
that HalCoGen is generating.

Two simple HalCoGen-Project-Parameters like
- "Generated file name pre-fix"
- "Generated file name post-fix"

would be great.

Example:
- file name pre-fix = "HAL_"
-> all files, that are generated by HalCoGen will be named e.g. "HAL_can.c", "HAL_main.c", "HAL_rti.h", etc.

- file name post-fix = "_TI"
-> all files, that are generated by HalCoGen will be named e.g. "can_TI.c", "main_TI.c", "rti_TI.h", etc.


Is that possible?


Regards, Andy

  • Andy,

    I can file an enhancement request, but I think the development team is really focused nearterm on the actual driver codebase and not planning to do much with the GUI and generator in the nearterm.

    I think we might be able to suggest a way to do what you want through a batch file that runs the generation process and renames the outputs.   Would that be useful?

    Best Regards,

    Anthony

  • Hi Anthony,

    thanks for forwarding an enhancement request.

    A (rename) batch would only be useful, if HalCoGen is then still able to recognize the generated (and renamed) files as 'its own',
    so that changes (USER CODE BEGIN.... USER CODE END)  that have been implemented by the user in the renamed files
    won't get lost in a new HalCoGen generation step.

    Let's think about that....

    Ok, if HalCoGen had an option "choose batch to run after generation" (with relative path), then I can write a batch that
    is copying and renaming the generated files. The original HalCoGen files are still there, so no USER CODE will be lost
    on the next generation step.

    Yes, good idea!

    Best regards, Andy

  • Hi Andy,

    I've been told, but haven't tried it out yet, that you can run the generation stage of HalCoGen by doing this:

    HALCOGEN.exe –i xx.hcg 

    In which case the generation could be put into a batch file or other script and the renaming could be handled by that script after generation.

    I do actually intend to try this out sometime but haven't done so yet.  So if you try it out first you will probably be ahead of me.

    Thanks and Best Regards,

    Anthony