- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSoC Creator 4.2 is being used to write a BLE test application for a CYBLE-416045-02 in order to try to understand the control of the BLE on the PSoC 6.
The basic test application framework for controlling actions and observing responses is working well. To add BLE funcitonality, the ce22046_gatt_in example was modified to run only on the CM4 core and checked out well, using another CYBLE unit to run the gatt_out application. The the BLE component in the gatt_out example was copied and then pasted into the the new test application. When this application is compiled it produces the error:
Build error: 'CY_BLE_GATTC_COUNT' undeclared here in cy_ble_custom.h
... relevant cy_le_custom.h code section producing the error:
/** Structure with discovered attributes information of Custom Service Descriptors */
typedef struct
{
/** Custom Descriptor handle */
cy_ble_gatt_db_attr_handle_t descHandle[CY_BLE_GATTC_COUNT];
/** Custom Descriptor 128 bit UUID */
const void *uuid;
/** UUID Format - 16-bit (0x01) or 128-bit (0x02) */
uint8_t uuidFormat;
} cy_stc_ble_customc_desc_t;
The CY_BLE_GATTC_COUNT is defined in cy_ble_gatt.h:
#define CY_BLE_GATTC_COUNT (CY_BLE_CONFIG_GATTC_COUNT)
The CY_BLE_CONFIG_GATTC_COUNT is defined in BLE_config.h:
/** The number of BLE connections (client). */
#define CY_BLE_CONFIG_GATTC_COUNT (0x01u)
So why is the compiler producing the compile error? Because of this error I cannot proceed with the project.
Attached is a zip file with the relevant generated files.
A second attachment is the archive for the gatt_out example modified to run completely on the CM4 core. The is working properly. This is the project from which the BLE component was copied to paste into the test application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to test your first attached project (gatt_in) on my platform, and it's compiled successfully without error. I use PSoC Creator 4.3. v4.2 should also be fine.
The original BLE component in project is out of date. You need to update it manually. It's fine to use PDL3.0.4 or PDL3.1.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The correct answer is to not use PSoC Creator 4.2 for projects involving BLE. At least that is my take on it. CY_BLE_GATTC_COUNT is an internally generated symbol that should not be exposed to the user, let alone produce a blocking error in the compiler.
I switched to Creator version 4.3 and it did not have any problems with CY_BLE_GATTC_COUNT. So I was able to continue with my development.
However, I still had problems with the BLE component. I wanted to check out my support functions to make sure they are running properly. So, a compile time variable was used to temporarily remove references to BLE data and functions and the BLE compunent was disabled. When compiling, there were still references to BLE symbols that produced errors and it kept asking for BLEss interrupt settings. To try to get rid of these, the BLE component was deleted from the project. The BLE symbols were still there. So, I erased all the generated source, cleaned the project closed the PSoC Creator 4.3 and then restarted it again with the project. Then the BLE symbols were gone and I was able to run and debug the application.
The BLE functions were then activated and the BLE component was added. Now I have control.