Wiced_bt library is showing unresolved inclusion warning

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

cross mob
NeDh_4602711
Level 5
Level 5
5 solutions authored First solution authored 50 replies posted

Hello

I am using the CYBT-343026 module and ModusToolbox 2.1.0.

As you can see I have added wiced_btsdk in my project but all the wiced_*.h files are showing as  "unresolved inclusion". Why So?

pastedImage_0.png

Also while compiling code I getting below errors.

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_uid_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:314: undefined reference to `wiced_bt_eddystone_set_data_for_uid'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_url_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:336: undefined reference to `wiced_bt_eddystone_set_data_for_url'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_eid_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:357: undefined reference to `wiced_bt_eddystone_set_data_for_eid'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_tlm_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:384: undefined reference to `wiced_bt_eddystone_set_data_for_tlm_unencrypted'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_ibeacon_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:407: undefined reference to `wiced_bt_ibeacon_set_adv_data'

When I check all the above header files and functions in wiced_btsdk there is available. I think it seems there is a problem with the library reference path.

Could you please guide me, is there any standard way to add a reference to wiced_btsdk project? Or I am missing anything?

Thanks in advance.

Regards,

Neeraj

0 Likes
1 Solution

HI,

Thank you for the explanation.

I think the errors you have observed is due to using improper makefile for the application. You have to include all necessary libraries inn the makefile for the application. For example, If you want to run beacon code, you may need include it's library in the makefile as shown below. By default Makefile of the empty application will not be including it .So you get errors when you try to run beacon code in empty application.

COMPONENTS += beacon_lib

So, I would suggest you to pick the most suitable application code at the starting of the development process itself, so that all the basic libraries will be linked to it and then develop your logic on top of it. (You can select empty app also, but it will be having the most minimum necessary libraries only. Still you can add the required libraries).

You will be able to see the library descriptions in the README.md files present inside the Library folder.

Eg: \wiced_btsdk\dev-kit\libraries\btsdk-ble\README.md

Also,

May I know whether you have installed Modustoolbox in the default path or custom path. If it is in custom path please refer below installation guide and add the system variables. Also please verify other steps as well from the guide.

Installation Guide: https://www.cypress.com/file/504351/download

More Documentation: https://www.cypress.com/products/modustoolbox-software-environment

Thanks,

-Dheeraj

View solution in original post

4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Are you using correct CY_SHARED_PATH in the makefile of the application? Please confirm it

# Path (absolute or relative) to the bt-sdk folder (at repo root)

CY_SHARED_PATH=$(CY_APP_PATH)/../wiced_btsdk

Thanks,

-Dheeraj

Hi Dheeraj,

Please check the below paths variable.

################################################################################

# Paths

################################################################################

# Path (absolute or relative) to the project

CY_APP_PATH=.

# Path (absolute or relative) to the bt-sdk folder (at repo root)

CY_SHARED_PATH=$(CY_APP_PATH)/../../../wiced_btsdk

# absolute path to the root of the BTSDK

CY_SHARED_PATH_ABS=$(CURDIR)/../../../wiced_btsdk

# Path (absolute or relative) to the base library

CY_BASELIB_PATH=$(CY_SHARED_PATH)/dev-kit/baselib/$(CY_TARGET_DEVICE)

# Path to the bsp library

CY_BSP_PATH=$(CY_SHARED_PATH)/dev-kit/bsp/TARGET_$(TARGET)

INCLUDES+=\

    $(CY_BASELIB_PATH)/WICED/common

CY_DEVICESUPPORT_PATH=$(CY_BASELIB_PATH)

# Absolute path to the compiler (Default: GCC in the tools)

CY_COMPILER_PATH=

# Locate ModusToolbox IDE helper tools folders in default installation

# locations for Windows, Linux, and macOS.

CY_WIN_HOME=$(subst \,/,$(USERPROFILE))

CY_TOOLS_PATHS ?= $(wildcard \

    $(CY_WIN_HOME)/ModusToolbox/tools_* \

    $(HOME)/ModusToolbox/tools_* \

    /Applications/ModusToolbox/tools_* \

    $(CY_IDE_TOOLS_DIR))

