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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
LixinD_46
Employee
Employee
10 replies posted 5 replies posted 10 questions asked

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

or using the iOS MeshApp downloaded from BT-SDK for ModusTookbox IDE. The download web link listed below. Note, it may not the latest released in GITHUB.

https://github.com/cypresssemiconductorco/Code-Examples-BT-SDK-for-ModusToolbox/tree/master/Mesh-Pee...

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 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 using ModusToolbox IDE with BT SDK 1.3, please use BT_SDK-1.3.0.273.cysdk or later released .cysdk file. Earlier .cysdk is not supported and may have compatibility issue. So, please download, replease and use currently latest iOS MeshApp for BT SDK 1.3 from the zip file iOS_MeshApp_20190627.zip.

When using WICED SDK IDE 6.4.0.1001 or later version IDEs, please following below steps to fix the header files cannot be 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 */

2 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Thanks DudleyD_46

Note that we also have an excellent getting started Appnote here: https://www.cypress.com/file/473921/download

0 Likes

Yes, thanks. The appnote documents the operations clearly.

This steps supplies here is aimed to fix the iOS MeshApp unable to build successfully within current ModusToolbox 1.1 installation.

Because there is time gap that the previously iOS MeshApp was developed based on 20179-A1 platform, not based on 20819-A1 platform,

so, user will encounter build error when it builds the MeshApp within current ModusToolbox.

We will fix the demo project to use the 20819-A1 platform instead for ModusToolbox 1.1 to avoid the issue a little later.

0 Likes