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.

Adding AP provisioning to project using TI-RTOS

Other Parts Discussed in Thread: CC3200, CC3200SDK

I am trying to bring the new TI AP provisioning into my project which uses TI-RTOS and am having errors I do not understand.

Background: I started with a CCS project that would build and run TI’s version of Amazon SDK’s subscribe_publish_sample example application. This uses TI-RTOS. I added code from the main.c file of TI’s provisioning_ap example (after updating my SDK with “SimpleLink Wi-Fi CC3200 Provisioing Add-on” that was recently released). This provisioning_ap example does not use TI-RTOS. I’ve worked through several issues by modifying include paths and libraries, but am now stuck with errors I do not understand.

The issues I’m seeing are stated as “unresolved symbols” in .obj files, but when looking at the respective .c files it seems the symbols are declared correctly. Specifically, these are the errors I’m stuck with:

unresolved symbol _SlNonOsSemGet, first referenced in C:/TI/CC3200SDK_1.2.0/cc3200-sdk/simplelink_extlib/provisioninglib/ccs/Release/provisioninglib.a<provisioning_logic.obj>
unresolved symbol _SlNonOsSemSet, first referenced in C:/TI/CC3200SDK_1.2.0/cc3200-sdk/simplelink_extlib/provisioninglib/ccs/Release/provisioninglib.a<provisioning_logic.obj>
unresolved symbol Report, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_DeInit, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_Init, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_InterruptClear, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_IntSetup, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_Start, first referenced in ./Provisioning.obj
unresolved symbol Timer_IF_Stop, first referenced in ./Provisioning.obj

(Note that Provisioning.c is where I’ve placed the code from main.c of provisioning_ap example).

 

The first two errors I do not understand as I cannot find anywhere that SlNonOsSemGet or SlNonOsSemSet are referenced in my entire workspace other than the project output files linkInfo.xml and .map. When looking at the provisioning_ap example, I see it also only shows up in the linkInfo.xml and .map file. Where are these functions coming from and?  I assume I don't want them in my project as they are "nonos".

The third error (Report) comes from UART_PRINT statements. In common.h, there is statement “#define UART_PRINT Report”. This Report function is declared in uart_if.h. I have both common.h and uart_if.h in the #includes at the top of my provisioning.c file. It seems to be linked just fine (right clicking on statement and hitting “open declaration” links correctly), so I don’t understand why this error shows.

The remaining errors (TIMER_IF…) are all defined in timer_if.h.  I have timer_if.h in my #includes at the top of my provisioning.c file. They also seem to be linked just fine using the "open declaration", so I don't understand why these show up as errors.

I would greatly appreciate some clarification on why these errors are showing up in my output files even though everything seems fine in my .c/.h files and what actions I can take to resolve the issues.

