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.

Using SimpliciTI with MSP-EXP430FG4618s

Other Parts Discussed in Thread: SIMPLICITI, MSP430FG4618, MSP430F2274, CC1100, CC1101, CC1100E, CC2500, CC2420, CC2520, MSP430F5438

I've been using SimpliciTI to write applications for the eZ430-RF2500 and they've compiled and worked fine. Now I am trying to port the code to the experimenter board (MSP-EXP430FG4618) by using the EXP461x board defines and I am getting several compiler errors.

 

It appears that the symbols in the header files are out of date. I get several "identifier "X" is undefined" errors, where X is one of the symbols listed below.

CHAR, CKPH, DCOPLUS, FLL_CTL0, ME2, MM, P5DIR, P5OUT, SCFI0, SCFQCTL, SSEL1, STC, SWRST, SYNC, U1BR0, U1BR1, U1CTL, U1MCTL, U1RXBUF, U1TCTL, U1TXBUF, URXIFG1, USPIE1 and XCAP14PF.

 

I have searched for some of these symbols in the SimpliciTI 1.0.5 and 1.0.6 code trees, and they don't exist. CHAR is missing but CHAR_A, CHAR_U, CHAR_T and CHAR_0 are all present. CKPH does not exist but UCCPKH does.

 

Has any one got code working on the MSP-EXP430FG4618 or has anyone corrected the board header files?

  • Derek,

    Stick to the support files that are delivered out-of-the-box with your SimpliciTI download (Projects/Examples/Peer applications/EXP/), else you will be spending time re-inventing the wheel. These example code sets are well-tested and will work; you need only port your application over to the right MSP430. The board header files in the Components/ folders should be left alone.

    That said, are you getting these errors from the application level? It may be that the application file needs the line #include "MSP430xG46x.h" to recognize the symbols.  

    ~Miguel

  • Thanks! msp430xG46x.h is the file I need. This is usually included as part of msp430.h, as long as __MSP430FG4618__ (or the identifier of one of it's sibling's) is defined.

     

    I am using the Code Composer port of SimpliciTI 1.0.6 available from https://community.ti.com/user/Profile.aspx?UserID=2196. Unfortunately, "LPRF Rocks the World" hardcoded the port for the MSP430F2274 by including map430x22x4.h, rather than making it work for any MSP430 by using msp430.h and adding the define __MSP430F2274__ to the CCE project.

    I have now replaced the specific code in bsp_msp_430_defs.h with generic code.

    Replaced:

        /* ---------------------- Code Composer ---------------------- */
        #elif (defined __TI_COMPILER_VERSION__) && (defined __MSP430__)
        #define BSP_COMPILER_CODE_COMPOSER

        #include<msp430x22x4.h>

        #define __bsp_ISTATE_T__                    unsigned short
        #define __bsp_ISR_FUNCTION__(f,v)   __bsp_QUOTED_PRAGMA__(vector=v) __interrupt void f(void)

        /* ------------------ Unrecognized Compiler ------------------ */

    with

      /* ---------------------- Code Composer ---------------------- */
    #elif (defined __TI_COMPILER_VERSION__) && (defined __MSP430__)
      #define BSP_COMPILER_CODE_COMPOSER

      #include <msp430.h>

      #define __bsp_ISTATE_T__                    unsigned short
      #define __bsp_ISR_FUNCTION__(f,v)   __bsp_QUOTED_PRAGMA__(vector=v) __interrupt void f(void)
                                          
      /* ------------------ Unrecognized Compiler ------------------ */

     

    Now everything compiles as long as I have __MSP430FG4618__ defined in the project.

  • Ah... I see. That was my mistake on the CCE port, but thanks for the good feedback and for posting the improved code!

     

  • DerekC said:

    I've been using SimpliciTI to write applications for the eZ430-RF2500 and they've compiled and worked fine. Now I am trying to port the code to the experimenter board (MSP-EXP430FG4618) by using the EXP461x board defines and I am getting several compiler errors.

    Hi,

    I am trying to do the exact same thing as above, i.e. trying to port my code from ez430-rf2500 to msp430FG4618 experimemter's board using simpliciti1.0.6 CCE port. I am not sure whether we can use the same library as for ez430 or not. Do we need to change anything except the application file? Do we need to include any other header file (besides msp430xG46x) ?   Where can i find the 'EXP461x board defines'?

    I would be really grateful if you could guide me.

    -Komal

  • I'm also trying to use the "LPRF Rocks the World" CCE SimpliciTI port to program the MSP-EXP430FG4618 board. I've changed the code in the bsp_msp_430_defs.h by replacing:-

    #include<msp430x22x4.h>

    with

    #include <msp430.h>

    I've also added the #define __MSP430FG4618__ line at the start of the main program. I'm getting the following error when I try to build:-

    #error "Failed to match a default include file"

    To try and get around the error I added the #include<msp430xG46x.h> line to the bsp_msp_430_defs.h directly. The following error then resulted:-

    fatal error: file "./Peer Applications/application/main_manyEDs.obj" specifies ISA revision "MSPX", which is not compatible with ISA revision "MSP" specified in a previous file or on the command line

    Could somebody please explain what this error means, if they have seen it before, or maybe suggest an easier way to program with SImpliciTI on the MSP-EXP430FG4618 using CCEv3?

  • I don't know what that error means but I think your problem may be the way you've set up your project.

     

    May I suggest you include the __MSP430FG4618__ definition in your CCE project.

    To set __MSP430FG4618__ in your project defines.

    1.  Select Project->Properties from the menu.
    2.  Select C/C++ Build->General Options.
    3.  Add to the Pre-define NAME section the define for the MSP430, ie, __MSP430FG4618__ (remember to use double underscores).

     

    You also must make sure that you include the SimpliciTI include directories and code.

    To set up your include directories:

    1.  Select Project->Properties from the menu.
    2.  Select C/C++ Build->General Options.
    3.  Add these directories (including quotes) to the #include search path. These are the relative directories I use from the CCE base directory to the SimpliciTI Components directory.


    "${PROJECT_ROOT}/../../../Components/simpliciti/nwk"
    "${PROJECT_ROOT}/../../../Components/simpliciti/network_applications"
    "${PROJECT_ROOT}/../../../Components/mrfi"
    "${PROJECT_ROOT}/../../../Components/bsp/drivers"
    "${PROJECT_ROOT}/../../../Components/bsp"

    Depending on target board type, for example,
    "${PROJECT_ROOT}/../../../Components/bsp/boards/EXP461x"


    These should be in addition to:
    "${MSP430_CG_ROOT}/include"

    4.  There should be seven (7) directories in total.

     

    To include the SimpliciTI code:

    1.  Select the Project tree root (the left-most part of the tree with a blue open folder and the project name).
    2.  Use the right mouse button to open the context menu.
    3.  Select Link Files to Project...
    4.  Browse to the SimpliciTI component directories:
    •  C:\Texas Instruments\SimpliciTI-1.0.6\Components
    plus
       -  bsp,
       -  mrfi
       -  and the subdirectories simpliciti\nwk
       -  and simpliciti\Network Applications
    5.  Select the .c files in each directory and link them to the project.
    6.  For tidiness, create a new folder, using context menu->New Folder, for Components and then sub-folders for bsp, mrfi, nwk and nwk apps, then drag the files from the main trunk into these directories.

     

    If you have done all of this I don't know what the problem is. I do this every time for eZ430-RF2500 and EXP461x projects and they compile fine, except when changing peripheral code that uses different definition names that exist in one MCU but not in the other.

    I hope this helps. For more details see http://community.ti.com/forums/t/65.aspx. If you already do all these things I don't know what's going wrong since I follow these instructions and have no problems.

    Derek

  • Something I didn't mention - that I missed from your previous post - no, I don't think you can use the same library for the Experimenter Board as the eZ430. Many of the #defines change, ie, registers are in different memory locations, timers/ADCs are different, etc.

    As shown in my previous post, I'm not using a SimpliciTI library, instead I re-compile the whole thing for every build configuration. An alternative method would be to have two SimpliciTI libraries, one for the eZ430 and another for the Experimenter Board.

    Derek

  • Derek,

    Thanks very much for your detailed reply. I've got it working now.

     

    Just thought I'd mention for anybody reading this post trying to do the same thing not to forget to add the radio define:-

    MRFI_CCxxxx

    in the 'Pre-define NAME' section (depending on the particular radio in use).

     

    Also ensure the following configuration files are included for the end device:-

    "${PROJECT_ROOT}/peer_applications/Configuration/smpl_nwk_config.dat"

    "${PROJECT_ROOT}/peer_applications/Configuration/End Device/smpl_config.dat"

    using Project->Properties ->C/C++ Build->General Options, using the 'Read options from specified file (--cmd_file)' section.

     

    For the access point build configuration include:-

    "${PROJECT_ROOT}/peer_applications/Configuration/smpl_nwk_config.dat"

    "${PROJECT_ROOT}/peer_applications/Configuration/Access Point/smpl_config.dat"

    also using Project->Properties ->C/C++ Build->General Options, using the 'Read options from specified file (--cmd_file)' section.

  • Mike,

    Thanks for completing my instructions. I didn't include those steps because I thought the problem was with SimpliciTI compiling and I thought you would have been included those defines and files in your project already, although I probably should have checked that you had the MRFI_CCxxxx define...

    Glad it's all working now.

    Derek

  • Hi,

    I'm trying to get the cc2520emk board to run SimpliciTI with the MSP-EXP430.  I added MRFI_CC5420 to the pre-define parameter in CCE, but ran into a compatibility error when compiling.  After altering the mrfi_board_defs.h to this

    /* ------------------------------------------------------------------------------------------------
     *                                        Radio Selection
     * ------------------------------------------------------------------------------------------------
     */
    #if (!defined MRFI_CC1100) && \
        (!defined MRFI_CC1101) && \
        (!defined MRFI_CC1100E_470) && \
        (!defined MRFI_CC1100E_950) && \
        (!defined MRFI_CC2500) && \
        (!defined MRFI_CC2420) && \
        (!defined MRFI_CC2520)
      
    #error "ERROR: A compatible radio must be specified for the EXP461x board."

    I received several "unresolved symbol MRFI_.." errors.  Before going any further, I would like to know if it's even possible to have the cc2520emk to work on the experimenter's board.  If so, how do I accomplish this task?

    Thanks,

    Tom

  • Tom,

    I think this is a confusion between the MCU chip and the RF chip. The RF chip used on the cc2520emk is the CC2520, therefore you should have MRFI_CC2520 defined. (MRFI stands for Minimal RF Interface.)

    You should also add the definition for the MCU you're using. For example, if the experimenter board is the MSP-EXP430FG4618, include the definition __MSP430FG4618__, if it is the MSP-EXP430F5438 experimenter board include the definition __MSP430F5438__.

    Derek

  • Hi Dereck,

    There was a typo in my earlier post where I did have MRFI_CC2520 defined.  Basically I'm trying to get the EXP461x example project from Simpliciti to work with the cc2520emk board.  After including the MRFI_CC2520 definition, replacing the MRFI_CC2500 defined in the example project, I received a non compatible error.  I traced the error to the mrfi_board_defs.h file under the "Radio Selection" portion as explained in my previous post.  I got rid of the compatibility error by adding (!defined MRFI_CC2520) to the code. After doing so, I've been getting "unresolved error":

    unresolved symbol MRFI_BOARD_CONFIG_RADIO_GPIO, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    279
    unresolved symbol MRFI_CLEAR_RX_INTERRUPT_FLAG, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    280
    unresolved symbol MRFI_CONFIG_FIFO_AS_INPUT, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    282
    unresolved symbol MRFI_CONFIG_FIFOP_AS_INPUT, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    281
    unresolved symbol MRFI_CONFIG_RESETN_PIN_AS_OUTPUT, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    283
    unresolved symbol MRFI_CONFIG_TX_FRAME_DONE_AS_INPUT, first referenced in ./Components/mrfi/mrfi.obj        Project    line 0    1245687780429    284

    I noticed that these are functions used in mrfi_radio.c but can't fine the source for them.  Is there something I'm missing?

    Thanks,

    Tom

     

     

     

  • It seems that TI has not defined the necessary identifiers for the CC2520 to work with the Exp430F4618. The family 3 radio software seems to use different identifiers to those defined in mrfi_board_defs.h.

    You can either write your own defines or see whether someone from TI will help you.

    Sorry.

  • I appreciate the response Dereck. This will give me a break from programming while I wait for the C1101emk modules to arrive.    

    Thanks,

    Tom

  • Hi Derek

    Thanks for providing great information for configuring eZ430-RF2500.

    I am trying to do this with Code Composer Version: 4.0.2.01003.

    I have done everything that you advise but get stuck in Project->Properties->C/C++ Build->MSP430Compiler->ToolSettings-> ??? because the General Options that you refer to are missing. There are many other properties e.g. Basic Options, Language Options etc but not this one.

    Can you help?

    regards

    John

**Attention** This is a public forum