# If you install ModusToolbox IDE in a custom location, add the path to its

# "tools_X.Y" folder (where X and Y are the version number of the tools

# folder).

CY_TOOLS_PATHS+=

# Default to the newest installed tools folder, or the users override (if it's

# found).

CY_TOOLS_DIR=$(lastword $(sort $(wildcard $(CY_TOOLS_PATHS))))

ifeq ($(CY_TOOLS_DIR),)

$(error Unable to find any of the available CY_TOOLS_PATHS -- $(CY_TOOLS_PATHS))

endif

# path to WICED tools root folder

CY_WICED_TOOLS_ROOT?=$(CY_SHARED_PATH)/dev-kit/btsdk-tools

# tools that can be launched with "make open CY_OPEN_TYPE=<tool>

CY_BT_APP_TOOLS=BTSpy ClientControl

# getlibs path

CY_GETLIBS_PATH=.

...............................................................................................................................

There was already path written CY_SHARED_PATH=$(CY_APP_PATH)/../../../wiced_btsdk

Regards,

Neeraj

0 Likes

Hello Dheeraj,

I have checked the log in metadata in the workspace folder and got the below message.

!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git

user global configuration and to define the default location to store repositories: 'C:\Users\Asus'. If this is

not correct please set the HOME environment variable and restart Eclipse.

I try to create a project in C:\Users\Asus folder and all unresolved inclusion warnings disappeared. But facing the same issue as earlier.

I had used "Empty-CYBT-343026" and copied code from the project "BLE-CYBT343026_2.beacon" and beacon.c file from the "BLE-CYBT343026" template but I was getting below error with no unresolved inclusion warning to header files.

But Still, I was getting the same error message as shown below.

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_uid_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:314: undefined reference to `wiced_bt_eddystone_set_data_for_uid'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_url_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:336: undefined reference to `wiced_bt_eddystone_set_data_for_url'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_eid_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:357: undefined reference to `wiced_bt_eddystone_set_data_for_eid'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_eddystone_tlm_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:384: undefined reference to `wiced_bt_eddystone_set_data_for_tlm_unencrypted'

D:/IoT/BLE/Wiced/IGWB/template/empty_wiced_bt/build/CYBT-343026-EVAL/Debug/empty_wiced_bt.o: In function `beacon_set_ibeacon_advertisement_data':

D:\IoT\BLE\Wiced\IGWB\template\empty_wiced_bt/empty_wiced_bt.c:407: undefined reference to `wiced_bt_ibeacon_set_adv_data'

Later I deleted the Empty-CYBT-343026 project and added BLE-CYBT343026 templates to the workspace then it works.

I don't understand If I use a code template named "BLE-CYBT343026" which has the same file contents then It works perfectly and not in "Empty-CYBT-343026".

Am I doing anything wrong? Please correct me.

Thanks in advance.

Regards,

Neeraj

0 Likes

HI,

Thank you for the explanation.

I think the errors you have observed is due to using improper makefile for the application. You have to include all necessary libraries inn the makefile for the application. For example, If you want to run beacon code, you may need include it's library in the makefile as shown below. By default Makefile of the empty application will not be including it .So you get errors when you try to run beacon code in empty application.

COMPONENTS += beacon_lib

So, I would suggest you to pick the most suitable application code at the starting of the development process itself, so that all the basic libraries will be linked to it and then develop your logic on top of it. (You can select empty app also, but it will be having the most minimum necessary libraries only. Still you can add the required libraries).

You will be able to see the library descriptions in the README.md files present inside the Library folder.

Eg: \wiced_btsdk\dev-kit\libraries\btsdk-ble\README.md

Also,

May I know whether you have installed Modustoolbox in the default path or custom path. If it is in custom path please refer below installation guide and add the system variables. Also please verify other steps as well from the guide.

Installation Guide: https://www.cypress.com/file/504351/download

More Documentation: https://www.cypress.com/products/modustoolbox-software-environment

Thanks,

-Dheeraj