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.

Import Energia sketch to CCS limitations (what are they?)

Other Parts Discussed in Thread: ENERGIA

Hi everyone,

So i was wondering what are the problems of importing or creating a Energia sketch to CCS. It uses GCC which i also don't know the difference from GCC to the other CCS compiler.

I really like using this because i normally have the hardest time in adding the file paths to the linker, so much that i almost want to just program in assembly.

  • Luis Afonso said:
    So i was wondering what are the problems of importing or creating a Energia sketch to CCS.

     Hi Luis, in first take care about I don't use Energia nor Arduino related things too.

    From what I read sketch can import as they where and you gain a full debugging support, this sound to me better than original IDE suffer from bare code generated without support to debug it than insert probing.

     On the other way I learned arduino IDE was not supporting modular programming. First time I got in a similar IDE from Rabbit module I forever hated that!

    Luis Afonso said:
    It uses GCC which i also don't know the difference from GCC to the other CCS compiler.

     GCC is an Open source OSF released to all platform and higly portable and maintained by OSF community source code free, CCS is the IDE itself and TI compiler is proprietary compiler maintained by TI itself source code is not available.

     CCS support both compiler and other also can be added if you like them.

    Luis Afonso said:
    I really like using this because i normally have the hardest time in adding the file paths to the linker, so much that i almost want to just program in assembly.

     Programming in assembly need a make file on every compiler you use if the IDE dont build for you. No difference if source is for TI or GCC compiler, command line or graphical IDE hosted you write the code and plan to link obj module as you wish to behave.

     

  • Thank you all for the info.

    I tried a bit more starting a project with GNU with no success so i will keep using Energia import since it seems to be about the same.

    I do know how to use the TI ARM compiler. 

    When i start programming the STM32 with eclipse + ARM GCC i will probably use GNU more

  • Hi,

    Do you realize the Energia is also GNU based? But it is so closed as you do not even reckognize, as you already say. If you really want/like to use GNU, I suggest to try first the combination Eclipse+GNU+gnuarmeclipse plugin (template project generation for your target) and after you learn all aspects you may come back to CCS. May look awkward, but worth the try. On stellarisiti there are detailed info about configuring both, so to not have any problem(s).

    Petrei

  • Hi Petrei,

    Yes i am aware Energia is GNU based. But i don't know exactly what it is doing. I mean it probably is the same but i am talking about code size and speed efficiency, since it's Energia which is like arduino, wll programming in TivaWare be as as eficient as it would if i created a GNU project instead of a Energia Project (which will use GNU).

    So basically i'm over thinking right?

    I have Ecliplse+ARM GNU combo installed. I have it so i can start with STM32. I tried to use it for Tiva but i still haven't been able. I'm missing some basic concepts .

    Thanks i will check out that in stellarisiti.

  • Hi Luis,

    What to say - more "no" than "yes" - first do not mix anymore Tiva with Arduino - while first is 32 bits, for the second usually it is 16 bits unless otherwise specified, so in terms of code size, comparison does (should) not hold. 

    For code size - there are two steps to take into account: Energia makes a lot of initializations in order to ease user life, so you make fast progress with the micro. But if you want other kind of initializations, you must doit again in Tiva style, so the first default initializations are useless, but present both in your code and execution time.

    A second step is related to the Debug/Release versions - for Release a lot of code is eliminated by the compiler (with your help, setting a correct configuration) - which you did not make up to now, if my guess is correct.

    As for Eclipse + GNU, one advise is to keep separate workspaces for each microcontroller, even for Tiva123/129. Also do not forget to install the gnuarmeclipse plugin.

    And ask about what you think is not OK.

    Petrei

  • Hi Petrei,

    I always use different workspaces for each Microcontroler with IAR when i tried it.

    Now i'm switching to the TI compiler in CCS because it seems it isn't code limited for the launchpads in the free licence, and i know how to configure it. But i want a good free compiler even if not the best and that's why i'm trying to get GNU working.

  • Luis Afonso said:
    Now i'm switching to the TI compiler in CCS because it seems it isn't code limited for the launchpads in the free licence, and i know how to configure it. But i want a good free compiler even if not the best and that's why i'm trying to get GNU working.

     Hi Luis, CCS is not limited till you use launchpad or xds 100 series jtag adaptor. If you use expensive 560 0r similar ccs is no more free but that adapter is more expensive than CCS and a full support of all processor is a fraction of IAR single processor. I am using it under Linux and stability and speed is more better than windoze version but still MSP430 is partially supported but I suppose this is not a problem to you.

     Energia support all launchpad series 16 (MSP) or 32 bit promising code can be ported from one series to the other, GCC (the compiler "processing IDE" use and also "arduino modified processing" use) was also ported to GCC then extending to energia sketch was the successive step.

     When you use energia a library is used to launch your code inside a super loop call.


     What I found a problem with CCS is the complexity to setup a project and customize the excessive option to compiler linker, no difference if you use GCC or TI compiler.

     Otherwise starting from a copy of a working project is the best way to have working code.

     IMHO CCS still is missing a simple wizard that help setup project.

  • Hi Roberto.

    Yea i find it easier too to start from a existing project, but i like to understand a bit how the options are setup. I had a major problem with some examples when i copied them in IAR and the linking got all broken because they had relative paths.

    The biggest problem i had it was changing the name of a project. 

    Yea it seems there should be easier ways to setup a project by now

  • Luis Afonso said:

    The biggest problem i had it was changing the name of a project. 

    Yea it seems there should be easier ways to setup a project by now

     Hi Luis, use copy project then remove code and add your.

     I know about that flaw of hardwired path of project, still is present and I suppose it can be removed soon.

     If you are using windoze version (and IAR is WZZ only) this issue is more and more worst and you MUST install use and have all your data on same drive!!!!

  • still, the name of the project stays the same :/

    So if i want multiple projects in the same workspace i have to keep copying diferent ones right? If i change the project name it gives a error

  • Luis Afonso said:

    still, the name of the project stays the same :/

    So if i want multiple projects in the same workspace i have to keep copying diferent ones right? If i change the project name it gives a error

     Not really, do this:

    open your project workspace or another if project exists with that name.

     Select File -> import

     On pane select -> Code composer studio --  CCS project --> next button

      Select search directory then press browse on right... Select the directory where are files of project you wish to copy then press enter Or button OK (the one you prefer, when I am using keyboard i prefer enter and button when I am using mouse)

      If more than one select the project you want to copy

    then

    check box on bottom <<copy projects into workspace>>

     

     press Finish

     REname project then build.

     If all is fine remove main code and fill in your module.

     This work for me but CCS is Linux hosted, I suppose be the same for winzz, please report if you got success.

  • oh...OOOOOH. I feel so stupid. That totally works. The CCS renames everything for you! I created a project with all the settings and with a main with all the initial code i always use (systick configured and such) and it works importing it and renaming it.

    Thank you very much. I really am total ignorant about compilers and linkers. Is it just me not finding them or isn't there enough teaching tools about them?

  • Hi,

    Luis, grab a good searching tool (like Total Commander), select the folder where CCS is installed and in that folder search for *.pdf and you will be surprised by the files founded, among them being the compiler/linker manual and the assembler manual.

    Petrei

  • Hi,

    Thanks i will do so. A good searching tool is a must, i have windows index disabled (stop eating my god dam hard drive) and notepad C++ is not the greatest for that.

    I will see it latter. Something came up that i have to do this week and the dam TM4C123 DMA doesn't have the same peripheral interrupts and triggers

  • Roberto Romano said:
    If you use expensive 560 0r similar ccs is no more free but that adapter is more expensive than CCS and a full support of all processor is a fraction of IAR single processor.

    Believe you intended, "single license or single seat" - rather than "single processor."  Our group uses paid IAR - and over 40 different ARM vendors & their respective ARM MCUs are fully supported.  This is extremely important to our group/others - as it enables one common IDE to quickly/easily/directly attach to, debug & program multiple ARM MCUs - from multiple vendors!

    Certain ARM vendors introduce new MCUs at rapid rates - IDE focused/dedicated firms - such as IAR/Keil - are very quick to repond to these new MCU releases.  It remains (so hard) to expect that one vendor will always have the only/best device - in stock, priced competitively & with proper blend of features/functions...

    (note: I'm unpaid/unrewarded by IAR - but believe in freedom of choice - and find such focused/pro IDE (by far) the best choice for our small tech group...)