Custom Component API c file error

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

cross mob
lock attach
Attachments are accessible only for community members.
dafa_1669371
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

Hello 

   


i am using a DDS function generator AD9850 Module , it work fine with the code but when i try to make a 

   

Custom Component i try to use an API as the component in the psoc like the lcd for example

   

i use only two functions  AD9850 start and AD9850 send frequency but i had this error

   


Build error: undefined reference to `AD9850_1_Start'

   

Build error: undefined reference to `AD9850_1_sendFrequency'

   

attached is the component project 

   

thanks in advanced 

   

David;

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

As an alternative to external DDS chip (AD9850) you may consider using a DDS24 or DDS32 custom community components

   

http://www.cypress.com/forum/psoc-community-components/dds24-24-bit-dds-...

   

http://www.cypress.com/comment/405656#comment-405656

View solution in original post

0 Likes
8 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Your generated file names are wrong, the component name is appended once more to the generated .c and .h files. Afaik this is a setting explained in the "Component Author Guide".

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        As per Bob Marlowe description, the component API prefix has not been set in the Component properties. In Component symbol file, right-mouse click and select 'properties' in the bottom of the menu. In the component API prefix add Component actual name for .c and .h files. (In your case "AD9850" ). When you build project, check generated file names in the project explorer. They should be accordingly "AD9850_1.c" and "AD9850_1.h", and not "AD9850_1_AD9850_1.c"...   
0 Likes
lock attach
Attachments are accessible only for community members.

Hello 
i did that but still i had the same error 

   

   

0 Likes
dafa_1669371
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

i had a question here 
did the video tutorial for the component creation dropped something should be done 
because in the tutorial there wasn't any coding 
thanks 

   

David;
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I did it too, but I got different errors.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

David,

   

you should add a prefix `$INSTANCE_NAME`_ on every procedure name, pin name, and global variable inside component, e.g.

   

void `$INSTANCE_NAME`_Start(void)

   

instead of

   

void Start(void)

   

 

   

I made corrections to make project compile (attached), but apparently the project is incomplete, so more work needed.   

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

As an alternative to external DDS chip (AD9850) you may consider using a DDS24 or DDS32 custom community components

   

http://www.cypress.com/forum/psoc-community-components/dds24-24-bit-dds-...

   

http://www.cypress.com/comment/405656#comment-405656

0 Likes
dafa_1669371
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

Hello Odissey 

thanks for your support i really appreciate it 

`$INSTANCE_NAME`_ on every procedure name, pin name, and global variable is what exactly make it didn't work with me , now problem solved it wok just fine 
 

   

thanks again 🙂

0 Likes