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.

Compiling source code for the TRF7960A EVM

Other Parts Discussed in Thread: TRF7960A, MSP430F2370

I have the TRF7960A EVM (actually 2, one I reserve for reference and the other's what I'm testing with).  I am trying to compile what I perceive to be the source code running on said EVM (SLOC251) so I can verify that I can make changes from a known starting point.  This is not going well.  The code I compile (using CCS 6.2.0.00048 - a free version) does not reflect the behavior seen that comes stock in the EVM.  As a matter of fact, when I download the compiled code into the EVM, it (in effect) no longer works (it doesn’t see any of the example tags supplied with the EVM, whereas before it did).  It does seem to run though, i.e. I can JTAG in and step through the code, watch the power on LED state change, etc.  OTOH, I notice that one of the global variables gets corrupted on function calls.  Once this happens, I use MSPFLasher to grab the image off the “reference” EVM and download said image into the “victim” EVM and everything starts working again on the victim.  I’m using a MSP430USB debug dongle (MSP-FET430UIF).

 There appear to be two source code repositories out on the TI website: sloc251.zip (newer) and sloc203.zip (older).  I’m trying to get this working with the newer code as it appears to be more aligned with the EVM(s) that I have.

 Comparing the image that I generate with CCS against what I pull out of the reference EVM, shows the images to be very different.  On the CCS side, under the properties::general page, I have the family set to MSP430, the variant set to MSP430F2370 (as stamped on the EVM 430 chip).  The output is legacy COFF.  The compiler version is TI v3.3.1 (TI v15.12.3.LTS).

 During the compile, I get a snot-a-gram (warning) about the compiler version that is not currently installed and it defaults to the compiler that is in ()’s above.

 During link, I get a couple of warnings about the linker command file having no sections of type “VECT_INIT” and what it does to deal with this.  I also get a warning about creating an output section with no SECTIONS spec’d.  The console window suggests this is due to the linker command file being out of date.  However, this is the linker command file that is packaged with the source code.

 So,

 1)      Is sloc251 the latest and greatest source code for the EVM?

2)      What’s the story on the linker warnings?  Is this related to #1?

3)      Any other insights into what’s going on?  E.g. compiler settings?

 

Let me know if you’d be so kind.

 

-Chris

 

  • i just imported sloc251, built it and looked at the map file.

    looks like its only using 12.9kB of flash, so it should compile in the free version

    it built no problem with v6.1.3.00033

  • The issue isn't the build, it's the run time (execution) behavior of the code that gets built.  The code that is blown into the EVM module and shipped out behaves differently than what I compile and download onto the EVM (using the sloc251 code base).  The shipped code recognizes various tags and turns on corresponding LEDs on the EVM that indicate the tag family.  This does not happen on the sloc251 code base when I download it into the EVM - none of the tags are recognized.  The issue with the global variable corruption is also troubling.  That suggests something amiss in the compiler and/or linker settings...although I suppose the compiler could be in the mix as well. 

    BTW, did you get any of the compiler/linker warnings?

  • I should probably rephrase the first line to be:

    "The issue isn't whether I can build or not, it's the run time (execution) behavior of the code that gets built."

    Cuz, AFAICT, the issue is either the build (via settings or the compiler) or "stale" source code related.
  • Hello C Brooks,

    I think you are right about this being a compiler issue.

    You mentioned that the compiler chosen by CCS was the TI v15.12.3.LTS - but we have seen issues with that compiler selection before: http://e2e.ti.com/support/wireless_connectivity/nfc_rfid/f/667/p/508978/1851966#1851966

    See if you can get something like TI v4.4.5 or just in general TI v4.x.x without the "LTS" tag on it. That compiler should be able to handle the code which was originally made on v3.3.1.

    To change the Compiler version used, right click the project and go to "Properties"

    Then go to CCS General, and under the Main tab you should see an Advanced Settings area. This lets you choose the TI Compiler Version you want to use from a drag down menu.


    There is a chance you don't have any TI v4.x.x compilers installed by default, and while I'm not a CCS expert I think I know where you can acquire this from:

    Go into the CCS App Center and download the "MSP430 Compiler" package which is offered to have that compiler come up as an option. If it doesn't appear on the CCS App Center 'Home' screen under "Code Composer Studio Add-ons" then click the "See more >>" option for that section and it should list the MSP430 Compiler as a package for download.

    If that doesn't work, the MSPWare download could possibly have it... but I am pretty sure the MSP430 Compiler package is what you need.

  • I'm detailing what I did for those who follow...

    The only way I could get access to the MSP430 compiler versions was via the CCSv6 "help->Install New Software...". The other approaches (outlined above, albeit with caveats) didn't work out. This may be because I'm using a "free" version. The experience may be different for those with licenses. My assumption is that what I describe below would work in either case.

    Selecting "help->Install New Software..." pops up a dialog box with the top edit field of "Work with:" It has a pull down where I was able to select "Code Generation Tools Updates- http://software-dl.ti.com/...". I had to make sure I grabbed the windows site (there was a linux one as well). I think the populating of the web sites in the pull down was automagic, I don't remember having to point it at these web sites.

    This then populated the window (in the dialog box below the "Works with" field) with 3 entries that were "openable" and had a string prefix of "TI Compiler".

    I opened the "TI Compiler Updates" and was able to scroll down and select the 4.4.7 compiler. Select that and then hit "next" and work your way through the ensuing dialog boxes.

    If things work out, you'll eventually get to a dialog box that forces a reboot of the IDE.

    Once it rebooted, I massaged the "Project->Properties->CCS General" compiler version field to point it at the 4.4.7 compiler.

    Did a "project->clean" and then a "project->rebuild all", started a debug session and let it run.

    Lo and behold, the code now mimics (AFAICT) the code shipped on the EVM.

    Thanks Ralph!
  • I should add that I still get the linker warnings. However, AFAICT, they don't appear to affect the behavior.
  • Great to hear that it is working now, and thanks very much for detailing those steps! Learned something new about CCS myself. :)