Adding Build Dependencies

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Adding Build Dependencies

    I have a Python script that generates some C++ code. What is the best way to add a dependency on the C++ so that if the Python is newer the C++ will be generated during a build? My preference might to maintain a makefile that is included somewhere.

    Thanks,

    Kenny
  • Hi,

    You have a Python file in your project which should be run by Embedded Studio when it changed
    to update the C++ files which are then compiled?

    Regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Yes: A.o depends on A.cpp which depends on A.py.

    In one IDE I have used, they optionally included a Makefile if it existed. This allowed one to build additional dependencies and rules.

    It's not so much that the IDE needs to build it as the build system needs to recognize the dependency and the rule to build it.

    Thanks,

    Kenny
  • You can add "A project for running a custom build when files
    have changed" to your solution,
    set up to run the python script, creating the source files which are included in your application project.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.