- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My first attempt at adding BLE to my PSoC6 board. I'm following the instructions in CE215119 "BLE Battery Level with PSoC 6 MCU with BLE Connectivity' (plus an ADC and UART that I want to use later but were the starting point for my development). The BLE version is V2.10; PSoC Creator is the latest with al of the modules updated to the latest available versions. This is on a Windows 10 64-bit computer (a VM but I don't think that would matter in this case).
When I compile I get:
prj.M0120:Build error: conflicting types for 'cy_ble_stackmemoryRam'
with a reference to cy_ble.c, lin e38,column 46. That line reads (in context):
#if (CY_BLE_SHARING_MODE_EXPORT)
uint8_t *cy_ble_stackMemoryRam = NULL;
#else
CY_ALIGN(sizeof(uint32_t)) CY_NOINIT uint8_t cy_ble_stackMemoryRam[CY_BLE_STACK_RAM_SIZE];
#endif /* CY_BLE_SHARING_MODE_EXPORT */
and is the 'else' code line.
In 'cy_ble.h there is also the code:
#if (CY_BLE_SHARING_MODE_EXPORT)
extern uint8_t *cy_ble_stackMemoryRam;
#else
extern uint8_t cy_ble_stackMemoryRam[CY_BLE_STACK_RAM_SIZE];
#endif /* CY_BLE_SHARING_MODE_EXPORT */
but there it appears as though the first code line is the one that is active (although this could be the IDE leading me astray and not what the compiler sees as hovering over the CY_BLE_SHARING_MODE_EXPORT gives the same expansion of 'CY_BLE_SHARING_MODE == CY_BLE_SHARING_EXPORT).
CAn someone tell me where I'm going wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are two cy_ble_config.h variants generated for BLE and non-BLE projects. This file is used to redefine BLESS Clock macros in a non-BLE PSoC Creator project. Whereas, in a BLE project the configuration #define(s) generated by the BLE customizer are redefined.
Once the non-BLE project is built, the non-BLE cy_ble_config.h variant will be generated. Later, when you add BLE component in the PSoC Creator schematic, the cy_ble_config.h will not be re-generated as per PSoC Creator/pdsc flow. Hence, you can either add defines in the non-BLE specific cy_ble_config.h file or manually delete and re-generate the file for BLE configuration.
- Add following defines in the cy_ble_config.h file and build the project to support BLE functionality.
#include "ble/cy_ble_defines.h"
#include "BLE_config.h"
- Regenerate cy_ble_config.h manually after adding BLE component in the schematic;
- Right click on cy_ble_config.h > Delete.
- Clean and Build the project; Go to Build > Clean and Build Project
New It will be documented under Cypress BLE Middleware Library section in the next PDL revision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please confirm whether you would like to enable OTA feature in your project. If not, please disable the Over-The-Air Bootloading with Code Sharing.
If it does not resolve the issue, would you be able to share your project? It will give us more insight to the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response.
That is how the project is (and always was) configured.
I'll archive the project when I get home tonight and attach it here.
The way the project evolved was that I created one that had the ADC and UART and got that working. I then added the BLE component and the example code files.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The archive of the project that does not build.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Susan,
I have exactly the same problem. I figured out that this error depends on the sequence of adding the BLE component to the Top Design.
Error occurs in the following sequence:
1) Create a new project
2) Add ADC and UART to the TopDesign
3) Build the project
4) Add BLE to the TopDesign
5) Build the project
Error doesn't occur in the following sequence:
1) Create a new project
2) Add BLE to the TopDesign
3) Build the Project
4) Add ADC and UART to the TopDesign
5) Build the project
Best regards
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Simon,
Firstly, thanks for confirming that it is not just me!
I have created another project that (like your 2nd version) started with the BLE component and added the others later, and (again like yours) it is working. However as there are now at least 2 of us that have stumbled into this using (what I consider to be) a perfectly valid and "obvious" development approach (get the basics working and then add the communications) I'm please to see the @geonaM_26 is taking an interest to find the root cause.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also able to recreate the issue following the sequence.
We have forwarded your query to our product development team, who will evaluate your query.
Meanwhile as a workaround, please add BLE component before building the project.
Thank you for your interest in Cypress products.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have same issue also...
Generated_Source\PSoC6\pdl\middleware\ble\cy_ble.c:38:46: error: conflicting types for 'cy_ble_stackMemoryRam'
Tired...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are two cy_ble_config.h variants generated for BLE and non-BLE projects. This file is used to redefine BLESS Clock macros in a non-BLE PSoC Creator project. Whereas, in a BLE project the configuration #define(s) generated by the BLE customizer are redefined.
Once the non-BLE project is built, the non-BLE cy_ble_config.h variant will be generated. Later, when you add BLE component in the PSoC Creator schematic, the cy_ble_config.h will not be re-generated as per PSoC Creator/pdsc flow. Hence, you can either add defines in the non-BLE specific cy_ble_config.h file or manually delete and re-generate the file for BLE configuration.
- Add following defines in the cy_ble_config.h file and build the project to support BLE functionality.
#include "ble/cy_ble_defines.h"
#include "BLE_config.h"
- Regenerate cy_ble_config.h manually after adding BLE component in the schematic;
- Right click on cy_ble_config.h > Delete.
- Clean and Build the project; Go to Build > Clean and Build Project
New It will be documented under Cypress BLE Middleware Library section in the next PDL revision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the work-around notes.
Will this be corrected in a future version of PSoC Creator?
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As per PDSC config workflow, this is expected. It will be documented under Cypress BLE Middleware Library section in the next PDL revision.