cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

Anonymous
Not applicable

 I just started working on making my first PSoC component, and I am a little bit confused about something. I did a schematic of the part, but I'm not sure how to access the hardware that I put in my schematic.

   

For example, I included five digital output pins in my schematic. How do I access those pins in my API files? When using components in a project you generate the application, and then you can use that components autogenerated API to access the hardware, but when I try to generate an application for the schematic in my component the API files for the pins don't seem to be made?

   

I've read through the component author guide, but I can't find this information.

   

I'm sure the answer is super simple, but I just can't think of how to do it!

   

I am using PSoC Creator 2.2 at the moment.

   

 

   

Thank you!

0 Likes
14 Replies
Anonymous
Not applicable
        Hi Fredjikrang   
A few answers comes up   
1) To access from API, you would be better to use Control Register   
or Status Register module.   
2) To Access from TopDesign to your module, Use I/O terminal   
That shows component tool box.   
   
Please refer component bundle design in this article...   
http://www.cypress.com/?app=forum&id=2492&rID=86654   
0 Likes
Anonymous
Not applicable
        Ah, the First bundle is made for Creator 2.2   
0 Likes
Bob_Marlowe
Expert II

Additionally you may read the documentation at www.cypress.com/ on my experienced to create a component using IO-pins

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Okay, so I've been able to figure all of that out. Thank you! (This PDF was also very useful: intro%20to%20API%20Generation.pdf )

   

Now I have my component ready to test, but I can't find it! In the project I want to use it in I can't see a "Default" section of the component catalog, so I can't add it to the schematic.

   

Do I have to add the component to my project somehow?

   

   

The component is for controlling stepper motors. I attached it below.

0 Likes
Anonymous
Not applicable
        Maybe your component structure was wrong   
My imported component was shown in default tab   
BTW, next time you would upload, be upload as a whole bundle project.   
Thank you   
0 Likes
Anonymous
Not applicable

 Okay, it looks like I had the component library in open as a seperate project in the same workspace, instead of open in the project I wanted to use it in. Thank you for the picture! I wouldn't have figured it out with it!

0 Likes
Anonymous
Not applicable
        PSoC3 folder is EXTRA, It not needed   
0 Likes
Anonymous
Not applicable

 Yeah, I know.

   

 

   

I am still getting some weird issues. Here is a test project that I have been trying to compile for PSoC 4. I have rewritten a lot of the component APIs to correct some mistakes that I made, and changed from pins to registers. But whenever I try to compile I get one error, and it is that "The command 'arm-none-eabi-gcc.exe' failed with exit code '1'."

   

 

   

Any ideas on why it is doing this? There are no other warnings or errors given.

0 Likes
Anonymous
Not applicable
        There are Hints in output window.   
"multiple define ..."   
Basically, Real instance, entity, class must not place in the header file.   
Only types, defines, external define can place in header.   
   
For example,   
//Initialize local values with defaults.   
int `$INSTANCE_NAME`_stepsPerRev = 200;   
...   
These have to place in steper.c   
and if you want to use it for global reference,   
You have to place external define in header file   
extern int `$INSTANCE_NAME`_stepsPerRev;   
...   
If it is not global value then use "static int stepsPerRev;"   
That's it   
0 Likes
Anonymous
Not applicable

 Oy. You are right. Can't beleive I forgot that!

   

 

   

Thank you again! It is working now!

0 Likes
Anonymous
Not applicable

Hi,

   

I also have a question about this issue.

   

I have made a seperate workspace for modified Cypress components. In that workspace I see at the component project the Default tab (according the video about this case) withe the modfied component. So far so good.

   

But when I made a new project in an other workspace and want to use the modfied component, I don't see the Default tab.

   

What I'm doing wrong?  Please explain how I have to cutomize my creater to see my own (modified) modules in every new project?

   

Thanks!

   

Rob

0 Likes
Anonymous
Not applicable
        Hi Roberto48   
I know one of the way,   
Export your component, so make a comp** file   
And Import it from your new design.   
I'm not sure the best way but this doable.   
   
In the case of PSoC1,   
Can designate the folder for components   
that is handy, but I don't know around Creator.   
0 Likes
Anonymous
Not applicable

Hi PSoC73,

   

Yes the ex- import method did the trick, thanks!

   

I'm a PSoC beginner and using the FreeSocMini.  My first project was to control a LED with a potmeter and PWM....

   

Now I'm trying to build my second project by controlling an I2C LCD with PCF8574 I/O and a rotary encoder.  I will modify the standard I2C_LCD module so it will work with PCF8574 commands. But that is not easy....  I first have to understand how the modules are working and what happens when they are compiled within a project.

   

Rob

0 Likes
Anonymous
Not applicable
        Hi Roberto48, Nice to hear doing well.   
Even it called components but behavior is same as Topdesign.   
Basically, SWD debugger is useful   
And you can place LED somthing to every wires,   
If you have oscillo-scope that would be good.   
and simple print debug that has uart tranfer with hyper terminal is also helpful.   
Cheers   
0 Likes