Creator 4.3 Error: unknown type name 'cy_stc_ble_srvr_char_info_t'

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

cross mob
StNu_1610991
Level 4
Level 4
First comment on KBA 50 sign-ins 25 replies posted

A BLE component is being used in an application and during the PSOC Creator 4.3 compile the above error keeps being generated.  It seems to be a result of the symbol CY_BLE_MODE_PROFILE not being properly defined.  The problem is that both symbols are generated by Creator and as far as I know I have no control over how this is done. 

The same BLE component with the same configuration settings is also being used in another application and that application compiles and runs fine without the error.

I originally added the BLE into the problem application by copying the BLE component from the working application and pasting it into the problem application.  When the error appeared, the BLE component and generated code were erased and a new BLE component was added and configured manually to be the same as the one in the running application.  The error still came up.   Right now I am at a loss as to how to get rid of this error.

Has anyone seen this type of problem before and how was it resolved?

0 Likes
9 Replies
PradiptaB_11
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Hi,

Can you send us across your creator project. We need to check and reproduce the error to debug it. It seems as some header files are missing or some text has been deleted from the generated code. Cannot say this for sure as will need to check the project before commenting with surety.

Thanks,

Pradipta.

0 Likes

Thanks for the response.  The project is too large and proprietary to send it as is.  I will subset it to a smaller project where the problem still shows.  I will then send that project.

The project worked very well before trying to add the BLE component to connect it to a phone.  Since this error appeared I have not had any successful compiles.

There seem to be a lot of problems associated with the BLE component.  In a separate project a BLE running in CM4 worked successfully.  Then I configured it to run on CM0p and I could not get it to run again because of undefined creator generated symbols.  Also, despite the fact that it was moved to CM0p, it still put the BLE_bless_isr into CM4.  When that was unchecked and the CM0p interrupt was checked, it continued to produce an error saying the BLE_bless_isr needed to be on CM0p.  I had to give up trying to move to CM0p and left the project with BLE on CM4.

Am I maybe missing something about controlling the BLE configuration?

0 Likes
lock attach
Attachments are accessible only for community members.

I have not yet been able to reproduce the problem first reported.  However, I have a second similar project which also needs blue tooth.  In building this project I experimented with putting the BLE component first into TopDesign.cysch and then adding other components.  When compiled, this did NOT have the problem seen in the original project.  However, I am not yet at the point of testing this second project.

I will try doing the same on the original project: remove all components, put in the BLE component first, make sure BLE_bless_isr is in CM0p and then add the rest of the components.

Another test was built to check for the BLE in CM0p.  A blank project was prepared and a BLE component was added and forced to CM0p (the default).  When compiled it produced an error saying that the BLEbless_isr must be in CM0p.  The generated code had put it into CM4.  Attached is bundle for this.

0 Likes
lock attach
Attachments are accessible only for community members.

More attempts were made to get around this problem but all so far unsuccessful.  Another type of error was produced on a compile.  The output was:

"Generated_Source\PSoC6\BLE.c: In function 'Cy_BLE_Start':

Generated_Source\PSoC6\BLE.c:126:22: error: 'cy_stc_ble_config_t {aka struct <anonymous>}' has no member named 'callbackFunc'

        cy_ble_config.callbackFunc = callbackFunc;

                      ^

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

--------------- Build Failed: 10/14/2020 10:00:30 ---------------"

The bundle generated after this compile is attached.  Proprietary source code was removed from the bundle but you should be able to see what Creator 4.3 generated.

0 Likes

Hi Pradipta:

I am still hung up on this problem.  Is anyone at Cypress able to look at solutions or for ways to get around it?

0 Likes

Hi ,

I had the same problem,
The issue as I have tracked down stems from the setting of the

CY_BLE_MODE_PROFILE macro

if for example, you selected the BLE to run under M0+ entirely certain segments are disabled the other Core (if you look in BLE_config.c you may see stuff greyed out. depending on what was selected)

What seems to be the problem though is that the compiler decides to compile the BLE code for BOTH cores but as the CY_BLE_MODE_PROFILE makes certain defines visible to one core only .... you see the error you see.

I have not followed up through to see where the root fix is but one "quick" option is to select the BLE to run on both cores and the error goes away. ... This was OK for me as that is what I wanted but if you definitely want to restrict the code to one Core then I am not sure ... but I hope this gives you new avenues to explore.

William

Thanks for the suggestion, William.  That did get the compile past where I was stuck.

However, it immediately ran into another error in the cy_ble.c module:

conflicting types for  'cy_cle_stackMemoryRam'

in the line starting with "CY_ALIGN":

/* Allocate RAM memory for the stack. This buffer can be reused by the application when

* the BLE Middleware is stopped. For the export mode, the buffer is allocated in a heap.

*/

#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 */

This is again code generated by creator 4.3 and therefore I should not be seeing the error.  But, because it is a build error, the compiler stops.  So, again, I am stuck.

Any ideas as to how to get around this problem?

0 Likes

I found that the compile time variable CY_BLE_SHARING_MODE_EXPORT was not consistent in different files.  in the cy_ble.c  generated file its value was 1 and in the cy_ble.h file it was 0 resulting in conflicting definitions.  I don't have any control for fixing this.

However, after erasing all the creator 4.3 generated files, performing a project "clean" and recompiling, the problem magically went away. 

0 Likes
StNu_1610991
Level 4
Level 4
First comment on KBA 50 sign-ins 25 replies posted

I have tried different ways of adding the BLE component and configuring it but they all end up with similar compile errors.  The BLE was also moved to CM4 with the same results.

The compile errors involve only symbols and modules generated by the Creator itself so they must be generation errors.

Is there a modification that could be made to the generated header files to get around these problems?

0 Likes