Kind Regards,
-Jon

 

 

  • FYI, I'll attach my project include and linker settings:


  • I integrated the new provisioning into my own workspace and ran into similar issues.  Eventually, I just merged the new provisioning lib code into my own code base, but when I had them as separate projects I needed to make sure I had the USE_TIRTOS defined my provisioninglib project.  This should prevent the nonos calls.

    Then, it looked like provisioinlib was just using the timer as  delay, so I swapped out all the calls to timer related functions to osi_Sleep, which is the method I'm generally using as a sleep (I made sure that the task that calls provisionlib is one of the highest priority ones).  

    Things are generally working for me now, though I think I'll need to continue to refine further.

    Also, be careful when using printf to debug--since the printf's actually temporarily suspend the chip, this can screw up the connectivity between your phone and board (I think).

    Take care,

    Mark

  • Thanks for the input Mark, but I'm now having problems getting provisioning_ap to build with USE_TIRTOS added to my predefined symbols.  Looks like this only used in provisioning_ap, not in provisioninglib, but I added the predefine in both projects just in case.

    I found I had to add an include path to "${CC3200_SDK_ROOT}/oslib" to the provisioning_ap project so that #include osi.h would work, however now when I try to build it gives me an unresolved symbol "osi_InterruptRegister" in gpio_if.obj.  The #include osi.h is at the top of gpio_if.c, and again the "open declaration" command does correctly map to the function in osi.h.  Is there anything outside of adding the osi include path to the project that I need to do?


    -Jon

  • Hmm, sorry, I don't remember running into that one...

    Mark

  • TI Support, I'd kindly request some advice here. 

    Please comment if Mark is pointing me in the right direction (it sounds like he is, but not sure where to go now that the library itself won't build)

    Assuming I do indeed need to rebuild provisioning_ap project with USE_TIRTOS definied, here's some more details on trying to do this:

    Here is my provisioning_ap project settings (only modification was to add SDK_ROOT/oslib)

    Here is my problems/console windows:

    I compared this project to example project oslib (which includes the osi.h, but builds correctly) to see if I could figure this out, but I was unsuccessful.  I found oslib does not have any linker settings, and I do not understand what that means.  I did find the definition of the missing function osi_InterruptRegister was in a file in the oslib project, osi_tirtos.c.  I tried to copy&paste this in my provisioining_ap project but came across many issues.  I also tried to add library search path to the oslib project, but again came across several issues.

    I'm not sure which path to follow here and would greatly appreciate advice on what you recommend.

  • A quick update:
    I found the same issue occurs when I try to build the provisioning_smartconfig project with USE_TIRTOS in the pre-defined symbols.
    I installed CCS, TI-RTOS, and the CC3200 SDK onto a new machine and found the same exact issues.

    It seems odd that I need to add an include path when I try to build for TI-RTOS (because it cannot find osi.h without adding CC3200_SDK_ROOT/oslib to include paths). Am I supposed to be doing something different than adding USE_TIRTOS to predefined symbols (Build->Arm Compiler->Advanced)? I was expecting to see two build configurations for these projects, but there seems to only be a "Release" configuration.
  • In the above build logs, it seems, you are linking with non-os simplelink library. Please make sure, you are linking with OS enabled libraries (provisioning_lib, simplelink).

    Did, you try with nacent SDK1.2 builds, with out any modifications. And did it work for you?

    Thanks
  • Thank you for the response Hari.

    First, to respond to your question, I am able to build the original SDK1.2 build of provisioning libraries (without USE_TIRTOS defined).

    Thank you for pointing out I had to change the simplelink.a library file path to use the OS version.  I have updated the library search path to use the OS version of simplelink.a and gotten past the previous issue (along with a few others), but am stuck with two issues I'm not sure how to resolve.

    The first issue is undefined symbol "_SlNonOsSemGet", referenced in Workspace/provisioninglib/Release/provisioninglib.a<provisioning_logic.obj>   I see this function is listed inside the .obj file, but when I look at provisioning_logic.c, I don't see any reference to this function. Also, I do not see any way of rebuilding the provisioninglib project for use with an OS.  Is there something I'm missing to allow provisioninglib project to be built for use with TI-RTOS?

    The second issue is there are some issue resolving functions inside the new simplelink.a library, such as osi_InterruptDeRegister.  Is there something else I need to add to my project to allow osi function calls to resolve? (or this may just be due to the error above when trying to bring in provisioninglib.a)

    Thank you,
    -Jon

  • TI support, can you follow up on these questions? My project is stalling due to not being able to get provisioning working for an RTOS project. I need help in understanding why these issues are showing up when trying to build your library for RTOS and how I can resolve them. Please let me know if you are reproducing the issues on your end and are working to resolve them.
  • Sorry for the delay in getting back.. Since, you are using in RTOS environment, Please ensure, you have all the libraries (simplelink, provisoining) and the applicaiton built with the symbol, 'SL_PLATFORM_MULTI_THREADED' defined in your make files. Thanks

  • Hari,

    I did have SL_PLATFORM_MULTI_THREADED defined in simplelink and the provisioning_ap projeccts.  I don't see anywhere in provisioninglib that uses this, but I went ahead and defined it there and rebuilt all three projects.  I find no difference, the example project provisioning_ap still contains the same build errors.

    Are you able to build the provisioning_ap example project with USE_TIRTOS defined on your computer?

  • I'm now approaching the issue with a different approach.  Rather than trying to debug the provisioning_ap example project, I'm starting an empty RTOS project and adding in some of the provisioning API calls.  So far I'm not seeing the provisioninglib issue, but have gotten stuck with a separate issue.  Perhaps this is easier to debug.


    There are errors stemming from redefinitions.  Here is a sample from the error message:

    error #10056: symbol "osi_MsgQDelete" redefined: first defined in "C:/ti/tirtos_cc32xx_2_16_01_14/products/tidrivers_cc32xx_2_16_01_13/packages/ti/drivers/lib/drivers_wifi_cc32xxware.aem4<osi_tirtos.oem4>"; redefined in "C:/ti/CC3200SDK_1.2.0/cc3200-sdk/oslib/ccs/ti_rtos/ti_rtos.a<osi_tirtos.obj>"

      It sounds like my project is pulling in osi_tirtos from two different locations, one from the RTOS directory and one from the SDK directory. I tried removing the SDK path, but find issues as osi.h cannot be found without that include.  So I'm looking to remove the RTOS directory instead, but it isn't in my include paths.

    See picture below of my project properties.  Notice on the left that my project, "Prov_Template", shows path "C:/ti/tirtos_cc32xx_2_16_01_14/products/tidrivers_cc32xx_2_16_01_13/packages" is part of the includes.  But it's not listed in my project properties->build->Include options (shown on the right). 

    I don't know how to remove this RTOS path since it isn't in include paths.  So my question is how is this 'RTOS/packages' include path showing up in my project if it's not part of my project settings?  And what would you recommend I try to resolve my error message above?

  • Hari, do you have any update for me on getting TI's AP provisioning to work with TI-RTOS?

    At this point I'm not getting anywhere with support on pulling provisioninglib into a project with TI-RTOS and am considering avoiding the library all together. What is special about the sl_extlib_ProvisioningStart() function compared with simply forcing switch to AP mode, then looking for an added profile to switch back to station mode?

    I've currently got the following code, which doesn't work using TI's Simpllink Starter Pro smartphone app, but does work when manually entering in network credentials on the mysimplelink.net profile page and pressing 'add'.

    //CodeStart for AP-mode provisioning

    //Change to AP mode
    sl_WlanSetMode(ROLE_AP);
    //Restart network processor
    sl_Stop(0);
    sl_Start(0, 0, 0);

    //Look for new profile to be added (assuming none are stored). This doesn't seem to be an ideal check, but does work
    profileFound = false;
    profile_SSID[0] = NULL;
    while(false == profileFound){
    for(i = 0;i<7;i++){
    sl_WlanProfileGet (i, profile_SSID, &profile_SSID_length, profile_MAC, &secParams, &secParamsExt, &savedPriority);
    if(profile_SSID[0] != NULL){
    profileFound = true;
    }
    }
    Task_sleep(500);
    }

    //Profile has been found after while loop exit. Set to station mode with auto-connect enabled
    setStationMode();



    Am I missing any important functionality/error handling with bypassing TI's provisioning library?