Hot!Generate automated header files

Author
Demonic_activity_87
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2016/10/20 13:48:37
  • Location: Germany
  • Status: offline
2018/08/09 23:28:00 (permalink)
0

Generate automated header files

Hello everyone
I am working on a project where I need to execute some code to generate Header file to be used in actual code which actually runs on a microcontroller. So far every thing is working good. Now I am fed up that every time with a little change I need to generate the Header file again and again. My question is how I can generate the Header files before compiling the actual code in C. I mean using make/batch file scripts or similar procedures. I am using MPLABX IDE and a 8-bit pic16 microcontroller.
 
Thanks in advance
#1

3 Replies Related Threads

    andersm
    Super Member
    • Total Posts : 2463
    • Reward points : 0
    • Joined: 2012/10/07 14:57:44
    • Location: 0
    • Status: offline
    Re: Generate automated header files 2018/08/10 02:37:59 (permalink)
    +2 (2)
    Run your script in the pre-build phase, set in the project settings.
    #2
    Demonic_activity_87
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2016/10/20 13:48:37
    • Location: Germany
    • Status: offline
    Re: Generate automated header files 2018/08/10 05:51:07 (permalink)
    0
    @andersm I already have a make file script for the new Header file generation I don't exctly know how to call this make file in PreBuild Phase Project Setting. Can you provide a simple example. Thanks 
    #3
    malaugh
    Super Member
    • Total Posts : 341
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: offline
    Re: Generate automated header files 2018/08/10 09:51:09 (permalink)
    +1 (1)
    In MPlab-X, go to the projects folder, right click on your project and select Properties and the project properties dialog will be displayed. 
     
    Now select "building" in categories pane and check the "Execute this line before build" checkbox in the right pane, and type in the name of the executable you want to execute. 
     
    Its easiest if you make your pre-build step into a batch file. 
    #4
    Jump to:
    © 2018 APG vNext Commercial Version 4.5