Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

Tim_Shih
Level 4
Level 4
50 replies posted 50 questions asked 100 sign-ins

Hi ~ all,

I use Cap sense sample code but there are 2 error messages in the following description.

Could anyone know what happened ?!

main.c:121:55: error: 'CapSense_BUTTON0_WDGT_ID' undeclared (first use in this function)
CapSense_BUTTON0_WDGT_ID,
^
main.c:121:55: note: each undeclared identifier is reported only once for each function it appears in
main.c:122:55: error: 'CapSense_BUTTON0_SNS0_ID' undeclared (first use in this function)
CapSense_BUTTON0_SNS0_ID
^
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

Thank you so much.

0 Likes
1 Solution
Tim_Shih
Level 4
Level 4
50 replies posted 50 questions asked 100 sign-ins

I just tried again and I found there were no button in the cap sense block. After I add a new one, no error messages now. Thank you for your help.

View solution in original post

0 Likes
2 Replies
Roy_Liu
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 5 questions asked

Hi Tim,

This is mostly because of the Capsense Component name on your TopDesign is named as other than "Capsense"

Roy_Liu_1-1633787985343.png

 

or the Button name is not "Button0" in the Capsense component configurator:

Roy_Liu_0-1633787949965.png

 

 

Roy Liu
Tim_Shih
Level 4
Level 4
50 replies posted 50 questions asked 100 sign-ins

I just tried again and I found there were no button in the cap sense block. After I add a new one, no error messages now. Thank you for your help.

0 Likes