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.

CCS/EK-TM4C129EXL: Any pattern/framework/process/tutorial on integration of a simple Energia sketch into a CCSv7 project?

Part Number: EK-TM4C129EXL
Other Parts Discussed in Thread: ENERGIA

Tool/software: Code Composer Studio

The Journey continues...

Having successfully worked through interfacing a simple SPI device to the above-referenced board - using an Energia sketch - one feels emboldened...

OK, Next Step: Is there a documented approach/Best Practices for integrating a ( simple, one-page ) Energia sketch into a CCS project. I've gotten any number of the demo projects working at this point; would be happy to hang the Energia work off one of them.

Can anyone suggest a direction?

  • Do you want Energia to be the main application?
    From the project menu you can import your Energia sketch into CCS.

    This thread has some more information on how to add C to your Energia application.
    e2e.ti.com/.../2178177

    Regards,
    John
  • John, tks for your reply - I've looked through that post, and it will certainly contribute to my overall edification!

    But, really, I want to do exactly the opposite of that. I'm seeking to integrate a ( simple, one-page ) Energia sketch into a CCS project. The underlying goal is simply to use Energia as the stepping stone into understanding CCS - and likely other - bigger-time IDEs for these TI devices. The debug features integrated into CCS/others alone are enough justification. We've got a lot of working-but-time-for-the-next-step test code running in Energia/Arduino.

    I've been using embedXcode for our Energia/Arduino playgrounds, as Xcode offers a lot of great features. But it's really Energia-centric in this context, and without the deeper debug capabilities.  Or have I got it all wrong?

    I've got a simple, working Energia sketch interfacing via SPI to a non-TI device, built on the Energia IDE.

    Next, I've imported it into CCS7 - After working through the force reset workaround - this is also running AOK.

    Ok, so far so good. I'd like to:

    First: Integrate the sketch into one of the projects I've got working in CCS7 - likely the grlib demo - while adding some debugging goodness along the way.

    Finally: Do the work of really understanding how to do this the 'TI Way' - perhaps directly via device libs, etc. All this remains to be seen/understood.

  • I haven't done in that way before.  I would think it is possible.  I am not an expert on it but a few things that I can think of that you will need to address are:

    1) When creating or importing an Energia sketch in CCS there is hidden dependent project that is referenced by your project.  You would need to add this as a dependency for your project.  In your case you already have a Energia based CCS project in your workspace so the dependent project will be there.  Something like this:

    You could then add this same dependent project to your regular CCS project by going o the same spot in the project options and hitting the add button.  The project will be listed there:

    2) I think there will be issues with the 2 main functions in the ino file conflicting with the main application.  I would try renaming those.

    3) Include paths.  I gave the above a quick try but they was getting some undefined errors.  I believe this is due to needing to add a #include "Energia.h" and setting up the same include paths that the Energia project has.

    Regards,

    John

  • John, Many thanks for your detailed answer. Gives me a lot to work through.

    Summary? I'm still lost in the woods, but I now have a week's supply of food... (!)

    So far, I've added Project Dependencies, and am working though all Includes. At least it's still building ...

    Having trouble getting the Project Properties / Path Variables to be saved, though.  Trying to establish ENERGIA_ROOT, for example, and the value isn't being retained. If you have an idea on that...