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.

Unable to get SmartConfig code working on CC3200 Launchpad

Other Parts Discussed in Thread: UNIFLASH, CC3200, CC3100, CC3200SDK, MSP430F6736

I have copied the blinky and the provisioning examples into my own code style and toolchain (I use a makefile with arm-none-eabi-gcc). Funtionally, my code is the same (same function calls, same order) I just changed some variable names to something I'm more familiar with.

The blinky example compiles and works great. Using a Windows VM I was able to flash using UniFlash and the whole process was fairly painless.

The SmartConfig provisioning example compiles and loads (using the debugger with the SOP2 header installed). I get my start up message and then nothing. I step through the code and find it hangs inside the very first call to sl_Start(0, 0, 0). More specifically it hangs in OSI_RET_OK_CHECK(sl_LockObjLock(&g_pCB->ProtectionLockObj, SL_OS_WAIT_FOREVER));

Other posts relating to the CC3100 suggest problems with the SPI or interrupts. As I'm using the example code and the CC3200, I figure this would be taken care of by the libsimplelink_nonos.a and libdriver.a without me needing to do anything special with the SPI.

I can compile and flash the getting_started_with_wlan_station with no issues (all of the LEDs light up!). I can also compile and run the tcp_socket example and it successfully connects to the AP (I don't bother testing the functionality of TCP here).

Can anyone suggest something I might have missed in my makefile? I've attached the build output in case I missed a define.

make -C /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib/gcc
make[1]: Entering directory '/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib/gcc'
  CC    ../adc.c
  CC    ../aes.c
  CC    ../camera.c
  CC    ../cpu.c
  CC    ../crc.c
  CC    ../des.c
  CC    ../flash.c
  CC    ../gpio.c
  CC    ../hwspinlock.c
  CC    ../i2c.c
  CC    ../interrupt.c
  CC    ../i2s.c
  CC    ../pin.c
  CC    ../prcm.c
  CC    ../sdhost.c
  CC    ../shamd5.c
  CC    ../spi.c
  CC    ../systick.c
  CC    ../timer.c
  CC    ../uart.c
  CC    ../udma.c
  CC    ../utils.c
  CC    ../wdt.c
  AR    exe/libdriver.a
make[1]: Leaving directory '/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib/gcc'
make -C /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/gcc target=NONOS
make[1]: Entering directory '/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/gcc'
  CC    ../cc_pal.c
  CC    ../source/device.c
  CC    ../source/driver.c
  CC    ../source/flowcont.c
  CC    ../source/netapp.c
  CC    ../source/netcfg.c
  CC    ../source/nonos.c
  CC    ../source/fs.c
  CC    ../source/socket.c
  CC    ../source/spawn.c
  CC    ../source/wlan.c
  AR    exe/libsimplelink_nonos.a
make[1]: Leaving directory '/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/gcc'
mkdir -p build/
arm-none-eabi-gcc src/main.c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -c -o build/main.o
mkdir -p build/vendor/example/common/
arm-none-eabi-gcc /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common/gpio_if.c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -c -o build/vendor/example/common/gpio_if.o
mkdir -p build/vendor/example/common/
arm-none-eabi-gcc /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common/uart_if.c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -c -o build/vendor/example/common/uart_if.o
mkdir -p build/vendor/example/common/
arm-none-eabi-gcc /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common/udma_if.c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -c -o build/vendor/example/common/udma_if.o
mkdir -p build/vendor/example/common/
arm-none-eabi-gcc /home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common/startup_gcc.c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -c -o build/vendor/example/common/startup_gcc.o
mkdir -p output
arm-none-eabi-gcc build/main.o build/vendor/example/common/gpio_if.o build/vendor/example/common/uart_if.o build/vendor/example/common/udma_if.o build/vendor/example/common/startup_gcc.o -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp  -Dgcc -Wall -Werror -g -std=gnu99 -O0 -flto -ffunction-sections -fdata-sections -fno-builtin -Isrc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/inc -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/include -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/source -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/oslib -I/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/example/common -Wl,--entry=ResetISR -L/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/simplelink/gcc/exe -ldriver -L/home/dan/projects/ARM/lib/CC3200SDK_1.0.0/cc3200-sdk/driverlib/gcc/exe -lsimplelink_nonos --specs=nano.specs -lc -lnosys -Tprovisioning.ld -Wl,--gc-sections -Wl,-Map=provisioning.map -o output/provisioning.axf
arm-none-eabi-objcopy -O binary output/provisioning.axf output/provisioning.bin

  • I have since recompiled with a newer version of GCC (gcc version 4.8.4 20140725 instead of gcc version 4.8.4 20140526) and this seems to make a difference. I now get stuck at 'OSI_RET_OK_CHECK(sl_SyncObjWait(&g_pCB->ObjPool[ObjIdx].SyncObj, SL_OS_WAIT_FOREVER));'

    The compiler seems to make a huge difference. Using gcc version 4.9.2 (Arch Repository) results in an entirely different issue where it crashes at the first call to _svfprintf_r. Compiling the tcp_socket demo with this same compiler works great. I'm sure there's an error in my Makefile somewhere...

    Judging by my compiler output, is there anything I've missed?

  • The problem was due to poor initialiastion code. I made my own "BoardInit" and "PinMuxConfig". When I made the blinky example, relocating the vector table seemed to make no difference (and gcc wasn't defined) so I removed it. Bad idea!

    As shown in getting_started_with_wlan_station, this is still needed. I added the code to do this back into my code and it works! I don't think it's likely for anyone else to miss such a thing, but hopefully they stumble upon this thread.

  • Hi Dan,
    It seems like I'm having the same problem.

    I also deleted the vectors because some of them got me compiling errors.
    Did you meant this vectors?:
    #pragma vector=WDT_VECTOR, TIMER2_A0_VECTOR, ADC12_VECTOR, USCI_B1_VECTOR, \
    TIMER1_A0_VECTOR, TIMER1_A1_VECTOR, TIMER0_A1_VECTOR, TIMER0_A0_VECTOR, \
    TIMER2_A1_VECTOR, COMP_B_VECTOR, USB_UBM_VECTOR, UNMI_VECTOR,DMA_VECTOR, \
    TIMER0_B0_VECTOR, TIMER0_B1_VECTOR,SYSNMI_VECTOR, USCI_B0_VECTOR, RTC_VECTOR

    if not, can you show me the code that was missing at your project?

    p.s

    I'm using Code Composer Studio with MSP430F6736 and CC3100


    thanks in advance,
    Hadar