[Custom components] How to identify a PSoC6?

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

cross mob
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Hi,

I'm working on a custom component (https://github.com/C47D/nRF24_Component) and would like to add support for PSoC6 devices

With PSoC5LP and PSoC4 a couple of defines were available to identify them:

CY_PSOC5 and CY_PSOC4 respectively.

Couldn't find CY_PSOC6, so my question is: is a define available to identify i'm using a PSoC6 on my project? or any other way to do this?

Regards,

Carlos

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

Hello Carlos,

Currently we do not have any defines, which identifies PSoC 6 in a code. However, we have defines for part number, which you can use to  identify PSoC 6. And you can even remove codes depending on the part# you are using.

Something like below for PSoC 63 family:

#if defined (CY8C6336BZI_BLF03)   

#elif defined (CY8C6316BZI_BLF03)   

#elif defined (CY8C6316BZI_BLF53)   

#elif defined (CY8C6336BZI_BLD13)   

#elif defined (CY8C6347BZI_BLD43)   

#elif defined (CY8C6347BZI_BLD33)   

#elif defined (CY8C6347BZI_BLD53)   

#elif defined (CY8C6347FMI_BLD13)   

#elif defined (CY8C6347FMI_BLD43)   

#elif defined (CY8C6347FMI_BLD33)   

#elif defined (CY8C6347FMI_BLD53)   

#else

    #define CY_NON_PSOC6

#endif

#ifndef CY_NON_PSOC6

    #define CY_PSOC6

#endif

You can also define CY_PSOC6 in the additional preprocessor defines in the compiler settings for both M0+ and M4 when building for PSoC 6.

Regards,

Meenakshi Sundaram R

View solution in original post

0 Likes
2 Replies
MeenakshiR_71
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello Carlos,

Currently we do not have any defines, which identifies PSoC 6 in a code. However, we have defines for part number, which you can use to  identify PSoC 6. And you can even remove codes depending on the part# you are using.

Something like below for PSoC 63 family:

#if defined (CY8C6336BZI_BLF03)   

#elif defined (CY8C6316BZI_BLF03)   

#elif defined (CY8C6316BZI_BLF53)   

#elif defined (CY8C6336BZI_BLD13)   

#elif defined (CY8C6347BZI_BLD43)   

#elif defined (CY8C6347BZI_BLD33)   

#elif defined (CY8C6347BZI_BLD53)   

#elif defined (CY8C6347FMI_BLD13)   

#elif defined (CY8C6347FMI_BLD43)   

#elif defined (CY8C6347FMI_BLD33)   

#elif defined (CY8C6347FMI_BLD53)   

#else

    #define CY_NON_PSOC6

#endif

#ifndef CY_NON_PSOC6

    #define CY_PSOC6

#endif

You can also define CY_PSOC6 in the additional preprocessor defines in the compiler settings for both M0+ and M4 when building for PSoC 6.

Regards,

Meenakshi Sundaram R

0 Likes

Hi Meenakshi,

Thanks for the reply, for now i'm just using

#if defined (CY_GPIO_H)

so far it works because PSoC6 devices are the only devices (that i know of) that does that define, so it's a little bit easier for me to maintain it.

Regards

Carlos

0 Likes