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.

SL_WLAN_CONNECT_EVENT not coming when using gcc compiler [MSP430f5529 LP + CC3100]

Other Parts Discussed in Thread: MSP430F5529, CC3100

Hi,

We have been working on TI's MSP430f5529 Launch Pad MCU with CC3100 module (configured as STATION Mode within the code).

When we use Code Composer Studio, we have been able to successfully connect to WLAN AP.

We are using the same code with MSP GCC (with compiler syntax related modifications where-ever needed), it successfully able to configure and set the device in STATION mode, however  we are not getting SL_WLAN_CONNECT_EVENT, and stuck in loop.

Any suggestion, why we are not receiving SL_WLAN_CONNECT_EVENT when code is compiled with GCC?

Fyi, we are using SPI to communicate between MCU & CC3100. 

Regards, Shankar

  • Hi Shankar,

    Can you please check if the device is getting connected to AP while working with gcc? You can check that by logging into the AP.

    Also can you please share the modification you made to work with GCC?

    Regards,

    Ankur

  • Hi Shankar,

    I am closing the thread, if issue still exist please open a new thread and add a link to this one for reference.

    Regards,

    Ankur

  • Hi,

    Even i am facing same issue.

    We have been working on TI's MSP430f5529 Launch Pad MCU with CC3100 module (configured as STATION Mode within the code).

    When we use Code Composer Studio, we have been able to successfully connect to WLAN AP.

    We are using the same code with MSP GCC (with compiler syntax related modifications where-ever needed), it successfully able to configure and set the device in STATION mode, however  we are not getting SL_WLAN_CONNECT_EVENT, and stuck in loop.

    Any suggestion, why we are not receiving SL_WLAN_CONNECT_EVENT when code is compiled with GCC?

    Fyi, we are using SPI to communicate between MCU & CC3100

    And also device  is not getting connected to AP, is it compiler issue

    we are not able to debug the issue

    Regards

    Prashanth

  • Hi Ankur,

    The device is not getting connected AP when compiled with MSPGCC.
    The same piece of code works well when TI Compiler is used.

    The only change the code has (while switching between compiler chains, i.e., TI & GCC) is their syntactical difference mainly in ISR routines and way of reading/writing to H/W registers, for example, GCC don’t understand direct register names as PC, SP and SR. Instead, they have to be addressed as R0, R1 and R2.

    During our debug session, we observed that CC3100 is not sending the required response (in GCC compiled image). Here’re the descriptions:

    =============================================================================================================
    In working case(TI complier):
    After sl_WlanConnect function, We are getting SL_OPCODE_WLAN_WLANASYNCCONNECTEDRESPONSE(0x880) event in _SlDrvClassifyRxMsg.

    In not working case(MSPGCC complier):
    After sl_WlanConnect, We are not getting SL_OPCODE_WLAN_WLANASYNCCONNECTEDRESPONSE(0x880) event in _SlDrvClassifyRxMsg. Due to this issue
    sl_WlanEvtHdlr in not invoking and thus stuck in loop.
    Please can you help us what is the reason for not getting SL_OPCODE_WLAN_WLANASYNCCONNECTEDRESPONSE ?
    =============================================================================================================


    The following changes are made in simplelink driver for the compilation with MSPGCC.
    =============================================================================================================
    1.When we complied simplelink with MSPGCC ,got the compilation errors related interrupt handling functions.
    In board.c,cli_uart.c:
    All interrupt handler definition are modified to satisfy mspgcc syntax for proper compilation.
    Ex:
    In CCS(TI complier)
    #pragma vector=PORT1_VECTOR
    __interrupt void Port1_ISR(void)

    In MSPGCC
    static void __attribute__((__interrupt__(PORT1_VECTOR)))
    Port1_ISR( void )

    2. When we complied simplelink with MSPGCC ,got the compilation error related SR register.
    like no definition for __get_SR_register,__bic_SR_register,__bis_SR_register etc.

    In intrinsics.h, we defined following functions,

    #define __get_SR_register() _get_SR_register()
    #define __bic_SR_register(x) _bic_SR_register(x)
    #define __bis_SR_register(x) _bis_SR_register(x)
    #define _get_SR_register() \
    ({ \
    unsigned int __x; \
    __asm__ __volatile__( \
    "mov r2, %0" \
    : "=r" ((unsigned int) __x) \
    :); \
    __x; \
    })
    #define _bic_SR_register(x) \
    __asm__ __volatile__ ("bic.w %0, r2" \
    : : "ri"((unsigned int) x) \
    )
    #define _bis_SR_register(x) \
    __asm__ __volatile__ ("bis.w %0, r2" \
    : : "ri"((unsigned int) x) \
    )
    #define _even_in_range(x,y) (x)
    #define __even_in_range(x,y) _even_in_range(x,y)

    Regards,

    Shankar

  • Hi Shankar,


    Can you post compilation error (without making changes for __get_SR_register,__bic_SR_register,__bis_SR_register in intrinsics.h ) here.


    Regards,
    Aashish

  • Hi Ashsish,

    I am getting the following errors with MSPGCC without making any changes in intrinsics.h
    ===========================================================================
    simplelink_cc3100/source/drv/board.o: In function `Init_FLL':
    board.c:(.text+0x378): undefined reference to `__get_SR_register'
    simplelink_cc3100/source/drv/board.o: In function `__isr_47':
    board.c:(.text+0x804): undefined reference to `__even_in_range'
    simplelink_cc3100/source/drv/board.o: In function `__isr_42':
    board.c:(.text+0x86c): undefined reference to `__even_in_range'
    simplelink_cc3100/source/drv/board.o: In function `__isr_56':
    board.c:(.text+0x8a2): undefined reference to `__even_in_range'
    simplelink_cc3100/source/drv/cli_uart.o: In function `__isr_46':
    cli_uart.c:(.text+0x12): undefined reference to `__even_in_range'
    collect2: ld returned 1 exit status
    make: *** [demo.elf] Error 1
    ===========================================================================

    Regards,
    shankar
  • Hi Shankar,


    Please post compilation option also.

    msp430-elf-gcc  -I C:/ti/gcc/include -I ../../ -I ../../../../simplelink -I ../../../../simplelink/Include   -I ../../../../simplelink/Source  -I ../../../../examples/getting_started_with_wlan_station/../common -mmcu=msp430f5529 -O2 -g -D_USE_CLI_ -c ../../../../examples/getting_started_with_wlan_station/main.c -o obj/main.o


    Regards,
    Aashish

  • Hi Aashish ,

    One thing i want to mention here is I am using mspgcc-20120406-p20120911, downloaded from sourceforge.net/.../mspgcc

    My make file looks like below:
    ======================================================================================

    CC=msp430-gcc
    OBJCOPY=msp430-objcopy
    DEBUG=-g
    OPT=-O2
    #WARNINGS=-Wall -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare \
    # -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused
    CFLAGS=-mmcu=msp430f5529 $(OPT) $(DEBUG) -I. -Isimplelink_cc3100/include -D_USE_CLI_ $(WARNINGS)
    CFLAGS+= -DGCC
    LDFLAGS= -o demo.elf
    SIMPLE_LINK_PATH = simplelink_cc3100/source
    #
    # Source files that can be built to THUMB mode.
    #
    SRC = \
    main.c \
    $(SIMPLE_LINK_PATH)/device.c \
    $(SIMPLE_LINK_PATH)/driver.c \
    $(SIMPLE_LINK_PATH)/flowcont.c \
    $(SIMPLE_LINK_PATH)/fs.c \
    $(SIMPLE_LINK_PATH)/netapp.c \
    $(SIMPLE_LINK_PATH)/netcfg.c \
    $(SIMPLE_LINK_PATH)/nonos.c \
    $(SIMPLE_LINK_PATH)/socket.c \
    $(SIMPLE_LINK_PATH)/spawn.c \
    $(SIMPLE_LINK_PATH)/wlan.c \
    $(SIMPLE_LINK_PATH)/drv/board.c \
    $(SIMPLE_LINK_PATH)/drv/spi.c \
    $(SIMPLE_LINK_PATH)/drv/cli_uart.c \
    $(SIMPLE_LINK_PATH)/drv/uart.c
    #
    # Define all object files.
    #
    OBJ = $(SRC:.c=.o)
    demo.hex : demo.elf
    $(OBJCOPY) demo.elf -O ihex demo.hex

    demo.elf: $(OBJ) makefile
    $(CC) $(OBJ) $(LDFLAGS)
    $(OBJ) : %.o : %.c makefile
    $(CC) -c $(CFLAGS) $< -o $@
    clean :
    touch makefile
    =================================================================================

    Regards,
    Shankar
  • HI Shankar,

    We are using msp430 gcc compiler 2.1.1.0 downloaded from http://www.ti.com/tool/MSP430-GCC-OPENSOURCE on cygwin  For your reference makefile (

    Makefile.txt
    APP_NAME = Getting_Started
    OBJ      = obj
    EXE	 = exe
    BUILD	 = debug
    
    OS	= $(shell uname -o)
    DEVICE	= msp430f5529
    CC	= msp430-elf-gcc
    GDB	= msp430-elf-gdb
    
    
    
    ifeq ($(OS),Cygwin)
    COMPILER_INCLUDE_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include)
    COMPILER_LIBRARY_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include)
    else
    COMPILER_INCLUDE_DIR = $(dir $(shell which $(CC)))../include
    COMPILER_LIBRARY_DIR = $(dir $(shell which $(CC)))../include
    endif
    
    MAIN_C_DIR = ../../../../examples/getting_started_with_wlan_station
    SIMPLE_LINK_STUDIO_DIR = ../../
    SIMPLE_LINK_DIR = ../../../../simplelink
    SIMPLE_STUDIO_LIB_DIR = $(SIMPLE_LINK_STUDIO_DIR)
    
    LINKER_SCRIPT = $(APP_NAME).ld
    LINKER_SCRIPT_PATH = ./
    
    APP_FLAG +=  -D_USE_CLI_
    
    OBJECTS += $(OBJ)/main.o 
    OBJECTS += $(OBJ)/device.o 
    OBJECTS += $(OBJ)/driver.o 
    OBJECTS += $(OBJ)/flowcont.o 
    OBJECTS += $(OBJ)/netapp.o 
    OBJECTS += $(OBJ)/netcfg.o 
    OBJECTS += $(OBJ)/nonos.o 
    OBJECTS += $(OBJ)/fs.o 
    OBJECTS += $(OBJ)/socket.o 
    OBJECTS += $(OBJ)/spawn.o 
    OBJECTS += $(OBJ)/wlan.o 
    OBJECTS += $(OBJ)/board.o 
    OBJECTS += $(OBJ)/spi.o 
    OBJECTS += $(OBJ)/cli_uart.o
    
    INCLUDE_PATH += -I $(COMPILER_INCLUDE_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_STUDIO_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Include  
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Source 
    INCLUDE_PATH += -I $(MAIN_C_DIR)/../common
    
    
    CFLAGS += $(INCLUDE_PATH)
    CFLAGS += -mmcu=$(DEVICE)
    CFLAGS += -O2
    
    ifeq ($(BUILD), debug)
    CFLAGS += -g
    endif
    
    CFLAGS += $(APP_FLAG)
    LFLAGS =  -L $(LINKER_SCRIPT_PATH) -T $(LINKER_SCRIPT)
    
    all: $(OBJECTS)
    	$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(EXE)/$(APP_NAME).out
    
    $(OBJ)/main.o: $(MAIN_C_DIR)/main.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(MAIN_C_DIR)/main.c -o $(OBJ)/main.o
    
    $(OBJ)/device.o: $(SIMPLE_LINK_DIR)/Source/device.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/device.c -o $(OBJ)/device.o
    
    $(OBJ)/driver.o: $(SIMPLE_LINK_DIR)/Source/driver.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/driver.c -o $(OBJ)/driver.o
    
    $(OBJ)/flowcont.o: $(SIMPLE_LINK_DIR)/Source/flowcont.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/flowcont.c -o $(OBJ)/flowcont.o
    
    $(OBJ)/netapp.o: $(SIMPLE_LINK_DIR)/Source/netapp.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netapp.c -o $(OBJ)/netapp.o
    
    $(OBJ)/netcfg.o: $(SIMPLE_LINK_DIR)/Source/netcfg.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netcfg.c -o $(OBJ)/netcfg.o
    
    $(OBJ)/nonos.o: $(SIMPLE_LINK_DIR)/Source/nonos.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/nonos.c -o $(OBJ)/nonos.o
    
    $(OBJ)/fs.o: $(SIMPLE_LINK_DIR)/Source/fs.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/fs.c -o $(OBJ)/fs.o
    
    $(OBJ)/socket.o: $(SIMPLE_LINK_DIR)/Source/socket.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/socket.c -o $(OBJ)/socket.o
    
    $(OBJ)/spawn.o: $(SIMPLE_LINK_DIR)/Source/spawn.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/spawn.c -o $(OBJ)/spawn.o
    
    $(OBJ)/wlan.o: $(SIMPLE_LINK_DIR)/Source/wlan.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/wlan.c -o $(OBJ)/wlan.o
    
    $(OBJ)/spi.o: $(SIMPLE_LINK_STUDIO_DIR)/spi.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/spi.c -o $(OBJ)/spi.o
    
    $(OBJ)/board.o: $(SIMPLE_LINK_STUDIO_DIR)/board.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/board.c -o $(OBJ)/board.o
    
    $(OBJ)/cli_uart.o: $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c -o $(OBJ)/cli_uart.o
    
    debug: all
    	$(GDB) $(EXE)/$(APP_NAME).out
    
    clean:
    	rm -rf $(OBJ)/* $(EXE)/$(APP_NAME).out
    
    ) is attached. 

    Regards,

    Aashish

  • Hi Shankar,


    You are using obsolete version of msp430 gcc compiler (Obsolete. See www.ti.com/.../msp430-gcc-opensource or upstream GNU tools.)


    Regards,
    Aashish
  • Hi Aashish,

    Thanks for the help,

    I downloaded msp430 gcc compiler 2.1.1.0 and tried to build the source. Now we didnt get any compilation errors related to SR register.

    But we got following linking errors :This case i used wlan_station.ld makefile

    ==============================================================

    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib/crt0.o: In
    function `.Loc.36.1':
    /opt/redhat/msp430-14r1-98/sources/tools/libgloss/msp430/crt0.S:1: undefined ref
    erence to `__stack'
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib/crt0.o: In
    function `.Loc.116.1':
    /opt/redhat/msp430-14r1-98/sources/tools/libgloss/msp430/crt0.S:116: undefined r
    eference to `__init_array_start'

    ==============================================================

    Also tried by using msp430f5529.ld available in C/ti/gcc/include and got different
    type of errors:
    =====================================================================================
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: dem
    o.elf section `.text' will not fit in region `ROM'
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: sec
    tion __reset_vector loaded at [0000fffe,0000ffff] overlaps section .text loaded
    at [00004da4,00010e8f]
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: reg
    ion `ROM' overflowed by 3856 bytes
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-svfprintf.o): In function `.Loc.1248.1':
    vfprintf.c:(.text._svfprintf_r+0x482): relocation truncated to fit: R_MSP430X_AB
    S16 against symbol `__ltdf2' defined in .text.__ltdf2 section in c:/ti/gcc/bin/.
    ./lib/gcc/msp430-elf/4.9.1\libgcc.a(_lt_df.o)

    =====================================================================================

    For fixing "`.text' will not fit in region `ROM'", we modified ROM to FAR_ROM
    in .text section of msp430f5529.ld.
    With this change getting relocation truncated errors as below:
    ================================================================================
    main.o: In function `SimpleLinkPingReport':
    main.c:(.text+0xa): relocation truncated to fit: R_MSP430X_ABS16 against symbol
    `CLI_Write' defined in .text section in simplelink_cc3100/source/drv/cli_uart.o
    main.o: In function `SimpleLinkWlanEventHandler':
    main.c:(.text+0x3c): relocation truncated to fit: R_MSP430X_ABS16 against `.L2'
    main.c:(.text+0x52): relocation truncated to fit: R_MSP430X_ABS16 against symbol
    `CLI_Write' defined in .text section in simplelink_cc3100/source/drv/cli_uart.o

    main.c:(.text+0x62): relocation truncated to fit: R_MSP430X_ABS16 against `.L12'

    ================================================================================

    Even with msp430 gcc compiler 3.2.2.0 , we are facing same issues.

    Please can you help in resolving these errors and also share your ld(linker descripter) file.

    Note:Attached msp430f5529.ld and wlan_station.ld for reference.

    msp430f5529 _ld.txt
    /* ============================================================================ */
    /* Copyright (c) 2014, Texas Instruments Incorporated                           */
    /*  All rights reserved.                                                        */
    /*                                                                              */
    /*  Redistribution and use in source and binary forms, with or without          */
    /*  modification, are permitted provided that the following conditions          */
    /*  are met:                                                                    */
    /*                                                                              */
    /*  *  Redistributions of source code must retain the above copyright           */
    /*     notice, this list of conditions and the following disclaimer.            */
    /*                                                                              */
    /*  *  Redistributions in binary form must reproduce the above copyright        */
    /*     notice, this list of conditions and the following disclaimer in the      */
    /*     documentation and/or other materials provided with the distribution.     */
    /*                                                                              */
    /*  *  Neither the name of Texas Instruments Incorporated nor the names of      */
    /*     its contributors may be used to endorse or promote products derived      */
    /*     from this software without specific prior written permission.            */
    /*                                                                              */
    /*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */
    /*  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,       */
    /*  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR      */
    /*  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR            */
    /*  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,       */
    /*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,         */
    /*  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */
    /*  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,    */
    /*  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR     */
    /*  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,              */
    /*  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                          */
    /* ============================================================================ */
    
    /* This file supports MSP430F5529 devices. */
    /* Version: 1.153 */
    /* Default linker script, for normal executables */
    
    OUTPUT_ARCH(msp430)
    ENTRY(_start)
    
    MEMORY {
      SFR              : ORIGIN = 0x0000, LENGTH = 0x0010 /* END=0x0010, size 16 */
      PERIPHERAL_8BIT  : ORIGIN = 0x0010, LENGTH = 0x00F0 /* END=0x0100, size 240 */
      PERIPHERAL_16BIT : ORIGIN = 0x0100, LENGTH = 0x0100 /* END=0x0200, size 256 */
      RAM              : ORIGIN = 0x2400, LENGTH = 0x2000 /* END=0x43FF, size 8192 */
      INFOMEM          : ORIGIN = 0x1800, LENGTH = 0x0200 /* END=0x19FF, size 512 as 4 128-byte segments */
      INFOA            : ORIGIN = 0x1980, LENGTH = 0x0080 /* END=0x19FF, size 128 */
      INFOB            : ORIGIN = 0x1900, LENGTH = 0x0080 /* END=0x197F, size 128 */
      INFOC            : ORIGIN = 0x1880, LENGTH = 0x0080 /* END=0x18FF, size 128 */
      INFOD            : ORIGIN = 0x1800, LENGTH = 0x0080 /* END=0x187F, size 128 */
      ROM              : ORIGIN = 0x4400, LENGTH = 0xBB80 /* END=0xFF7F, size 48000 */
      VECT1            : ORIGIN = 0xFF80, LENGTH = 0x0002
      VECT2            : ORIGIN = 0xFF82, LENGTH = 0x0002
      VECT3            : ORIGIN = 0xFF84, LENGTH = 0x0002
      VECT4            : ORIGIN = 0xFF86, LENGTH = 0x0002
      VECT5            : ORIGIN = 0xFF88, LENGTH = 0x0002
      VECT6            : ORIGIN = 0xFF8A, LENGTH = 0x0002
      VECT7            : ORIGIN = 0xFF8C, LENGTH = 0x0002
      VECT8            : ORIGIN = 0xFF8E, LENGTH = 0x0002
      VECT9            : ORIGIN = 0xFF90, LENGTH = 0x0002
      VECT10           : ORIGIN = 0xFF92, LENGTH = 0x0002
      VECT11           : ORIGIN = 0xFF94, LENGTH = 0x0002
      VECT12           : ORIGIN = 0xFF96, LENGTH = 0x0002
      VECT13           : ORIGIN = 0xFF98, LENGTH = 0x0002
      VECT14           : ORIGIN = 0xFF9A, LENGTH = 0x0002
      VECT15           : ORIGIN = 0xFF9C, LENGTH = 0x0002
      VECT16           : ORIGIN = 0xFF9E, LENGTH = 0x0002
      VECT17           : ORIGIN = 0xFFA0, LENGTH = 0x0002
      VECT18           : ORIGIN = 0xFFA2, LENGTH = 0x0002
      VECT19           : ORIGIN = 0xFFA4, LENGTH = 0x0002
      VECT20           : ORIGIN = 0xFFA6, LENGTH = 0x0002
      VECT21           : ORIGIN = 0xFFA8, LENGTH = 0x0002
      VECT22           : ORIGIN = 0xFFAA, LENGTH = 0x0002
      VECT23           : ORIGIN = 0xFFAC, LENGTH = 0x0002
      VECT24           : ORIGIN = 0xFFAE, LENGTH = 0x0002
      VECT25           : ORIGIN = 0xFFB0, LENGTH = 0x0002
      VECT26           : ORIGIN = 0xFFB2, LENGTH = 0x0002
      VECT27           : ORIGIN = 0xFFB4, LENGTH = 0x0002
      VECT28           : ORIGIN = 0xFFB6, LENGTH = 0x0002
      VECT29           : ORIGIN = 0xFFB8, LENGTH = 0x0002
      VECT30           : ORIGIN = 0xFFBA, LENGTH = 0x0002
      VECT31           : ORIGIN = 0xFFBC, LENGTH = 0x0002
      VECT32           : ORIGIN = 0xFFBE, LENGTH = 0x0002
      VECT33           : ORIGIN = 0xFFC0, LENGTH = 0x0002
      VECT34           : ORIGIN = 0xFFC2, LENGTH = 0x0002
      VECT35           : ORIGIN = 0xFFC4, LENGTH = 0x0002
      VECT36           : ORIGIN = 0xFFC6, LENGTH = 0x0002
      VECT37           : ORIGIN = 0xFFC8, LENGTH = 0x0002
      VECT38           : ORIGIN = 0xFFCA, LENGTH = 0x0002
      VECT39           : ORIGIN = 0xFFCC, LENGTH = 0x0002
      VECT40           : ORIGIN = 0xFFCE, LENGTH = 0x0002
      VECT41           : ORIGIN = 0xFFD0, LENGTH = 0x0002
      VECT42           : ORIGIN = 0xFFD2, LENGTH = 0x0002
      VECT43           : ORIGIN = 0xFFD4, LENGTH = 0x0002
      VECT44           : ORIGIN = 0xFFD6, LENGTH = 0x0002
      VECT45           : ORIGIN = 0xFFD8, LENGTH = 0x0002
      VECT46           : ORIGIN = 0xFFDA, LENGTH = 0x0002
      VECT47           : ORIGIN = 0xFFDC, LENGTH = 0x0002
      VECT48           : ORIGIN = 0xFFDE, LENGTH = 0x0002
      VECT49           : ORIGIN = 0xFFE0, LENGTH = 0x0002
      VECT50           : ORIGIN = 0xFFE2, LENGTH = 0x0002
      VECT51           : ORIGIN = 0xFFE4, LENGTH = 0x0002
      VECT52           : ORIGIN = 0xFFE6, LENGTH = 0x0002
      VECT53           : ORIGIN = 0xFFE8, LENGTH = 0x0002
      VECT54           : ORIGIN = 0xFFEA, LENGTH = 0x0002
      VECT55           : ORIGIN = 0xFFEC, LENGTH = 0x0002
      VECT56           : ORIGIN = 0xFFEE, LENGTH = 0x0002
      VECT57           : ORIGIN = 0xFFF0, LENGTH = 0x0002
      VECT58           : ORIGIN = 0xFFF2, LENGTH = 0x0002
      VECT59           : ORIGIN = 0xFFF4, LENGTH = 0x0002
      VECT60           : ORIGIN = 0xFFF6, LENGTH = 0x0002
      VECT61           : ORIGIN = 0xFFF8, LENGTH = 0x0002
      VECT62           : ORIGIN = 0xFFFA, LENGTH = 0x0002
      VECT63           : ORIGIN = 0xFFFC, LENGTH = 0x0002
      RESETVEC         : ORIGIN = 0xFFFE, LENGTH = 0x0002
      BSL              : ORIGIN = 0x1000, LENGTH = 0x0800
      USBRAM           : ORIGIN = 0x1C00, LENGTH = 0x0800
      FAR_ROM          : ORIGIN = 0x00010000, LENGTH = 0x000143FF
    }
    
    SECTIONS
    {
      __interrupt_vector_1   : { KEEP (*(__interrupt_vector_1 )) } > VECT1
      __interrupt_vector_2   : { KEEP (*(__interrupt_vector_2 )) } > VECT2
      __interrupt_vector_3   : { KEEP (*(__interrupt_vector_3 )) } > VECT3
      __interrupt_vector_4   : { KEEP (*(__interrupt_vector_4 )) } > VECT4
      __interrupt_vector_5   : { KEEP (*(__interrupt_vector_5 )) } > VECT5
      __interrupt_vector_6   : { KEEP (*(__interrupt_vector_6 )) } > VECT6
      __interrupt_vector_7   : { KEEP (*(__interrupt_vector_7 )) } > VECT7
      __interrupt_vector_8   : { KEEP (*(__interrupt_vector_8 )) } > VECT8
      __interrupt_vector_9   : { KEEP (*(__interrupt_vector_9 )) } > VECT9
      __interrupt_vector_10  : { KEEP (*(__interrupt_vector_10)) } > VECT10
      __interrupt_vector_11  : { KEEP (*(__interrupt_vector_11)) } > VECT11
      __interrupt_vector_12  : { KEEP (*(__interrupt_vector_12)) } > VECT12
      __interrupt_vector_13  : { KEEP (*(__interrupt_vector_13)) } > VECT13
      __interrupt_vector_14  : { KEEP (*(__interrupt_vector_14)) } > VECT14
      __interrupt_vector_15  : { KEEP (*(__interrupt_vector_15)) } > VECT15
      __interrupt_vector_16  : { KEEP (*(__interrupt_vector_16)) } > VECT16
      __interrupt_vector_17  : { KEEP (*(__interrupt_vector_17)) } > VECT17
      __interrupt_vector_18  : { KEEP (*(__interrupt_vector_18)) } > VECT18
      __interrupt_vector_19  : { KEEP (*(__interrupt_vector_19)) } > VECT19
      __interrupt_vector_20  : { KEEP (*(__interrupt_vector_20)) } > VECT20
      __interrupt_vector_21  : { KEEP (*(__interrupt_vector_21)) } > VECT21
      __interrupt_vector_22  : { KEEP (*(__interrupt_vector_22)) } > VECT22
      __interrupt_vector_23  : { KEEP (*(__interrupt_vector_23)) } > VECT23
      __interrupt_vector_24  : { KEEP (*(__interrupt_vector_24)) } > VECT24
      __interrupt_vector_25  : { KEEP (*(__interrupt_vector_25)) } > VECT25
      __interrupt_vector_26  : { KEEP (*(__interrupt_vector_26)) } > VECT26
      __interrupt_vector_27  : { KEEP (*(__interrupt_vector_27)) } > VECT27
      __interrupt_vector_28  : { KEEP (*(__interrupt_vector_28)) } > VECT28
      __interrupt_vector_29  : { KEEP (*(__interrupt_vector_29)) } > VECT29
      __interrupt_vector_30  : { KEEP (*(__interrupt_vector_30)) } > VECT30
      __interrupt_vector_31  : { KEEP (*(__interrupt_vector_31)) } > VECT31
      __interrupt_vector_32  : { KEEP (*(__interrupt_vector_32)) } > VECT32
      __interrupt_vector_33  : { KEEP (*(__interrupt_vector_33)) } > VECT33
      __interrupt_vector_34  : { KEEP (*(__interrupt_vector_34)) } > VECT34
      __interrupt_vector_35  : { KEEP (*(__interrupt_vector_35)) } > VECT35
      __interrupt_vector_36  : { KEEP (*(__interrupt_vector_36)) } > VECT36
      __interrupt_vector_37  : { KEEP (*(__interrupt_vector_37)) } > VECT37
      __interrupt_vector_38  : { KEEP (*(__interrupt_vector_38)) } > VECT38
      __interrupt_vector_39  : { KEEP (*(__interrupt_vector_39)) } > VECT39
      __interrupt_vector_40  : { KEEP (*(__interrupt_vector_40)) } > VECT40
      __interrupt_vector_41  : { KEEP (*(__interrupt_vector_41)) } > VECT41
      __interrupt_vector_42  : { KEEP (*(__interrupt_vector_42)) KEEP (*(__interrupt_vector_rtc)) } > VECT42
      __interrupt_vector_43  : { KEEP (*(__interrupt_vector_43)) KEEP (*(__interrupt_vector_port2)) } > VECT43
      __interrupt_vector_44  : { KEEP (*(__interrupt_vector_44)) KEEP (*(__interrupt_vector_timer2_a1)) } > VECT44
      __interrupt_vector_45  : { KEEP (*(__interrupt_vector_45)) KEEP (*(__interrupt_vector_timer2_a0)) } > VECT45
      __interrupt_vector_46  : { KEEP (*(__interrupt_vector_46)) KEEP (*(__interrupt_vector_usci_b1)) } > VECT46
      __interrupt_vector_47  : { KEEP (*(__interrupt_vector_47)) KEEP (*(__interrupt_vector_usci_a1)) } > VECT47
      __interrupt_vector_48  : { KEEP (*(__interrupt_vector_48)) KEEP (*(__interrupt_vector_port1)) } > VECT48
      __interrupt_vector_49  : { KEEP (*(__interrupt_vector_49)) KEEP (*(__interrupt_vector_timer1_a1)) } > VECT49
      __interrupt_vector_50  : { KEEP (*(__interrupt_vector_50)) KEEP (*(__interrupt_vector_timer1_a0)) } > VECT50
      __interrupt_vector_51  : { KEEP (*(__interrupt_vector_51)) KEEP (*(__interrupt_vector_dma)) } > VECT51
      __interrupt_vector_52  : { KEEP (*(__interrupt_vector_52)) KEEP (*(__interrupt_vector_usb_ubm)) } > VECT52
      __interrupt_vector_53  : { KEEP (*(__interrupt_vector_53)) KEEP (*(__interrupt_vector_timer0_a1)) } > VECT53
      __interrupt_vector_54  : { KEEP (*(__interrupt_vector_54)) KEEP (*(__interrupt_vector_timer0_a0)) } > VECT54
      __interrupt_vector_55  : { KEEP (*(__interrupt_vector_55)) KEEP (*(__interrupt_vector_adc12)) } > VECT55
      __interrupt_vector_56  : { KEEP (*(__interrupt_vector_56)) KEEP (*(__interrupt_vector_usci_b0)) } > VECT56
      __interrupt_vector_57  : { KEEP (*(__interrupt_vector_57)) KEEP (*(__interrupt_vector_usci_a0)) } > VECT57
      __interrupt_vector_58  : { KEEP (*(__interrupt_vector_58)) KEEP (*(__interrupt_vector_wdt)) } > VECT58
      __interrupt_vector_59  : { KEEP (*(__interrupt_vector_59)) KEEP (*(__interrupt_vector_timer0_b1)) } > VECT59
      __interrupt_vector_60  : { KEEP (*(__interrupt_vector_60)) KEEP (*(__interrupt_vector_timer0_b0)) } > VECT60
      __interrupt_vector_61  : { KEEP (*(__interrupt_vector_61)) KEEP (*(__interrupt_vector_comp_b)) } > VECT61
      __interrupt_vector_62  : { KEEP (*(__interrupt_vector_62)) KEEP (*(__interrupt_vector_unmi)) } > VECT62
      __interrupt_vector_63  : { KEEP (*(__interrupt_vector_63)) KEEP (*(__interrupt_vector_sysnmi)) } > VECT63
      __reset_vector : 
      { 
        KEEP (*(__interrupt_vector_64)) 
        KEEP (*(__interrupt_vector_reset)) 
        KEEP (*(.resetvec))
      } > RESETVEC
    
      .rodata : {
        . = ALIGN(2);
        *(.plt)
        *(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
        *(.rodata1)
        *(.eh_frame_hdr)
        KEEP (*(.eh_frame))
        KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
        PROVIDE (__preinit_array_start = .);
        KEEP (*(.preinit_array))
        PROVIDE (__preinit_array_end = .);
        PROVIDE (__init_array_start = .);
        KEEP (*(SORT(.init_array.*)))
        KEEP (*(.init_array))
        PROVIDE (__init_array_end = .);
        PROVIDE (__fini_array_start = .);
        KEEP (*(.fini_array))
        KEEP (*(SORT(.fini_array.*)))
        PROVIDE (__fini_array_end = .);
        LONG(0); /* Sentinel.  */
    
        /* gcc uses crtbegin.o to find the start of the constructors, so
           we make sure it is first.  Because this is a wildcard, it
           doesn't matter if the user does not actually link against
           crtbegin.o; the linker won't look for a file to match a
           wildcard.  The wildcard also means that it doesn't matter which
           directory crtbegin.o is in.  */
        KEEP (*crtbegin*.o(.ctors))
    
        /* We don't want to include the .ctor section from from the
           crtend.o file until after the sorted ctors.  The .ctor section
           from the crtend file contains the end of ctors marker and it
           must be last */
        KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
        KEEP (*(SORT(.ctors.*)))
        KEEP (*(.ctors))
    
        KEEP (*crtbegin*.o(.dtors))
        KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
        KEEP (*(SORT(.dtors.*)))
        KEEP (*(.dtors))
      } > ROM
    
      .text           :
      {
        . = ALIGN(2);
        PROVIDE (_start = .);
        KEEP (*(SORT(.crt_*)))
        *(.lowtext .text .stub .text.* .gnu.linkonce.t.* .text:*)
        KEEP (*(.text.*personality*))
        /* .gnu.warning sections are handled specially by elf32.em.  */
        *(.gnu.warning)
        *(.interp .hash .dynsym .dynstr .gnu.version*)
        PROVIDE (__etext = .);
        PROVIDE (_etext = .);
        PROVIDE (etext = .);
        . = ALIGN(2);
        KEEP (*(.init))
        KEEP (*(.fini))
        KEEP (*(.tm_clone_table))
      } > ROM
    
      .data : {
        . = ALIGN(2);
        PROVIDE (__datastart = .);
    
        KEEP (*(.jcr))
        *(.data.rel.ro.local) *(.data.rel.ro*)
        *(.dynamic)
    
        *(.data .data.* .gnu.linkonce.d.*)
        KEEP (*(.gnu.linkonce.d.*personality*))
        SORT(CONSTRUCTORS)
        *(.data1)
        *(.got.plt) *(.got)
    
        /* We want the small data sections together, so single-instruction offsets
           can access them all, and initialized data all before uninitialized, so
           we can shorten the on-disk segment size.  */
        . = ALIGN(2);
        *(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
    
        . = ALIGN(2);
        _edata = .;
        PROVIDE (edata = .);
        PROVIDE (__dataend = .);
      } > RAM AT>ROM
    
      /* Note that crt0 assumes this is a multiple of two; all the
         start/stop symbols are also assumed word-aligned.  */
      PROVIDE(__romdatastart = LOADADDR(.data));
      PROVIDE (__romdatacopysize = SIZEOF(.data));
    
      .bss : {
        . = ALIGN(2);
        PROVIDE (__bssstart = .);
        *(.dynbss)
        *(.sbss .sbss.*)
        *(.bss .bss.* .gnu.linkonce.b.*)
        . = ALIGN(2);
        *(COMMON)
        PROVIDE (__bssend = .);
      } > RAM
      PROVIDE (__bsssize = SIZEOF(.bss));
    
      .noinit (NOLOAD) : {
        . = ALIGN(2);
        PROVIDE (__noinit_start = .);
        *(.noinit)
        . = ALIGN(2);
        PROVIDE (__noinit_end = .);
        end = .;
      } > RAM
      
      .stack (ORIGIN (RAM) + LENGTH(RAM)) :
      {
        PROVIDE (__stack = .);
        *(.stack)
      }
    
      .MP430.attributes 0 :
      {
        KEEP (*(.MSP430.attributes))
        KEEP (*(.gnu.attributes))
        KEEP (*(__TI_build_attributes))
      }
    
      /* The rest are all not normally part of the runtime image.  */
    
      /* Stabs debugging sections.  */
      .stab          0 : { *(.stab) }
      .stabstr       0 : { *(.stabstr) }
      .stab.excl     0 : { *(.stab.excl) }
      .stab.exclstr  0 : { *(.stab.exclstr) }
      .stab.index    0 : { *(.stab.index) }
      .stab.indexstr 0 : { *(.stab.indexstr) }
      .comment       0 : { *(.comment) }
      /* DWARF debug sections.
         Symbols in the DWARF debugging sections are relative to the beginning
         of the section so we begin them at 0.  */
      /* DWARF 1 */
      .debug          0 : { *(.debug) }
      .line           0 : { *(.line) }
      /* GNU DWARF 1 extensions */
      .debug_srcinfo  0 : { *(.debug_srcinfo) }
      .debug_sfnames  0 : { *(.debug_sfnames) }
      /* DWARF 1.1 and DWARF 2 */
      .debug_aranges  0 : { *(.debug_aranges) }
      .debug_pubnames 0 : { *(.debug_pubnames) }
      /* DWARF 2 */
      .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
      .debug_abbrev   0 : { *(.debug_abbrev) }
      .debug_line     0 : { *(.debug_line) }
      .debug_frame    0 : { *(.debug_frame) }
      .debug_str      0 : { *(.debug_str) }
      .debug_loc      0 : { *(.debug_loc) }
      .debug_macinfo  0 : { *(.debug_macinfo) }
      /* SGI/MIPS DWARF 2 extensions */
      .debug_weaknames 0 : { *(.debug_weaknames) }
      .debug_funcnames 0 : { *(.debug_funcnames) }
      .debug_typenames 0 : { *(.debug_typenames) }
      .debug_varnames  0 : { *(.debug_varnames) }
      /DISCARD/ : { *(.note.GNU-stack) }
    }
    
    
    wlan_station_ld.txt
    /*****************************************************************************
    * wlan_station.ld
    *
    * GCC Linker script for wlan_station application.
    *
    * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ 
    * 
    * 
    *  Redistribution and use in source and binary forms, with or without 
    *  modification, are permitted provided that the following conditions 
    *  are met:
    *
    *    Redistributions of source code must retain the above copyright 
    *    notice, this list of conditions and the following disclaimer.
    *
    *    Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in the 
    *    documentation and/or other materials provided with the   
    *    distribution.
    *
    *    Neither the name of Texas Instruments Incorporated nor the names of
    *    its contributors may be used to endorse or promote products derived
    *    from this software without specific prior written permission.
    *
    *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    *
    ******************************************************************************/
    
    HEAP_SIZE = 0x00010000;
    
    MEMORY
    {
        SRAM (rwx) : ORIGIN = 0x20004000, LENGTH = 0x00030000
    }
    
    SECTIONS
    {
        .text :
        {
            _text = .;
            KEEP(*(.intvecs))
            *(.text*)
            *(.rodata*)
    	*(.ARM.extab* .gnu.linkonce.armextab.*)
    	. = ALIGN(8);
            _etext = .;
        } > SRAM
    
        .ARM : {
        __exidx_start = .;
          *(.ARM.exidx*)
          __exidx_end = .;
        } > SRAM
    
        __init_data = .;
    
        .data : AT(__init_data)
        {
            _data = .;
            *(.data*)
    	. = ALIGN (8);
            _edata = .;
        } > SRAM
    
        .bss :
        {
            _bss = .;
            *(.bss*)
            *(COMMON)
            _ebss = .;
        } > SRAM
    
        .heap :
        {
    	_heap = .;
    	. = . + HEAP_SIZE;
    	. = ALIGN(8);
    	_eheap = .;
    
        }
    }
    

    Regards,

    Shankar

  • Hi Shankar,

    Please post complete compilation log (make clean; make) and makefile here.

    Regards,

    Aashish

  • Hi Aashish,

    Please find the complete log and makefile attached.

    7127.makefile.txt
    
    CC=msp430-elf-gcc
    OBJCOPY=msp430-elf-objcopy
    #DEBUG=
    OPT=-Os
    
    #WARNINGS=-Wall
    #-Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare \
    #		-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused
    
    CFLAGS=-mmcu=msp430f5529 $(OPT) $(DEBUG) -I. -IC:/ti/gcc/include -Isimplelink_cc3100/include -D_USE_CLI_ $(WARNINGS)
    CFLAGS+= -DGCC 
    LDFLAGS= -T msp430f5529.ld -L C:/ti/gcc/include -o demo.elf
    SIMPLE_LINK_PATH = simplelink_cc3100/source
    #
    # Source files that can be built to THUMB mode.
    #
    SRC = \
    main.c \
    $(SIMPLE_LINK_PATH)/device.c \
    $(SIMPLE_LINK_PATH)/driver.c \
    $(SIMPLE_LINK_PATH)/flowcont.c \
    $(SIMPLE_LINK_PATH)/fs.c \
    $(SIMPLE_LINK_PATH)/netapp.c \
    $(SIMPLE_LINK_PATH)/netcfg.c \
    $(SIMPLE_LINK_PATH)/nonos.c \
    $(SIMPLE_LINK_PATH)/socket.c \
    $(SIMPLE_LINK_PATH)/spawn.c \
    $(SIMPLE_LINK_PATH)/wlan.c \
    $(SIMPLE_LINK_PATH)/drv/board.c \
    $(SIMPLE_LINK_PATH)/drv/spi.c \
    $(SIMPLE_LINK_PATH)/drv/cli_uart.c 
    #$(SIMPLE_LINK_PATH)/drv/uart.c 
    
    #
    # Define all object files.
    #
    OBJ = $(SRC:.c=.o)
    
    demo.hex : demo.elf
    	$(OBJCOPY) demo.elf -O ihex demo.hex
    	
    demo.elf: $(OBJ) makefile
    	$(CC) $(LDFLAGS) $(OBJ) 
    
    $(OBJ) : %.o : %.c makefile
    	$(CC) -c $(CFLAGS) $< -o $@	
    	
    clean :
    	touch makefile
    	
    
    
    
    
    
    
    
    
    	
    
    
    
    logs.txt
    F:\Shankar\MSP430F5529 - 03092014_GCC_WORK_ONTHIS\Demo\msp430_GCC_5529>make
    msp430-elf-gcc -T msp430f5529.ld -L C:/ti/gcc/include -o demo.elf main.o simplel
    ink_cc3100/source/device.o simplelink_cc3100/source/driver.o simplelink_cc3100/s
    ource/flowcont.o simplelink_cc3100/source/fs.o simplelink_cc3100/source/netapp.o
     simplelink_cc3100/source/netcfg.o simplelink_cc3100/source/nonos.o simplelink_c
    c3100/source/socket.o simplelink_cc3100/source/spawn.o simplelink_cc3100/source/
    wlan.o simplelink_cc3100/source/drv/board.o simplelink_cc3100/source/drv/spi.o s
    implelink_cc3100/source/drv/cli_uart.o
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: dem
    o.elf section `.text' will not fit in region `ROM'
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: sec
    tion __reset_vector loaded at [0000fffe,0000ffff] overlaps section .text loaded
    at [00004d40,00010ea3]
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: reg
    ion `ROM' overflowed by 4220 bytes
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-svfprintf.o): In function `.Loc.1248.1':
    vfprintf.c:(.text._svfprintf_r+0x482): relocation truncated to fit: R_MSP430X_AB
    S16 against symbol `__ltdf2' defined in .text.__ltdf2 section in c:/ti/gcc/bin/.
    ./lib/gcc/msp430-elf/4.9.1\libgcc.a(_lt_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-svfprintf.o): In function `.L97':
    vfprintf.c:(.text._svfprintf_r+0x6a2): relocation truncated to fit: R_MSP430X_AB
    S16 against symbol `__mspabi_remi' defined in .text.__modhi3 section in c:/ti/gc
    c/bin/../lib/gcc/msp430-elf/4.9.1\libgcc.a(lib2divHI.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-svfprintf.o): In function `.LVL148':
    vfprintf.c:(.text._svfprintf_r+0x6a6): relocation truncated to fit: R_MSP430X_AB
    S16 against symbol `__mspabi_divi' defined in .text.__divhi3 section in c:/ti/gc
    c/bin/../lib/gcc/msp430-elf/4.9.1\libgcc.a(lib2divHI.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.LVL91':
    dtoa.c:(.text._dtoa_r+0x22c): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__mspabi_fltuld' defined in .text.__floatunsidf section in c:/ti/gcc/
    bin/../lib/gcc/msp430-elf/4.9.1\libgcc.a(_usi_to_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.LVL96':
    dtoa.c:(.text._dtoa_r+0x2c4): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__mspabi_fltlid' defined in .text.__floatsidf section in c:/ti/gcc/bi
    n/../lib/gcc/msp430-elf/4.9.1\libgcc.a(_si_to_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.Loc.359.1':
    dtoa.c:(.text._dtoa_r+0x2fc): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__mspabi_fixdli' defined in .text.__fixdfsi section in c:/ti/gcc/bin/
    ../lib/gcc/msp430-elf/4.9.1\libgcc.a(_df_to_si.o)
    dtoa.c:(.text._dtoa_r+0x31a): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__ltdf2' defined in .text.__ltdf2 section in c:/ti/gcc/bin/../lib/gcc
    /msp430-elf/4.9.1\libgcc.a(_lt_df.o)
    dtoa.c:(.text._dtoa_r+0x32a): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__mspabi_fltlid' defined in .text.__floatsidf section in c:/ti/gcc/bi
    n/../lib/gcc/msp430-elf/4.9.1\libgcc.a(_si_to_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.Loc.473.1':
    dtoa.c:(.text._dtoa_r+0x6e6): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__ltdf2' defined in .text.__ltdf2 section in c:/ti/gcc/bin/../lib/gcc
    /msp430-elf/4.9.1\libgcc.a(_lt_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.Loc.480.1':
    dtoa.c:(.text._dtoa_r+0x74a): relocation truncated to fit: R_MSP430X_ABS16 again
    st symbol `__mspabi_fltlid' defined in .text.__floatsidf section in c:/ti/gcc/bi
    n/../lib/gcc/msp430-elf/4.9.1\libgcc.a(_si_to_df.o)
    c:/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/lib\libc.a(lib_
    a-dtoa.o): In function `.Loc.498.1':
    dtoa.c:(.text._dtoa_r+0x7fa): additional relocation overflows omitted from the o
    utput
    collect2.exe: error: ld returned 1 exit status
    makefile:97: recipe for target 'demo.elf' failed
    make: *** [demo.elf] Error 1

    Regards,

    Shankar

  • Hi Shankar,


    Can you try with makefile that we attached in last post(e2e.ti.com/.../1410152)


    Regards,
    Aashish
  • Hi Aashish,

    I used your makefile with little modification , now compilation is success and out file is generated.

    Using MSP430Flasher output hex file is flashed to the board. 

    But the device is not connecting AP, even its not moving to "Device is configured in default state'  print.

    The device is getting reinitialized again and again, the log below

    =========================================================

    Getting started with station application - Version 1.0.0
    *******************************************************************************


    Getting started with station application - Version 1.0.0
    *******************************************************************************


    Getting started with station application - Version 1.0.0
    *******************************************************************************

    ...

    ========================================================

    Note: MSP430flasher command used : MSP430Flasher.exe -n MSP430F5529 -w Getting_Started.hex -v -z [VCC] 

    Attaching the makefile.

    0250.makefile.txt
    APP_NAME = Getting_Started
    OBJ      = obj
    EXE	 	 = exe
    BUILD	 = 
    
    OS		= $(shell uname -o)
    DEVICE	= msp430f5529
    CC		= msp430-elf-gcc
    OBJCOPY = msp430-elf-objcopy
    GDB		= msp430-elf-gdb
    
    ifeq ($(OS),Cygwin)
    COMPILER_INCLUDE_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include)
    COMPILER_LIBRARY_DIR = $(shell cygpath -m $(dir $(shell which $(CC)))../include)
    else
    COMPILER_INCLUDE_DIR = $(dir $(shell which $(CC)))../include
    COMPILER_LIBRARY_DIR = $(dir $(shell which $(CC)))../include
    endif
    
    MAIN_C_DIR = ../../../../examples/getting_started_with_wlan_station
    SIMPLE_LINK_STUDIO_DIR = ../../
    SIMPLE_LINK_DIR = ../../../../simplelink
    SIMPLE_STUDIO_LIB_DIR = $(SIMPLE_LINK_STUDIO_DIR)
    
    #LINKER_SCRIPT = $(APP_NAME).ld
    #LINKER_SCRIPT_PATH = ./
    LINKER_SCRIPT = $(DEVICE).ld
    LINKER_SCRIPT_PATH= $(COMPILER_INCLUDE_DIR)
    
    APP_FLAG +=  -D_USE_CLI_
    
    OBJECTS += $(OBJ)/main.o 
    OBJECTS += $(OBJ)/device.o 
    OBJECTS += $(OBJ)/driver.o 
    OBJECTS += $(OBJ)/flowcont.o 
    OBJECTS += $(OBJ)/netapp.o 
    OBJECTS += $(OBJ)/netcfg.o 
    OBJECTS += $(OBJ)/nonos.o 
    OBJECTS += $(OBJ)/fs.o 
    OBJECTS += $(OBJ)/socket.o 
    OBJECTS += $(OBJ)/spawn.o 
    OBJECTS += $(OBJ)/wlan.o 
    OBJECTS += $(OBJ)/board.o 
    OBJECTS += $(OBJ)/spi.o 
    OBJECTS += $(OBJ)/cli_uart.o
    
    INCLUDE_PATH += -I $(COMPILER_INCLUDE_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_STUDIO_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Include  
    INCLUDE_PATH += -I $(SIMPLE_LINK_DIR)/Source 
    
    CFLAGS += $(INCLUDE_PATH)
    CFLAGS += -mmcu=$(DEVICE)
    CFLAGS += -O2
    
    ifeq ($(BUILD), debug)
    CFLAGS += -g
    endif
    
    CFLAGS += $(APP_FLAG)
    LFLAGS =  -L $(LINKER_SCRIPT_PATH) -T $(LINKER_SCRIPT)
    
    all: $(OBJECTS)
    	$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(EXE)/$(APP_NAME).elf
    
    $(OBJ)/main.o: $(MAIN_C_DIR)/main.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(MAIN_C_DIR)/main.c -o $(OBJ)/main.o
    
    $(OBJ)/device.o: $(SIMPLE_LINK_DIR)/Source/device.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/device.c -o $(OBJ)/device.o
    
    $(OBJ)/driver.o: $(SIMPLE_LINK_DIR)/Source/driver.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/driver.c -o $(OBJ)/driver.o
    
    $(OBJ)/flowcont.o: $(SIMPLE_LINK_DIR)/Source/flowcont.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/flowcont.c -o $(OBJ)/flowcont.o
    
    $(OBJ)/netapp.o: $(SIMPLE_LINK_DIR)/Source/netapp.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netapp.c -o $(OBJ)/netapp.o
    
    $(OBJ)/netcfg.o: $(SIMPLE_LINK_DIR)/Source/netcfg.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/netcfg.c -o $(OBJ)/netcfg.o
    
    $(OBJ)/nonos.o: $(SIMPLE_LINK_DIR)/Source/nonos.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/nonos.c -o $(OBJ)/nonos.o
    
    $(OBJ)/fs.o: $(SIMPLE_LINK_DIR)/Source/fs.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/fs.c -o $(OBJ)/fs.o
    
    $(OBJ)/socket.o: $(SIMPLE_LINK_DIR)/Source/socket.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/socket.c -o $(OBJ)/socket.o
    
    $(OBJ)/spawn.o: $(SIMPLE_LINK_DIR)/Source/spawn.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/spawn.c -o $(OBJ)/spawn.o
    
    $(OBJ)/wlan.o: $(SIMPLE_LINK_DIR)/Source/wlan.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_DIR)/Source/wlan.c -o $(OBJ)/wlan.o
    
    $(OBJ)/spi.o: $(SIMPLE_LINK_STUDIO_DIR)/spi.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/spi.c -o $(OBJ)/spi.o
    
    $(OBJ)/board.o: $(SIMPLE_LINK_STUDIO_DIR)/board.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/board.c -o $(OBJ)/board.o
    
    $(OBJ)/cli_uart.o: $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c
    	$(CC) $(INCLUDES) $(CFLAGS) -c $(SIMPLE_LINK_STUDIO_DIR)/cli_uart.c -o $(OBJ)/cli_uart.o
    
    debug: all
    	$(GDB) $(EXE)/$(APP_NAME).elf
    
    hex : all
    	$(OBJCOPY) $(EXE)/$(APP_NAME).elf -O ihex $(EXE)/$(APP_NAME).hex
    	
    clean:
    	rm -rf $(OBJ)/* $(EXE)/$(APP_NAME).elf
    	
    

    Regards,

    Shankar

  • Hi Shankar,


    Please run in debugger mode step by step and let us know where it causing issue.

    Steps to run in debugger mode:
    1. Open one more cygwin instance or command prompt
    2. Go to msp430 gcc compile folder
    cd /cygdrive/c/gcc
    OR
    cd c:\ti\gcc
    3. Issued following command
    .\bin\gdb_agent_console msp430.dat

    It will wait for client to connect (Go to step 4)

    4. In another terminal (compilation terminal open in compilation stage) issue folllowing command
    make debug
    OR
    msp430-elf-debug exe/<app>.out
    5. The GDB process is now started and waits for commands. This is indicated by the prompt <gdb>.
    6. To connect GDB to the agent process, enter the following command on gdb prompt
    target remote :55000
    7. To load a program binary to the MSP430 target device, issue following commannd on gdb prompt
    load
    8. enter "continue" to run the programs or "n" for step by step.

    Regards,
    Aashish
  • Hi Aashish,

    I tried the above steps, still the issue is same.

    Deveice is not connecting to AP, We are getting only following messages continuously:

    ========================================================

    Getting started with station application - Version 1.0.0
    *******************************************************************************


    Getting started with station application - Version 1.0.0
    *******************************************************************************


    Getting started with station application - Version 1.0.0
    *******************************************************************************

    ========================================================

    Please see the attachment(debug.jpg) and check the debug steps are proper or not.

    Regards,

    shankar

  • Hi Shankar,


    Can you run application step-by-step (using "n" rather than c"continue") as we suggested you in last post? Or press ctrl+c and type on gdb prompt bt and post the log here.


    Regards,
    Aashish

  • Hi Aashish,

    Please find the logs after step by step debugging:

    ===================================================================================

    (gdb) target remote:55000
    Remote debugging using :55000
    _start ()
    at /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S:36
    36 /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S: No such
    file or directory.
    (gdb) load
    Loading section .rodata, size 0x45c lma 0x4400
    Loading section .text, size 0x5bce lma 0x485c
    Loading section .data, size 0x92 lma 0xa42a
    Loading section __reset_vector, size 0x2 lma 0xfffe
    Start address 0x485c, load size 24766
    Transfer rate: 6 KB/sec, 854 bytes/write.
    (gdb) n
    _start ()
    at /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S:39
    39 in /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S
    (gdb) n
    __crt0_init_bss ()
    at /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S:50
    50 /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S: No such
    file or directory.
    (gdb) n
    51 in /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S
    (gdb) n
    52 in /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S
    (gdb) n
    56 in /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S
    (gdb) n

    =======================================================

    Regards,

    Shankar

  • Hi Shankar,


    Did you executed step-by-step till you get "Getting started with station application - Version 1.0.0" on console? As I can't see any reference to uart print function call in the log. Run till execution control not return back.


    Regards,
    Aashish
  • Hi Aashish,

    Yes i executed step-by-step till the message "Getting started with station application - Version 1.0.0", but this message is displayed on teraterm not in GDB console.

    Regards,

    Shankar

  • Hi Shankar,


    When you running step-by-step gdb console should be some thing like that
    (gdb) n
    305 stopWDT();
    (gdb) n
    306 initClk


    but what I can see from your log is:
    (gdb) n
    56 in /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S


    1. Did you compiled with -g option? If not then compile with -g option
    2. Are you able to put breakpoint on gdb console (eg. "break displayBanner" )
    3. When it stuck press ctrl+c and send otput of following gdb commans
    1. bt
    2. list
    3. frame


    Regards,
    Aashish
  • Hi Aashish,

    yes I compiled the code with -g option. i took the bt,list,frame with breakpoint in displayBanner. looks like

    code is strucking inside somewhere configureSimpleLinkToDefaultState.

    Please find the logs(bt,list,frame):

    ===============================================================================

    (gdb) target remote:55000
    Remote debugging using :55000
    _start ()
    at /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S:36
    36 /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S: No such
    file or directory.
    (gdb) break displayBanner
    Breakpoint 1 at 0x4a78: file ../../../../examples/getting_started_with_wlan_stat
    ion/main.c, line 687.
    (gdb) load
    Loading section .rodata, size 0x45c lma 0x4400
    Loading section .text, size 0x5bce lma 0x485c
    Loading section .data, size 0x92 lma 0xa42a
    Loading section __reset_vector, size 0x2 lma 0xfffe
    Start address 0x485c, load size 24766
    Transfer rate: 6 KB/sec, 854 bytes/write.
    (gdb) continue
    Continuing.

    Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>)
    at ../../../../examples/getting_started_with_wlan_station/main.c:350
    350 displayBanner();
    (gdb) n
    364 retVal = configureSimpleLinkToDefaultState();
    (gdb) n

    Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>)
    at ../../../../examples/getting_started_with_wlan_station/main.c:350
    350 displayBanner();
    (gdb) n
    364 retVal = configureSimpleLinkToDefaultState();

    (gdb) bt
    #0 main (argc=<optimized out>, argv=<optimized out>)
    at ../../../../examples/getting_started_with_wlan_station/main.c:364
    (gdb) list
    359 *
    360 * Note that all profiles and persistent settings that were done on
    the
    361 * device will be lost
    362 */
    363
    364 retVal = configureSimpleLinkToDefaultState();
    365 if(retVal < 0)
    366 {
    367 if (DEVICE_NOT_IN_STATION_MODE == retVal)
    368 CLI_Write((unsigned char *)" Failed to configure the device
    in its default state \n\r");
    (gdb) frame
    #0 main (argc=<optimized out>, argv=<optimized out>)
    at ../../../../examples/getting_started_with_wlan_station/main.c:364
    364 retVal = configureSimpleLinkToDefaultState();
    (gdb)

    ==============================================================================

    Tomorrow i will try to put prints inside  configureSimpleLinkToDefaultState for further debug.

    Regards,

    Shankar

  • Hi Aashish,

    Finally the issue is resolved. Now the board is connecting to AP.

    The issue was with interrupt handle definition as we defined for Msp430GCC compiler.

    We did mistake in definition of PORT2_VECTOR interrupt handler by adding static keyword like below:

    ======================================
    __attribute__((interrupt(PORT2_VECTOR)))
    static void IntSpiGPIOHandler( void )

    ======================================

    After analyzing the changes made , we removed static as below then code started working.

    =======================================

    __attribute__((interrupt(PORT2_VECTOR)))
    void IntSpiGPIOHandler( void )

    ======================================

    Thanks Aashish for your support  and help for solving the issue.

    Regards,

    Shankar

  • Hello,

    I am seeing these same lines when starting the debugger (small difference in path: msp430-14r1-98):

    at /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S:36
    36 /opt/redhat/msp430-14r1-10/sources/tools/libgloss/msp430/crt0.S: No such
    file or directory.

    I don't think I used to see these lines, but I am also now seeing a device reset after every interrupt and cannot figure out why.  Does anyone know if this may be related?

    Adam

  • Hi Adam,

    Initially we also got same issue of device resetting after every interrupt.

    Later we came to know that the issue is because of interrupt handle definition. This issue comes if you defined interrupt handler as static.

    How you are defining the interrupt handler in msp430gcc ?

    Regards,

    Shankar

  • I'm using the native gcc syntax.  For example:

    __attribute__((__interrupt__(TIMER0_A0_VECTOR)))
    void HandlerFunction (void)

    What did you find worked? I've tried different syntax with mixed results. Ongoing web discussion indicates the syntax is currently evolving.
    What is troubling is that the previously mentioned warning did not appear originally, then when it did I started getting resets on every interrupt.


  • Hi Adam,

    I am using latest msp430gcc complier (msp430-elf-gcc) and used the following syntax: it worked for me

    __attribute__((interrupt(PORT2_VECTOR)))
    void IntSpiGPIOHandler( void )

    Regards,

    shankar

  • The two lines regarding the missing crt0.S file do not seem to matter.  My problem of interrupts causing resets was unrelated; I found it was caused by using the compiler flags -Os and -fwhole-program together in an attempt to minimize code size, causing the interrupt vectors not to load.  I'll start a separate thread on the topic.