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.

CC3120: _SlNonOsSemGet() compilation error.

Part Number: CC3120
Other Parts Discussed in Thread: CC3100

Hello Team,

Could I directly use the CC3100 sl_SyncObj/sl_LockObj implementation of non os environment for CC3120 or We will have to do some changes? 

I have just copied sl_SyncObj/sl_LockObj implementation from CC3100 into CC3120 for nonos environment (nonos.h/nonos.c) and compile it and got error on this part of code (inside of function _SlNonOsSemGet).

It is showing error that IsCmdRespWaited and _SlNonOsMainLoopTask() undefined. So I have changed "IsCmdRespWaited" (CC3100) by WaitForCmdResp (CC3120) and also changed "_SlNonOsMainLoopTask()"(CC3100) by "_SlNonOsHandleSpawnTask()"(CC3120) then code properly compiled. Do you confirmed that what I did changes will work on CC3120 without any problem or is there any more changes required?

/* If we are in cmd context and waiting for its cmd response
* do not handle spawn async events as the global lock was already taken */
if (FALSE == g_pCB->IsCmdRespWaited)
{
(void)_SlNonOsMainLoopTask();
}

Kindly help me out.


Regards,
Shubham Kant Dubey

  • Hello,

    Please note that the implementation between CC3100 and CC3120 in terms of SDK has been changed completely.

    With CC3120, the SDK uses the same methodology for all RTOS, including non-RTOS.

    The non-RTOS uses a SW layer that is called DPL. You can see it in the CC3120 SDK and its WiFi plugin.

    If you intend to port your appliaction, I suggest you move to the new SDK.

    The process you mentioned might work but I cannot guarantee.

    Regards,

    Shlomi

  • Hello Shlomi,

    I think you did not get my question, I am porting host driver of CC3120 to STM32 for non rtos environment, but I got compilation error that sl_SyncObj/sl_LockObj are not defined. So I asked question on e2e forum how to implement these os adaption layer (sl_SyncObj/sl_LockObj ) for non rtos environment then I got answer that you can use CC3100 SDK method for implementing sync and locking objects (e2e.ti.com/.../690115).

    So I have copied sl_SyncObj/sl_LockObj implementation from CC3100 into CC3120 for nonos environment as mentioned in this thread e2e.ti.com/.../690115.

    I need to know that it will work properly or not?

    Kindly help me out.

    Thanking You

    Regards,

    Shubham

  • Hello,

    You mentioned CC3100 so I figured you are trying to port it from the older SDK.

    In thsi case, Michael's response looks OK and the code adaptation also goods good.

    I do not see an issue with this implementation.

    Regards,
    Shlomi

  • Thanks Shlomi for you response.

    I got my answer.


    Regards,
    Shubham Kant Dubey