2 Replies Latest reply on May 23, 2019 7:56 PM by DudleyD_46

    how to setup and build the iOS MeshApp within the ModusToolbox1.1 installation?

    DudleyD_46

      This memo is aimed to fix the compile issue encountered with the iOS MeshApp which was installed with the ModusToolbox1.1 or WICED SDK IDE

      or the iOS MeshApp download from BT SDK for ModusToolbox from below web link.https://github.com/cypresssemiconductorco/Code-Examples-BT-SDK-for-ModusToolbox/tree/master/Mesh-Peer-Apps

      Code-Examples-BT-SDK-for-ModusToolbox/Mesh-Peer-Apps at master · cypresssemiconductorco/Code-Examples-BT-SDK-for-ModusTo…

       

      Location of the iOS MeshApp project:

      ModusToolbox IDE: ${INSTALLATION_PATH}/ModuxToolbox_1.1/libraries/bt_sdk-1.1/components/BT-SDK/common/apps/snip/mesh/peerapps/iOS/MeshApp

      WICED SDK IDE: ${INSTALLATION_PATH}/WICED/WICED-Studio-6.4/common/apps/snip/mesh/peerapps/iOS/MeshApp

      Please do not mixed the iOS MeshApp for ModusToolbox IDE and for WICED SDK IDE.

       

      MaxOS and Xcode IDE requirements,

      MacOS: 10.14.5 and later.

      Xcode: 10.2.1 and later.

       

      When you using ModusToolbox IDE with BT SDK 1.2, and encountered build error with the iOS MeshApp in the Xcode which caused by header files, such as wiced.h file, not found issue, please following following steps to fix the issue.

      1. Download and install the latest BT-SDK for ModusToolbox from ModusToolbox BT SDK 1.2

      2. Download attached iOS_MeshApp_for_BTSDK1.2.zip file to your local workspace, unzip it, you will get a folder that contains the whole iOS_MeshApp_for_BTSDK1.2/MeshApp project.

      3. Delete the iOS MeshApp folder from your ModusToolbox IDE ${INSTALLATION_PATH}/ModuxToolbox_1.1/libraries/bt_sdk-1.1/components/BT-SDK/common/apps/snip/mesh/peerapps/iOS/MeshApp completely.

      4. Copy the unzipped iOS_MeshApp_for_BTSDK1.2/MeshApp to where the MeshApp was deleted in above step.

      5. Download attached brcm_fw_types.h, copy and replace the ${INSTALLATION_PATH}/ModuxToolbox_1.1/libraries/bt_sdk-1.1/components/BT-SDK/208XX-A1_Bluetooth/include/20819/internal/brcm_fw_types.h file.

      6. Now, you can try to open and build the MeshApp in Xcode.

      Note, please use the iOS MeshApp project in attached iOS_MeshApp_for_BTSDK1.2.zip file instead of download from the BT_SDK for MOdusToolbox/Mesh-Peer-Apps when the last Commits on May 30, 2019 or eariler.

       

      When you using ModusToolbox IDE with BT SDK 1.3, please use BT_SDK-1.3.0.273.cysdk or later released .cysdk file. Earlier .cysdk may have compatibility issue.

       

      When you using WICED SDK IDE 6.4.0.1001 or 1002, please following following steps to fix the header files not found issue.

      1. Download the 208XX-A1_Bluetooth.zip file to your local worksapce, unzip it, you will get a folder of 208XX-A1_Bluetooth/208XX-A1_Bluetooth. The folder 208XX-A1_Bluetooth folder which directly contains the include folder is what we need.

      2. Copy the 208XX-A1_Bluetooth folder to ${INSTALLATION_PATH}/WICED/WICED-Studio-6.4/ folder.

      3. Now, you can try to open and build the MeshApp in Xcode.

      Also, if required, you can download and use attached iOS MeshApp instead of WICED SDK installed version.

      1. Download the iOS_MeshApp_for_WICED_SDK_6.4.0.1001.zip file to your local workspace, unzip it, you will get a folder that contains the whole iOS_MeshApp_for_WICED_SDK_6.4.0.1001/MeshApp project.

      2. Delete the iOS MeshApp folder from your ModusToolbox IDE ${INSTALLATION_PATH}/WICED/WICED-Studio-6.4/common/apps/snip/mesh/peerapps/iOS/MeshApp completely.

      3. Copy the unzipped iOS_MeshApp_for_WICED_SDK_6.4.0.1001/MeshApp to where the MeshApp was deleted in above step.

      4. Now, you can try to open and build the MeshApp in Xcode.

       

      In some SDK IDE version, you may encounter the "auto_flags.h" file not found issue after about steps. Then, please modify the  ${INSTALLATION_PATH}/ModuxToolbox_1.1/libraries/bt_sdk-1.1/components/BT-SDK/208XX-A1_Bluetooth/include/20819/internal/brcm_fw_types.h file or ${INSTALLATION_PATH}/WICED/WICED-Studio-6.4/208XX-A1_Bluetooth/include/20819/internal/brcm_fw_types.h file as below to fix this compile issue.

      Or you can download attached the brcm_fw_types.h and replace the 208XX-A1_Bluetooth/include/20819/internal/brcm_fw_types.h file directly.

      /* Prefix header for build flags.  This will be created by the build process, in the build output

         folder, using flags extracted from the build/chips/chip_features.xml spreadsheet, and possibly

         overridden from the command line. */

      - #if !defined WICEDX_LINUX && !defined _WIN32 && !defined __ANDROID__

      + #if !defined WICEDX_LINUX && !defined _WIN32 && !defined __ANDROID__ && !defined __APPLE__

      #include "auto_flags.h"

      #endif

      ......

                  ARM7, however. */

          #define CPU_ALLOW_UNALIGNED_ACCESS  1

      - #elif !defined WIN32 && !defined WICEDX_WIN && !defined __ANDROID__ && !defined WICEDX_LINUX

      + #elif !defined WIN32 && !defined WICEDX_WIN && !defined __ANDROID__ && !defined WICEDX_LINUX && !defined __APPLE__

       

          #error "Target CPU properties not defined"

      #endif

      .......

       

      In some old SDK IDE, you may encounter the MESH_COMPANY_ID_UNUSED macro not defined issue, if that issue happened, please modify the ...\common\include\wiced_bt_mesh_model_defs.h file as below to fix this issue.

        /**

         * @anchor WICED_BT_MESH_CORE_COMPANY_ID

         * @name Company identifiers

         * \details The following is the list of mesh company id

         * @{

         */

      + #define MESH_COMPANY_ID_UNUSED                          0xFFFE

        #define MESH_COMPANY_ID_BT_SIG                          0xFFFF

        #define MESH_COMPANY_ID_CYPRESS                         0x0131

        /** @} WICED_BT_MESH_CORE_COMPANY_ID */