LP-EM-CC35X1: LP-EM-CC35X1 Debug and UniFlash SWD connection failure (Error -614) when loading at_commands example

Part Number: LP-EM-CC35X1
Other Parts Discussed in Thread: CC3551E, SYSCONFIG, UNIFLASH, LP-XDS110ET,

Hi TI team,

I recently purchased two evaluation kits from the TI website:

  • LP‑EM‑CC35X1 Rev A

  • LP‑XDS110ET

Both Type-C ports on the boards are connected to my PC.

My goal is to run the AT command example on the EVK to verify basic Wi-Fi functionality before developing my own Wi-Fi module based on CC3551E.

However, I am encountering issues when trying to debug or access the target memory.

Development Environment

CCS : 20.4.0.13_1.10.0
SDK : 9.22.00.15
SysConfig : 1.26.2
Project : examples/rtos/LP_EM_CC35X1/demos/at_commands
UniFlash : 9.4.0.5538

Compile Result in CCS

The project builds successfully in CCS.

Full compile log:

[177]Building target: "at_commands_LP_EM_CC35X1_freertos_ticlang.out"
[178]Invoking: Arm Linker
...
[180]Finished building target: "at_commands_LP_EM_CC35X1_freertos_ticlang.out"
[181]**** Build finished ****


Debug Failure in CCS

When I run Debug Project, the program fails to load to the target.

Debug log:

CS_DAP_0: FlashDeviceOsprey:: Flash loader: CC35xx_FLASH_LIBRARY_VERSION 1.2.0.13
CS_DAP_0: FlashDeviceOsprey:: FlashDeviceOsprey.cpp last changed: Nov 10 2025 18:48:17
File Loader: Verification failed: Could not write 0x14002000: target is not connected
GEL: File: ...\at_commands_LP_EM_CC35X1_freertos_ticlang.out: Load failed.

UniFlash Test

I then tried UniFlash to check the device.

UniFlash is able to detect the EVK, but when attempting to read memory I get the following error:

Error connecting to the target:
(Error -614 - (3:16:1))
The target indicates there is an error condition from a previous SWD request.
Clear the error condition, and try the SWD request again.
(Emulation package 20.4.0.3756)
Question

Could you please advise how to resolve this issue?

Specifically:

1.Why does UniFlash report SWD error -614 when reading memory?

2.Is there any additional configuration required for LP-EM-CC35X1 Rev A with LP-XDS110ET before debugging or flashing?

EVK configuration screenshot:

image.png

Thanks,

