cyfitter_sysint.h format questions

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

cross mob
CoreyW_81
Employee
Employee
50 sign-ins 50 replies posted 25 replies posted

When I configure the interrupt for a watchdog on the PSOC 6 CM0+ core, the compiler generates a file called cyfitter_sysint.h. Here are the file contents I would like some clarification on:

/* WDTIsr */

#define WDTIsr__INTC_CORTEXM0P_ASSIGNED 1

#define WDTIsr__INTC_CORTEXM0P_MUX 8u

#define WDTIsr__INTC_CORTEXM0P_PRIORITY 3u

#define WDTIsr__INTC_NUMBER 22u

#define WDTIsr_INTC_CORTEXM0P_ASSIGNED 1

#define WDTIsr_INTC_CORTEXM0P_MUX 8u

#define WDTIsr_INTC_CORTEXM0P_PRIORITY 3u

#define WDTIsr_INTC_NUMBER 22u

Q1) Why are there 2 versions of the same #define, one with a single underscore and one with a double underscore?

Q2) What is the purpose of the "ASSIGNED" define, it is not used anywhere in the firmware?

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Q1) Why are there 2 versions of the same #define, one with a single underscore and one with a double underscore?

Creator originally used the version with two underscores to prevent macro names from colliding with macros from sub-instances. Sub-instances are hierarchical child blocks. An interrupt is a primitive so it cannot contain sub-blocks but a user-defined component may have sub-blocks. Based on a marketing/customer request, Creator also generates a version without the double underscore when possible.

Q2) What is the purpose of the "ASSIGNED" define, it is not used anywhere in the firmware?

The _ASSIGNED macros reflect the value of the interrupt CPU assignment option from the project’s DWR settings. It is provided for user application and hence is not used anywhere in the firmware.

Regards,

Dheeraj

View solution in original post

1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Q1) Why are there 2 versions of the same #define, one with a single underscore and one with a double underscore?

Creator originally used the version with two underscores to prevent macro names from colliding with macros from sub-instances. Sub-instances are hierarchical child blocks. An interrupt is a primitive so it cannot contain sub-blocks but a user-defined component may have sub-blocks. Based on a marketing/customer request, Creator also generates a version without the double underscore when possible.

Q2) What is the purpose of the "ASSIGNED" define, it is not used anywhere in the firmware?

The _ASSIGNED macros reflect the value of the interrupt CPU assignment option from the project’s DWR settings. It is provided for user application and hence is not used anywhere in the firmware.

Regards,

Dheeraj