Code No Longer compiles after Device Selector

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

cross mob
Anonymous
Not applicable

So my code compiled fine when I was using CYBLE-222014-01.   Then I realized I needed to test this on the CY8C4248LQI-BL583 since that is part of the development kit I have.  So I changed to that device, but when I did so, I got all the following errors after the build:  Mostly unable to find typedefs defined in ctypes.h file and incompatible pointer types.  I made no changes to my own code that would have resulted in this.

pastedImage_0.png

So I decided to go back to the CYBLE-222014-01 device, as the last known good version.  However, now I get the same errors on that version!   It shouldn't work that way. The application should be smart enough to recreate the same conditions for a successful build as long as nothing else has changed.

I am using PSOC Creator 4.1 Update 1

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please check that  whether you  have project.h referenced in your  global.h file.

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

Did you try "Clean and Build" or just "Build"?

0 Likes
Anonymous
Not applicable

Both

0 Likes
Anonymous
Not applicable

Hmmmm; Creating the example Alert Notification Profile Example Project for the CYBLE-222014-01 and changing it to the CY8C4248LQI-BL583 using right-click on the project file and selecting "device selector" works fine for me.

Are you including #include <project.h> in your file(s)?

0 Likes
Anonymous
Not applicable

Since I constructed my code from source code that Cypress provided (e.g, Central and Peripheral, UART-to-BLE, Peripheral and Broadcasting,etc.), I assume they provided all the necessary references to have the project compile correctly. As I said, it did before I changed the device reference. What changed? The errors appear to reference code Cypress provided, not code which I added.

I am seeing cytypes.h (under cy_boot folder) clearly in the project that is not compiling correctly. Line 466 and on give the definitions to types that are declared elsewhere in the project. Yet it is not being seeing. Why? Nor is CYBLE_API_RESULT_T also referenced in the same file.

The file that is erroring out is BLE_StackGatt.h. At the top of this provided file are no include files. I assume Psoc creator has a method for these files to find references without them being specifically stated within the file themselves. Somehow it is able to reference the project.h file which is part of the project structure.

0 Likes
Anonymous
Not applicable

The unknown types generally means that you forgot to include declarations for how the types are declared/handled by the compiler.

Thus, you need to #include the files to contain the declarations for those types.

Hmmm, yeah; The auto-generated files are pretty much "leave alone" for me. So, if those are the ones causing the issue, perhaps deleting and regenerating the auto-generated files will fix the issue?

Also, there were some complaints surrounding the PSoC Creator version 4.0 to 4.1 update, so potentially this might be related.

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please check that  whether you  have project.h referenced in your  global.h file.

0 Likes