CC3551E: hostexit.c file not found in lwip_socket() api

Part Number: CC3551E
Other Parts Discussed in Thread: SYSCONFIG,

Hi Team,

I am using SimpleLink Wi-Fi SDK 10.10.00.18 with the CC35x1 development board and the lwIP TCP/IP stack.

I have created a wrapper around lwip_socket() as shown below:

int32_t s32_WIFID_CreateSocket(int32_t _s32_domain, int32_t _s32_type, int32_t _s32_protocol)
{
    // if (!bln_wifiInitialized)
    // {
    //     return -1;
    // }

    int32_t _s32_sock = lwip_socket(_s32_domain, _s32_type, _s32_protocol);

    return (_s32_sock >= 0) ? _s32_sock : -1;
}

When lwip_socket() is called, there is below message:

hostexit.c file not found

I found hostexit.c under:

C:\ti\ti_cgt_arm_llvm_4.0.4.LTS\lib\src

However, including or referencing this file does not resolve the issue.

Is there any required initialization or configuration that must be performed before calling lwip_socket() when using the SimpleLink Wi-Fi SDK? Has anyone encountered this issue before, and what is the recommended solution?

Any guidance would be appreciated.

Regards,

Shivam

  • Hi Shivam,

    Can you refer to the ota example where you can see a successful call to lwip_socket? You can see it used in https_client.c. 

    Thanks.

  • Hi BLiu, 


    Following up on our previous discussion, I was able to resolve the earlier error. However, I am now facing a different issue with the Wlan_start() API. To help explain the problem, I'd like to provide some background and context first. 

    I am integrating the Wi-Fi library into my own FreeRTOS-based application using the CC3551 Simplelink Wifi SDK.

    I am facing an issue during Wi-Fi initialization where Wlan_Start() fails while trying to retrieve the firmware memory map.

    Inside Wlan_Start(), the following code fails at line ret = ctrlCmdFw_GetMemMap(&mem_map); :

    MemoryMap_t mem_map = {0}; 
    ret = ctrlCmdFw_GetMemMap(&mem_map); 
    if (ret < 0) 
    { 
        Report("\n\rcouldn't Get mem map"); 
        goto fail; 
    }

    The return value from ctrlCmdFw_GetMemMap() is:

    0x8000581D

    As a result, Wlan_Start() exits through the failure path and returns the same value to my application.

    Is there any recommended method to further diagnose why ctrlCmdFw_GetMemMap() is failing?

    Regards,

    Shivam

  • Hi Shivam,

    Strange that your Wlan_Start is failing; it's a fundamental API call to run all of our Wi-Fi examples. Can you try making sure that the flow of your project (up until Wlan_Start) is similar to what we have in our examples? Can you verify that the relevant "adaptation" folder that's found in the our examples is also involved in your project (contains files such as osi_dpl.c, osi_filesystem.c etc.)? 

    Finally, if none of those options work, please send us firmware logs of the device after following the instructions located here and we can take a closer look:

    Thanks.

  • Hi BLiu,

    The adaptation folder is already included in our project, and the overall flow is similar to TI's network_terminal example. Below is the project flow:

    main()
             |
            +-- Board_init()
             |
            +-- Create InitTask
             |
            +-- vTaskStartScheduler()
                                |
                               +-- vfn_InitTask()
                                |
                               +-- vfn_SPID_Init()
                                |
                                +-- h_MPUART_Init()
                                |
                               +-- vfn_WIFID_Init()
                                              |
                                              +--network_stack_init()
                                              |
                                             +-- Wlan_Start()

    I also attempted to capture the firmware logs using the Logger tool, but I encountered the following error in Wireshark:

    Lua Error: C:\Program Files\Wireshark\plugins\wlogger_dissector.lua:37: bad argument #3 to 'newindex' (string expected, got nil) [Expert Info (Error/Dissector bug): Lua Error: C:\Program Files\Wireshark\plugins\wlogger_dissector.lua:37: bad argument #3 to 'newindex' (string expected, got nil)] Lua Traceback

    Could you please check whether this is due to a compatibility issue or if there is something incorrect in my Logger/Wireshark setup?

    For reference, my software versions are:

    • SimpleLink Wi-Fi Toolbox: simplelink_wifi_toolbox_win_4_1_16
    • Wireshark: 4.6.6
    • SimpleLink Wi-Fi SDK: 10.10.0.18
    • SysConfig: 1.27.1


    Regards

    Shivam

  • Hi Shivam, 

    Can you switch to these settings instead?

    Additionally, that SDK version uses SYSCFG 1.26.3. Please switch to that to rule out any issues on that front.

  • Hi BLiu,

    I tried parsing the logs as per the instructions you shared in your previous reply. However, I couldn't find the logger.bin file in the location shown in your screenshot. Instead, I found it at the following path:

    C:\ti\simplelink_wifi_toolbox_win_4_1_16\radio-tool\binaries\CC3551E\logger.bin

    I used this logger.bin file along with the device part number as the custom parser file. However, I am still encountering the same error in Wireshark.



    I have changed my syscfg version to 1.26.3. Could you please let me know if there is anything else I should verify?

    Regards,

    Shivam

  • Hi Shivam,

    Two more things (may not be related to that error but I need to double check):

    Can you make sure that logger isn't disabled in SYSCFG / conf.ini in your project?

    If you run wlan_start, do you still get 0 prints?

  • Hi BLiu,

    Initially, the logging module was disabled in SysConfig. I have since enabled the logger with default settings (as shown in the attached screenshot).

    However, despite enabling the logger, no debug prints or log packets are being captured in Wireshark. Yes even if i run wlan_start i am getting 0 prints.

    Regards,

    Shivam

  • Hi Shivam,

    You'll want to make sure that the final cc35xx-conf is 00 for disable logger. This is not related to the UART settings you configured. If that's still the case then I'll need to look into that further. Thanks.

  • Hi BLiu,

    It is 00 for disable logger in  cc35xx-conf file, below is the screen shot:

    Regards,

    Shivam

  • Hi Shivam,

    I am getting the same error as you, but it is not preventing me from getting logs:

    Here is my physical setup as well. Do you have FTDI drivers installed? I'm using an FTDI cable for this operation.