Sheng

 

  • Hi Sheng,

    Can you please provide more information on your toolbox setup?

    • What version of the Simplelink WiFi Toolbox are you using?
    • What flash device was chosen?
    • Do these settings match your settings in at_commands.sysconfig under Memory Map?

    I believe this error occurs when either the incorrect flash device is selected or if there is a mismatch between the toolbox and the .sysconfig file. IS25WJ064F should be the correct flash device. I would recommend using the toolbox to load the default images and full flash erase before programming, then ensuring everything is correct in .sysconfg file before flashing the at_commands example.

    Let me know if this removes the error you are seeing!

    Best Regards,

    Josh Prushing

  • Hi Josh,

    • What version of the Simplelink WiFi Toolbox are you using?

                ->wifi_toolbox_win_4_1_8

    • What flash device was chosen?

                ->The memory map setting in at_commands.syscfg is set to "IS25WJ064F".

    • Do these settings match your settings in at_commands.sysconfig under Memory Map?

                ->For hardware, I am using the TI LP-EM-CC35X1. 

                   I downloaded and installed the SDK from the official website without any modification, except upgrading SysConfig.

                   How can I use the toolbox to load a preset image and completely erase the flash memory?

                   

    Thanks,

    Sheng

  • Hi Sheng,

    You can activate by SDK Example Key, choose IS25WJ064F for the flash device, and select no PSRAM. Don't enable OTA or custom memory map. After this, click start and you should try to "Load Default Images", enable Full flash erase before programming, then program the device. 

    On this page, you can upload a .out file under the Vendor Image section to bypass needing to flash the device through CCS, but it would be beneficial to understand if you can flash through CCS after loading the default image and clearing the flash.

    Please let me know if this allows you to flash the device through CCS!

    Best Regards,

    Josh Prushing

  • Hi John,

    You can activate by SDK Example Key, choose IS25WJ064F for the flash device, and select no PSRAM. Don't enable OTA or custom memory map.

    ->Following the steps above, will see "Device Deactivated".

       If select "Memory Validation Test", choose "IS25WJ064F" for flash, and no check PSRAM, the board appears to be working properly.

       I have compiled the images into a PDF; please download it from the link below.

    https://drive.google.com/file/d/1F5-PLKM3FUDrsQ7U7WmGdGexbBXRNrOw/view?usp=sharing

    Thanks,

    Sheng

  • Hi Sheng,

    Thank you for the picture references.

    Please click Activation -> Do not use in band under Flash Reset Type. You should then be able to Activate your device by clicking the bottom right button.

    After this, you will need to do initial programming, but the defaults will be sufficient for you, so you can just click 'Program' in the bottom right. After that, you should complete activation after clicking the 'Done' button.

    You should be able to flash your device through CCS now. If you run into further problems even after activation, you can try the steps outlined in my previous posts. Let me know if you still see any issues.

    Best Regards,

    Josh Prushing

  • Hi John,

    I am currently working with the LP-EM-CC35X1 together with the LP-XDS110ET to evaluate the CC3551E.

    After following the previously suggested steps, I am still encountering two issues and would appreciate your guidance.

    1. Unable to program the device using CCS

    I followed the recommended procedure in WiFi Toolbox:

    1. Select “Load Default Images”

    2. Enable “Full Flash Erase Before Programming”

    3. Click “Program”

    After completing these steps, I attempted to load my compiled firmware again using Code Composer Studio, but the programming process still fails and I am unable to flash the application from CCS.

    CCS error log:

    CS_DAP_0: FlashDeviceOsprey:: Flash loader: CC35xx_FLASH_LIBRARY_VERSION 1.2.0.13
    CS_DAP_0: FlashDeviceOsprey:: FlashDeviceOsprey.cpp last changed: Nov 10 2025 18:48:17
    File Loader: Verification failed: Could not write 0x14002000: target is not connected
    GEL: File: C:\Users\User\workspace_ccstheia\at_commands_LP_EM_CC35X1_freertos_ticlang\Debug\at_commands_LP_EM_CC35X1_freertos_ticlang.out: Load failed.

    2. AT command example stops at “received ROM init complete”

    As an alternative, I used WiFi Toolbox to program the compiled at_commands project to the board.

    However, when executing the command:  "AT+WlanStart"

    the console output stops at: "received ROM init complete" , and the system does not continue any further.

    I would like to ask:

    Could this behavior be caused by an issue during the flashing process when using WiFi Toolbox?

    Or is it possible that there is a problem with how the at_commands project was compiled or configured?

    My goal is to first verify the basic Wi-Fi functionality using the AT command example on the EVK before proceeding with development of my own Wi-Fi module based on CC3551E.

    Any advice or troubleshooting suggestions would be greatly appreciated.

    Thanks,

    Sheng

  • Hi Sheng,

    This is very strange, as the process above runs at command example with no issues for me. Please give me until the middle of next week to try and replicate this error. 

    Best Regards,

    Josh Prushing

  • Hi John,

    I've recorded two methods for flash firmware, hoping they'll help you troubleshoot the problem.

    WiFi Toolbox:

    https://drive.google.com/file/d/1q09DV8fmkjEHXANBckXk_aZ-jUgj0cwg/view?usp=sharing

    Flash via CCS:

    https://drive.google.com/file/d/1SrQ8oDn4fWfGmYRLwHhqTCsEPyn2xvUr/view?usp=sharing

    Thanks,

    Sheng

  • Hi Sheng,

    Thanks for the videos, this is very helpful!

    Can you try downgrading to 9.21.00.15 SDK? The functionality should be the same, and I personally have seen less errors in this version.

    I was finally able to reproduce the error you are seeing, so I can look into how to resolve this and hopefully get you back to using the 9.22.xx.xx SDK soon!

    Best Regards,

    Josh Prushing

  • Hi Sheng,

    One thing to verify - can you locate your osi_filesystem.c file and show me what your #include statements look like? I found that my file was outdated and updating it resolved my errors when flashing through CCS.

    Best Regards,

    Josh Prushing

  • Hi John,

    Can you try downgrading to 9.21.00.15 SDK? 

    ->I'll try again and let you know the result.

    Please refer to the following:

    #include <osi_kernel.h>

    #include "ti/common/nv/nvintf.h"
    #include "ti/common/nv/nvocmp.h"
    #include "ti_flash_map_config.h"

    /*
     * Copyright (c) 2024, 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.
     */
    #include <osi_kernel.h>
    
    #include "ti/common/nv/nvintf.h"
    #include "ti/common/nv/nvocmp.h"
    #include "ti_flash_map_config.h"
    
    
    /*!
        \brief the below functions are needed for file management of the upper mac.
               currently only supported file is the WiFi part firmware bin file.
               in the sitara AM243x launchpad, the firmware bin is saved in a specific flash offset.
    
               those functions are redirected from fxxx to osi_fxxx in the linker command (--symbol_map=fread=osi_fread).
               if already have system that use fopen fclose fread etc. this file should not be compiled in.
    */
    #define ATTRIBUTE __attribute__ ((used))
    #define NVID_BLE_OUR_SEC_OFFSET_IN_FLASH (0x1)
    #define NVID_BLE_PEER_SEC_OFFSET_IN_FLASH (0x2)
    #define NVID_BLE_CCCD_OFFSET_IN_FLASH (0x3)
    
    #define NVID_WLAN_CONNECTION_POLICY_OFFSET_IN_FLASH (0x4)
    #define NVID_WLAN_PROFILES_OFFSET_IN_FLASH (0x5)
    #define NVID_WLAN_FAST_CONNECT_OFFSET_IN_FLASH (0x6)
    
    #define GPE_MANIFEST_IMAGE_START_OFFSET (0xFFC)
    #define GPE_MANIFEST_INTEGRITY_LEN      (0x10)
    #define GPE_HEADER_MAGIC_NUM            (0x690c47c2)
    #define GPE_PROTECTED_TLV_MAGIC_NUM     (0x6908)
    #define CONF_BIN_TLV_TYPE               (0x00B2)
    #define GPE_MANIFEST_TLV_TYPE           (0x00A0)
    
    typedef enum
    {
        OSI_FILE_CONNECTIVITY_FW_SLOT_1,
        OSI_FILE_CONNECTIVITY_FW_SLOT_2,
        OSI_FILE_CONF,
        OSI_FILE_RAMBTLR,
        OSI_FILE_BLE_OUR_SEC,
        OSI_FILE_BLE_PEER_SEC,
        OSI_FILE_BLE_CCCD,
        OSI_FILE_WLAN_CONNECTION_POLICY,
        OSI_FILE_WLAN_PROFILE,
        OSI_FILE_WLAN_FAST_CONNECT,
    }osiInternalType_e;
    
    typedef struct
    {
        osiInternalType_e ftype;
        void *ptr;
    }osiFileP_t;
    
    typedef struct
    {
        uint32_t ihMagic;
        uint32_t ihLoadAddr;
        uint16_t ihHdrSize;
        uint16_t ihProtectTlvSize;
        uint32_t ihImgSize;
        uint32_t ihFlags;
    } gpeManifestHeader_t;
    
    typedef struct
    {
        uint16_t itMagic;
        uint16_t itTlvTot;
    } gpeTlvInfo_t;
    
    typedef struct
    {
        uint16_t itType;
        uint16_t itLen;
    } gpeTlvManifestHeader_t;
    
    typedef struct
    {
        uint16_t itType;
        uint16_t reserved;
        uint32_t tlvTablePointerShift;
    } gpeTlvManifestTableLine_t;
    
    typedef struct
    {
        uint16_t itType;
        uint16_t itLen;
    } gpeTlvHeader_t;
    
    #define IS_OSI_FILE(osiFileType) ((osiFileType) == OSI_FILE_BLE_OUR_SEC || \
                                        (osiFileType) == OSI_FILE_BLE_PEER_SEC || \
                                        (osiFileType) == OSI_FILE_BLE_CCCD || \
                                        (osiFileType) == OSI_FILE_WLAN_CONNECTION_POLICY || \
                                        (osiFileType) == OSI_FILE_WLAN_PROFILE || \
                                        (osiFileType) == OSI_FILE_WLAN_FAST_CONNECT)
    
    XMEM_Handle        fwHandle;
    XMEM_Handle        confFileHandle;
    NVINTF_nvFuncts_t *nvFptrs  = NULL;
    uint32_t           Fwslot   = OSI_FLASH_CONNECTIVITY_FW_SLOT_1;
    uint32_t           FwGpeDataOffset = 0x101c;
    uint32_t           confGpeDataOffset = 0;
    
    
    /******************************************************************************
    
        NAME:        getProtectedTlvManifestHdr
    
        DESCRIPTION: This function gets the offset to the protected TLV manifest
                     zone within a flash GPE.
    
                     Following is a detailed description of a GPE (General
                     Purpose Entity) slot layout and the offset this function
                     returns.
    
                            ┌────────────────────┬────►Image
                            │       Blank        │     Start
                            ├────────────────────┤
                            │    GPE Manifest    │
                            │     Integrity      │
                            ├────────────────────┤                                     
                            │    GPE Manifest    │
                            │                    │
                            │                    │
                            ├────────────────────┤
                            │                    │                                     
                            │    GPE Container   │
                            │                    │
                     GPE    │                    │
                     Slot   ├────────────────────┼──────────────────┐
                            │    GPE Protected   │   GPE TLV info   │
                            │      TLV Zone      │     tlv_info     │
                            │                    ├──────────────────┤◄─────┐
                            │                    │ GPE Manifest TLV │      │
                            │          .         │   manifest_tlv   │     Get
                            │          .         ├──────────────────┤     Here
                            │          .         │         .        │
                            │                    │         .        │
                            │                    │         .        │
                            ├────────────────────┼──────────────────┘
                            │          .         │
                            │          .         │
                            │          .         │
                            └────────────────────┘
                     Note: We assume that the GPE header magic number is correct.
    
        PARAMETERS:  flashHandle     [Input] - Handle to GPE flash slot.
                     tlvManifestHdr [Output] - Pre-allocated buffer to hold the
                                               result TLV manifest header.
                     hdrOffset      [Output] - Manifest TLV offset in GPE layout.
    
        RETURNS:     0 upon success, negative value otherwise.
    ******************************************************************************/
    int32_t getProtectedTlvManifestHdr(XMEM_Handle flashHandle,
                                       gpeTlvManifestHeader_t *tlvManifestHdr,
                                       uint32_t *hdrOffset)
    {
        int32_t ret = 0;
        uint32_t offset = 0;
        gpeTlvInfo_t tlvInfo = {0};
        gpeManifestHeader_t gpeManifestHdr = {0};
    
        /* The GPE Manifest starts at this address */
        offset = GPE_MANIFEST_IMAGE_START_OFFSET;
    
        ret = XMEMWFF3_read(flashHandle, offset, &gpeManifestHdr,
                            sizeof(gpeManifestHeader_t), 0);
        if (ret < 0)
        {
            Report("\n\rERROR: Failed reading GPE manifest header");
            return -1;
        }
    
        /* Goto protected TLV info struct */
        offset += gpeManifestHdr.ihHdrSize + gpeManifestHdr.ihImgSize;
    
        ret = XMEMWFF3_read(flashHandle, offset, &tlvInfo,
                            sizeof(gpeTlvInfo_t), 0);
        if (ret < 0)
        {
            Report("\n\rERROR: Failed reading GPE protected tlv info");
            return -1;
        }
    
        if (tlvInfo.itMagic != GPE_PROTECTED_TLV_MAGIC_NUM)
        {
            Report("\n\rERROR: TLV info magic number is wrong");
            return -1;
        }
    
        /* Goto protected TLV manifest Header */
        offset += sizeof(gpeTlvInfo_t);
    
        ret = XMEMWFF3_read(flashHandle, offset, tlvManifestHdr,
                            sizeof(gpeTlvManifestHeader_t), 0);
        if (ret < 0)
        {
            Report("\n\rERROR: Failed reading GPE tlv manifest header");
            return -1;
        }
    
        if (tlvManifestHdr->itType != GPE_MANIFEST_TLV_TYPE)
        {
            Report("\n\rERROR: Wrong GPE manifest header tlv type");
            return -1;
        }
    
        *hdrOffset = offset;
    
        return 0;
    }
    
    
    /******************************************************************************
    
        NAME:        findTlvInTlvManifestTlv
    
        DESCRIPTION: This function iterates a GPE TLV zone (either protected or
                     not) and extracts a requested TLV.
    
                     It utilizes the TLV manifest`s records table in order to
                     find out if the requested TLV exists and to calculate its
                     offset relative to the start of the image (GPE slot).
    
                     Following is a detailed description of a GPE TLV zone
                     (protected or not).
    
                                 ┌──────────────────┬──────────────┐
                                 │   GPE TLV info   │   it_magic   │
                                 │     tlv_info     ├──────────────┤
                                 │                  │  it_tlv_tot  │
                                 ├──────────────────┼──────────────┤◄──Input
                                 │                  │    it_type   │   offset
                                 │                  ├──────────────┤
                                 │                  │    it_len    │
                                 │ GPE Manifest TLV ├──────────────┤
                                 │   manifest_tlv   │              │
                                 │                  │ Record Table │
                    GPE TLV      │                  │              │
                     zone        ├──────────────────┼──────────────┤
                                 │                  │    it_type   │
                                 │                  ├──────────────┤
                                 │     GPE TLV      │    it_len    │
                                 │                  ├──────────────┤
                                 │                  │    it_value  │
                                 ├──────────────────┼──────────────┘
                                 │                  │
                                 │     GPE TLV      │
                                 │                  │
                                 └──────────────────┘
                                          .
                                          .
                                          .
                                 ┌──────────────────┐
                                 │                  │
                                 │     GPE TLV      │
                                 │                  │
                                 └──────────────────┘
    
                     Following is a TLV Manifest record table entry description:
                                 ┌───────────────┐
                                 │    it_type    │
                                 ├───────────────┤
                                 │    reserved   │
                                 ├───────────────┤
                                 │   TLV Table   │
                                 │ Pointer shift │
                                 └───────────────┘
    
        PARAMETERS:  flashHandle             [Input] - Handle to GPE flash slot.
                     tlvManifestHdrOffset    [Input] - Offset to TLV manifest
                                                       header.
                     tlvManifestHdr         [Output] - TLV manifest header buffer.
                     requestedTlvType        [Input] - Requested TLV type.
                     requestedTlvOffset     [Output] - Offset to requested TLV.
    
        RETURNS:     0 upon success, negative value otherwise.
    ******************************************************************************/
    int32_t findTlvInTlvManifestTlv(XMEM_Handle flashHandle,
                                    uint32_t tlvManifestHdrOffset,
                                    gpeTlvManifestHeader_t *tlvManifestHdr,
                                    uint16_t requestedTlvType,
                                    uint32_t *requestedTlvOffset)
    {
        int32_t ret = 0;
        uint16_t i = 0;
        uint16_t protectedTlvCount = 0;
        uint32_t tlvStartOffset = 0, tableOffset = 0;
        gpeTlvManifestTableLine_t manifestTableLine = {0};
    
        /* Goto TLV records table lines */
        tableOffset = tlvManifestHdrOffset + sizeof(gpeTlvManifestHeader_t);
    
        /* Calculate count of protected TLV in protected TLV zone */
        protectedTlvCount = tlvManifestHdr->itLen / sizeof(gpeTlvManifestTableLine_t);
    
        /* Calculate end of manifest TLV records table offset */
        tlvStartOffset = tableOffset + tlvManifestHdr->itLen;
    
        for (i = 0; i < protectedTlvCount; i++)
        {
            ret = XMEMWFF3_read(flashHandle, tableOffset, &manifestTableLine,
                                sizeof(gpeTlvManifestTableLine_t), 0);
            if (ret < 0)
            {
                Report("\n\rERROR: Failed reading GPE tlv manifest table line");
                return -1;
            }
    
            if (manifestTableLine.itType == requestedTlvType)
            {
                /* The requested TLV start at the end of the TLV record table,
                 * in addition to the matching TLV record table line shift.
                 */
                *requestedTlvOffset = tlvStartOffset +
                                      manifestTableLine.tlvTablePointerShift;
                return 0;
            }
    
            tableOffset += sizeof(gpeTlvManifestTableLine_t);
        }
    
        Report("\n\rConf binary wasn't find in vendor image");
    
        return -1;
    }
    
    /******************************************************************************
    
        NAME:        getProtectedTlvOffset
    
        DESCRIPTION: This function returns the offset of a protected TLV in a GPE
                     slot, given its type.
    
        PARAMETERS:  gpeFlashHandle      [Input] - Handle to GPE flash slot.
                     requestedTlvOffset [Output] - Offset to requested TLV.
                     requestedTlvType    [Input] - Requested TLV type.
    
        RETURNS:     0 upon success, negative value otherwise.
    ******************************************************************************/
    int32_t getProtectedTlvOffset(XMEM_Handle gpeFlashHandle,
                                  uint32_t *requestedTlvOffset,
                                  uint16_t requestedTlvType)
    {
        int32_t ret = 0;
        uint32_t tlvManifestHdrOffset = 0;
        gpeTlvManifestHeader_t tlvManifestHdr = {0};
    
        ret = getProtectedTlvManifestHdr(gpeFlashHandle, &tlvManifestHdr,
                                         &tlvManifestHdrOffset);
        if (ret < 0)
        {
            return ret;
        }
    
        ret = findTlvInTlvManifestTlv(gpeFlashHandle,
                                      tlvManifestHdrOffset,
                                      &tlvManifestHdr,
                                      requestedTlvType,
                                      requestedTlvOffset);
        if (ret < 0)
        {
            return ret;
        }
    
        return 0;
    }
    
    /******************************************************************************
    
        NAME:        getConfContent
    
        DESCRIPTION: This function gets the cc35xx-conf.bin file offset within the
                     vendor image GPE slot.
    
        PARAMETERS:  flashHandle    [Input] - Handle to GPE flash slot.
    
        RETURNS:     0 upon success, negative value otherwise.
    ******************************************************************************/
    int32_t getConfContent(XMEM_Handle flashHandle)
    {
        int32_t ret = 0;
        uint32_t confTlvOffset = 0;
    
        ret = getProtectedTlvOffset(flashHandle,
                                    &confTlvOffset,
                                    CONF_BIN_TLV_TYPE);
        if (ret < 0)
        {
            return ret;
        }
    
        /* Skip TLV header (type, length) */
        confTlvOffset += sizeof(gpeTlvHeader_t);
    
        /* Set global variable to keep offset to the beginning of the conf file */
        confGpeDataOffset = confTlvOffset;
    
        return ret;
    }
    
    
    int ATTRIBUTE osi_fset(osiFileSetType containerType, void *params)
    {
        if(containerType == OSI_FILESYSTEM_SET_CONNECTIVITY_FW_CONTAINER)
        {
            osiFlashFwSlot_e osiFlashFwSlot = *(osiFlashFwSlot_e *)params;
            if(osiFlashFwSlot == OSI_FLASH_CONNECTIVITY_FW_SLOT_1)
            {
                Fwslot = OSI_FLASH_CONNECTIVITY_FW_SLOT_1;
            }
            else if(osiFlashFwSlot == OSI_FLASH_CONNECTIVITY_FW_SLOT_2)
            {
                Fwslot = OSI_FLASH_CONNECTIVITY_FW_SLOT_2;
            }
        }
    
        return 0;
    }
    
    int ATTRIBUTE osi_fget(osiFileGetType containerType, void *params)
    {
        if(containerType == OSI_FILESYSTEM_GET_CONNECTIVITY_FW_CONTAINER)
        {
            osiFlashFwSlot_e *osiFlashFwSlot = (osiFlashFwSlot_e *)params;
            *osiFlashFwSlot = Fwslot;
        }
    
        return 0;
    }
    
    int ATTRIBUTE osi_fclose(FILE *_fp)
    {
        osiFileP_t *osiFile;
        osiFile = (osiFileP_t *)_fp;
    
        if(NULL == osiFile)
        {
            return 0;
        }
    
        if ((osiFile->ftype == OSI_FILE_CONNECTIVITY_FW_SLOT_1) ||
            (osiFile->ftype == OSI_FILE_CONNECTIVITY_FW_SLOT_2) ||
            (osiFile->ftype == OSI_FILE_CONF))
        {
            XMEMWFF3_close((XMEM_Handle)osiFile->ptr);
        }
        else if((osiFile->ftype == OSI_FILE_BLE_OUR_SEC) || (osiFile->ftype == OSI_FILE_BLE_PEER_SEC) || (osiFile->ftype == OSI_FILE_BLE_CCCD))
        {
            if(osiFile->ptr != NULL)
            {
                nvFptrs->deleteItem((*(NVINTF_itemID_t *)osiFile->ptr));
                os_free(osiFile->ptr);
            }
        }
        else if((osiFile->ftype == OSI_FILE_WLAN_FAST_CONNECT) || (osiFile->ftype == OSI_FILE_WLAN_CONNECTION_POLICY) || (osiFile->ftype == OSI_FILE_WLAN_PROFILE))
        {
            if(osiFile->ptr != NULL)
            {
                os_free(osiFile->ptr);
            }
        }
        os_free(_fp);
        return 0;
    }
    
    FILE * ATTRIBUTE osi_fopen(const char *_fname, const char *_mode)
    {
        osiFileP_t      *osiFile = NULL;
        NVINTF_itemID_t *nvItem = NULL;
        XMEM_Params      params;
    
        if(NULL == nvFptrs)
        {
            nvFptrs = os_malloc(sizeof(NVINTF_nvFuncts_t));
            NVOCMP_loadApiPtrs(nvFptrs);
            if (nvFptrs->initNV(NULL) != 0)
            {
                Report("\n\rInit NV failed\n\r");
                ASSERT_GENERAL(0);
            }
        }
    
        if(strcmp("rambtlr",_fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            osiFile->ftype = OSI_FILE_RAMBTLR;
            osiFile->ptr = NULL;
            return (FILE *)(osiFile);
        }
        else if(strcmp("fw",_fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            if(Fwslot == OSI_FLASH_CONNECTIVITY_FW_SLOT_1)
            {
                osiFile->ftype = OSI_FILE_CONNECTIVITY_FW_SLOT_1;
                params.regionBase =  wifi_connectivity_physical_slot_1_address;
                params.regionStartAddr = wifi_connectivity_logical_slot_1_address;
                params.regionSize = wifi_connectivity_slot_1_region_size;
                params.deviceNum = 0;
                fwHandle = XMEMWFF3_open(&params);
            }
            else if(Fwslot == OSI_FLASH_CONNECTIVITY_FW_SLOT_2)
            {
                osiFile->ftype = OSI_FILE_CONNECTIVITY_FW_SLOT_2;
                params.regionBase =  wifi_connectivity_physical_slot_2_address;
                params.regionStartAddr = wifi_connectivity_logical_slot_2_address;
                params.regionSize = wifi_connectivity_slot_2_region_size;
                params.deviceNum = 0;
                fwHandle = XMEMWFF3_open(&params);
            }
            osiFile->ptr = (void *)fwHandle;
            return (FILE *)(osiFile);
        }
        else if(strcmp("cc35xx-conf",_fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            if (!osiFile)
            {
                return (FILE *)(NULL);
            }
            osiFile->ftype = OSI_FILE_CONF;
    
            params.regionBase =  vendor_image_physical_slot_1_address;
            params.regionStartAddr = vendor_image_logical_slot_1_address;
            params.regionSize = vendor_image_slot_1_region_size;
            params.deviceNum = 0;
    
            confFileHandle = XMEMWFF3_open(&params);
            if (confFileHandle == NULL)
            {
                os_free(osiFile);
                return (FILE *)NULL;
            }
    
            if (getConfContent(confFileHandle) < 0)
            {
                XMEMWFF3_close(confFileHandle);
                os_free(osiFile);
                return (FILE *)NULL;
            }
    
            osiFile->ptr = (void *)confFileHandle;
            return (FILE *)(osiFile);
        }
        else if(strcmp("our_sec",_fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_BLE_OUR_SEC;
            nvItem->itemID = NVID_BLE_OUR_SEC_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_BLE;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
        else if(strcmp("peer_sec",_fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_BLE_PEER_SEC;
            nvItem->itemID = NVID_BLE_PEER_SEC_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_BLE;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
        else if(strcmp("cccd", _fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_BLE_CCCD;
            nvItem->itemID = NVID_BLE_CCCD_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_BLE;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
        else if(strcmp("conn_p", _fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_WLAN_CONNECTION_POLICY;
            nvItem->itemID = NVID_WLAN_CONNECTION_POLICY_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_WIFI;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
        else if(strcmp("profiles", _fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_WLAN_PROFILE;
            nvItem->itemID = NVID_WLAN_PROFILES_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_WIFI;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
        else if(strcmp(".fast", _fname) == 0)
        {
            osiFile = os_malloc(sizeof(osiFileP_t));
            nvItem = os_malloc(sizeof(NVINTF_itemID_t));
            osiFile->ftype = OSI_FILE_WLAN_FAST_CONNECT;
            nvItem->itemID = NVID_WLAN_FAST_CONNECT_OFFSET_IN_FLASH;
            nvItem->systemID = NVINTF_SYSID_WIFI;
            nvItem->subID = 0;
            osiFile->ptr = nvItem;
            return (FILE *)(osiFile);
        }
    
        return (FILE *)(NULL);
    }
    
    size_t ATTRIBUTE osi_fread(void *_ptr, size_t len, size_t offset, FILE *_fp)
    {
        osiFileP_t *osiFile;
        osiFile = (osiFileP_t *)_fp;
        int16_t ret = 0;
    
        if (NULL == osiFile)
        {
            return 0;
        }
    
        if (osiFile->ftype == OSI_FILE_RAMBTLR)
        {
            memcpy(_ptr,(void *)((uint32_t)(osiFile->ptr) + offset),len);
            return len;
        }
        else if (osiFile->ftype == OSI_FILE_CONF)
        {
            ret = XMEMWFF3_read((XMEM_Handle )osiFile->ptr,
                                confGpeDataOffset + offset,
                                (void*)_ptr, len, 0);
            if (ret < 0)
            {
                return 0;
            }
            return len;
        }
        else if ((osiFile->ftype == OSI_FILE_CONNECTIVITY_FW_SLOT_1) ||
                 (osiFile->ftype == OSI_FILE_CONNECTIVITY_FW_SLOT_2))
        {
    
            ret = XMEMWFF3_read((XMEM_Handle )osiFile->ptr,
                                FwGpeDataOffset + offset,
                                (void*)_ptr, len, 0);
            if (ret < 0)
            {
                return 0;
            }
            return len;
        }
        else if (IS_OSI_FILE(osiFile->ftype))
        {
            if (nvFptrs->readItem((*(NVINTF_itemID_t *)osiFile->ptr), 0, len, _ptr) == 0)
            {
                return (len);
            }
            else
            {
                return 0;
            }
        }
    
        return 0;
    }
    
    size_t osi_fwrite(const void *_ptr, size_t _size, size_t _count, FILE *_fp)
    {
        osiFileP_t *osiFile;
        osiFile = (osiFileP_t *)_fp;
    
        if(NULL == osiFile)
        {
            return 0;
        }
    
        if(IS_OSI_FILE(osiFile->ftype))
        {
            nvFptrs->deleteItem((*(NVINTF_itemID_t *)osiFile->ptr));
            if(nvFptrs->writeItem((*(NVINTF_itemID_t *)osiFile->ptr), _size, (void *)_ptr) == 0)
            {
                return (_size);
            }
            else
            {
                return (0);
            }
        }
    
        return 0;
    }
    
    int osi_fremove(FILE *_fp)
    {
        osiFileP_t *osiFile;
        osiFile = (osiFileP_t *)_fp;
    
        if(NULL == osiFile)
        {
            return -1;
        }
    
        if(osiFile->ftype == OSI_FILE_WLAN_FAST_CONNECT)
        {
            if(nvFptrs->deleteItem((*(NVINTF_itemID_t *)osiFile->ptr)) == 0)
            {
                return 0;
            }
            else
            {
                return -1;
            }
        }
    
        return 0;
    
    }
    
    /*!
        \brief initialize the SPI module
        \param data - input buffer
        \param length - length in bytes to read
        \return 0 - success, -1 - failed
        \note
        1. if initializing all the MCU drivers at the beginning of the world, this function can stay empty.
           this function is called in the wlan_start and will stay initialized even if used wlan_stop
        2. the SPI must have the following parameters
           - master
           - 4 pin mode SPI
           - chip select active low
           - polarity 0 phase 0
           - max frequency 40000000Hz
           - data block 32bits
        \warning
    */
    size_t ATTRIBUTE osi_filelength(const char * FileName)
    {
        return 0;
    }
    //
    
    

    Thanks,

    Sheng

  • Hi Sheng,

    Your osi_filesystem.c looks correct to me, let me know if you run into any errors in running 9.21.00.15 SDK.

    Best Regards,

    Josh Prushing

  • Hi John,

    I tried SDK 9.21.00.15 and was able to burn images via CCS.

    However, I encountered another problem: when I send "at+wlanstaroleup", EVK can no longer receive any commands and seems to have crashed.

    Another issue is that after the EVK is powered off, it no longer outputs any boot or initialization messages. The system can only resume normal operation after reprogramming the device via CCS.

    Thanks,

    Sheng

  • Hi Sheng,

    Can you please provide the following:

    • at_commands.syscfg (as a text file)
    • screencap of your Dependencies (Properties -> General -> Dependencies)
    • screencap of your Predefined Symbols (Properties -> Build -> Tools -> Arm Compiler -> Predefined Symbols)

    I followed your setup but my at-commands example completes station role up, so I wish to make sure we have the same configuration for our devices.

    Best Regards,

    Josh Prushing

  • Hi Sheng,

    Everything here looks good to me, which makes this very strange... Thanks for your patience as we debug this!

    Can you try the following?

    • Can you verify both USB cables are functioning properly, as well as both USB ports on your computer?
    • Can you flash the device through the 4.1.8 toolbox with loading default images and full flash erase, and open a terminal and see if you can get the network_terminal example (the default image) working properly? There are similar commands here for starting wlan and starting the device as a station role. 

    Looking forward to your findings,

    Josh Prushing

  • Hi John,

    1.I will arrange time this week to perform the tests you suggested.

    2.Regarding the NOR Flash selection:
    The devices listed on the left below are the ones recommended in the TI SDK. However, after checking with the Flash vendors, we were informed that these parts are either out of stock or have been discontinued. The vendors have instead recommended the alternative parts shown on the right.
    PY25Q32LB  ->  PY25Q32LC-UXH-IR
    GD25LF32ETJGY  -> GD25LQ32EEIG

    I would like to ask if it is acceptable to use these alternative part numbers, which differ from the ones recommended in the SDK. Are there any compatibility concerns or configuration changes required when using these replacements?

    Thank you for your support.

    Thanks,

    Sheng

  • Hi Sheng,

    Let me check with the team on this, as I haven't seen any mention of these new flash devices. 

    Best Regards,

    Josh Prushing

  • Hi Sheng,

    Have you been able to verify the network_terminal example?

    As per the flash device information, the PY25Q32LC-UXH-IR should be used interchangeably because this is the same product according to Puya. For the
    GD25LQ32EEIG, we cannot support because this is a different product.

    Best Regards,

    Josh Prushing