[SOLVED] Embed external file into code for access at runtime

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

  • Hi Andrew,
    Thank you for your inquiry.

    If we understand you correctly, you would like to call an application that creates a c file from a hex file, before building the project.
    Is that correct?

    If so you could create a staging or combining project for this purpose:
    "Staging: a project that will apply a user-defined command to each file in a project.
    Combining: a project that can be used to apply a user-defined command when any files in a project have changed." - Embedded Studio Reference Manual

    Does this answer your question?

    Best regards,
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.
  • Possibly,

    The easiest way I can think off is an execution hook when build is clicked, which runs the executable which generates the byte array c file, which in turn is picked up normally.

    I just found Code -> User Build Step -> Pre-Build Command which looks like it'll do the job, shall give it a go now.