• Resolved

CC3000 Basic WiFi example application for MSP-430 FRAM won't link in IAR

Hello,

When I try to compile the Basic WiFi Application for the MSP430FR5739, using the project I downloaded from the wiki i get the following error:

Fatal Error[e72]: Segment FRAM_DATA must be defined in a segment definition option (-Z, -b or -P)

Which is caused by these declarations in the CC3000_Spi library, more specifically spi.c

#elif __IAR_SYSTEMS_ICC__
#pragma location = "FRAM_DATA"
__no_init char spi_buffer[CC3000_RX_BUFFER_SIZE];
#endif

#elif __IAR_SYSTEMS_ICC__
#pragma location = "FRAM_DATA"
__no_init unsigned char wlan_tx_buffer[CC3000_TX_BUFFER_SIZE];
#endif

Looking for FRAM_DATA in lnk430fr5739.xcl I found all of this

// -----------------------------------------------
// FRAM memory
//


// -------------------------------------
// Read/write data in FRAM
//

-Z(CONST)DATA16_P=C200-FF7F
-Z(DATA)DATA16_HEAP+_DATA16_HEAP_SIZE


FRAM_DATA is not declared at all in the lnk430fr5739.xcl file.  If I comment the location pragma statement and rebuild the CC3000_Spi library then rebuild the BasicWiFiAppication I get this:

Error[e16]: Segment CSTACK (size: 0x190 align: 0x1) is too long for segment definition. At least 0x82 more bytes needed.  
The problem occurred while processing the segment placement command "-Z(DATA)CSTACK+_STACK_SIZE#", where  
at the moment of placement the available memory ranges were "CODE:1ef2-1fff"
   Reserved ranges relevant to this placement:
   1c00-1c23            DATA16_I
   1c24-1d91            DATA16_Z
   1d92-1ef1            DATA16_N
   1ef2-1fff            CSTACK
Error while running Linker

Do I not have the correct .xcl file?  Is there a newer version that I need?  If not what else could be wrong?

I appreciate any suggestions! Thank you!

  • Hi Josh,

    Can you please point me to the link from where you have downloaded this project? Also please let me know the version of IAR that you are using.

    Can you please try reducing the optimization level in your project?

    1) Right click on project BasicWifiApplication in Project window. And click on 'Options...'.

    2) Goto C/C++ Compiler -> Open the tab Optimizations

    3) Set Optimization level to Low

    Now Rebuild the project BasicWifiApplication

    Thanks & Regards,
    Raghavendra

  • In reply to Raghavendra Shenoy:

    Thank you for the reply.  I downloaded the sample code from the following address:

    http://processors.wiki.ti.com/index.php/CC3000_Wi-Fi_Downloads#Sample_Application

    I downloaded and installed the SDK 1.12: "One Installer for Basic Wifi Application and all platforms"

    I am using IAR Embedded Workbench for MSP430, including complete build chain and debugger version 3.10.1 and IAR Embedded Workbench common components version 7.0.5.3137.  This is a temporary 30 day full license, and I have IAR Workbench for the 8051 installed as well.

    I tried setting the optimization level to low but I still get this error:

                  Fatal Error[e72]: Segment FRAM_DATA must be defined in a segment definition option (-Z, -b or -P)

    It seems to be because FRAM_DATA is not defined in the linker file though. 

    I appreciate the help! Thank you!

  • In reply to Josh Anderson:

    I have the solution to the problem.  The BasicWiFiApplication under options->Config->Linker->Linker configuration file defaults to the IAR linker directory where there is a default linker file for the MSP430FR5739 called lnk430fr5739.xcl.

    So the solution was to Override the default and point it to the BasicWiFiApplication_lnk430fr5739.xcl linker file in the project directory.

    After that I was able to build the project.

  • In reply to Josh Anderson:

    Building configuration: BasicWiFiApplication - Debug
    Updating build tree...
    Linking
    Error[e12]: Unable to open file 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\
    vee_lnk430fr5739.xcl'
    Error while running Linker

    Total number of errors: 1
    Total number of warnings: 0

  • In reply to Josh Anderson:

    Thank you! I was able to build the project,now.

    Building configuration: CC3000 Automation App - Debug
    Updating build tree...
    Linking

    Total number of errors: 0
    Total number of warnings: 0

  • In reply to user1843513:

    I'am using IAR 6.50,
    I override the linker in linker /config as mentioned above and i can see in the "BasicWiFiApplication_lnk430fr5739.xcl":

    -Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=1C00-1FFF
    -Z(DATA)CODE_I
    -Z(DATA)CSTACK+_STACK_SIZE#
    -Z(DATA)FRAM_DATA=C200-CD00

    FRAM_DATA is defined but i don't know why the compiler still complain:
    Fatal Error[e72]: Segment FRAM_DATA must be defined in a segment definition option (-Z, -b or -P)

    Any Help