Jump to content
43oh

Implications of changing compiler version


Recommended Posts

[MSP432][Windows10][Energia 21][Board file 5.23.1]


Recently I've been struggling with a run-time error in a very simple program (converting time=0 to 1/1/1970 fails using ctime...granted it's not really an Energia thing, but it's available for use in my CCS builds of energia projects) using the latest code composer, energia and board file (BTW, I don't have this problem with the previous board file) for my msp432.  I've figured out a way to "fix' my problem, but it's unclear to me what the implications of this change might be.

By default, when I create a new project in CCS, the project is setup to use the GNU v6.3.1 compiler by default.  If I use this compiler, my program compiles, but it's operation fails.  In looking into the properties of the project, I notice that I have 5 (2 TI and 3 GNU - 1 GNU older than the default and 1 GNU newer) compiler choices in the tool chain.  As such, I started changing the compiler to see what would happen with my non-functioning code.  First, I started with the TI compilers.  If I select either of them, I get a notice about the need for "manual" intervention in the compiler config.  As such, I gave up on those.

I then selected the oldest version of the GNU compiler (4.8.4).  Switching to this version and my compilation fails.  Once again, I have up on that one.  As a last attempt, I changed to the newer version of the GNU compiler (7.2.1) and lo-and-behold, not only does my problem compile, but ctime now works correctly.  Newer things are always better, right?  :)

The default (non-working one) and older (non-compiling) versions of the GNU compiler appear to be shipped with Energia while the newer (working) one appears to be shipped with CCSv8.  As such, although I've fixed my problem, I'm wondering if switching is just going to lead to other problems as I'm assuming energia was vetted with the default 6.3.1 compiler.  Anyone have positive/negative experiences with changing the compiler tool chain?  As my program runs with the previous board file (but using the latest Energia 21 otherwise), might I just be better to switch to the older board file (and wait for a board file/compiler update with energia) but leave the compiler as the default 6.3.1 version?

jrd

 

Link to post
Share on other sites
  • 2 weeks later...

I just stumbled across one big difference when I use the newer compiler...which, as a nice side note, seems to explain my ctime issue issue as well.

When I use the newer compiler, time_t now gets defined as a 64bit variable (versus the 32bit one I was getting using the older compiler), which I believe is why the ctime function once again works correctly(see my other changelist-related post).

Unfortunately, with ctime a 64 bit long long, Serial.print()  no longer works, because output of a 64bit number isn't supported :) ... but one problem at a time...

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...