Control file PSoC component

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

cross mob
Anonymous
Not applicable

Hey everyone,

   

I am trying to make a dedicated component for future use, and I want that component to force a few pin assignments.

   

I found that you can use "control files" to do this, at least I thought so.
I tried the following line in the control file:
attribute port_location of Reset : label is "PORT(1,2)";

   

The pin instance name is Reset.

   

When I include this component en build the project, the pin is just randomly fitted like there was no control file.

   

What is it that I am doing wrong?

   

 

   

Kind regards,
Niels Kool

0 Likes
6 Replies
Anonymous
Not applicable

I found the answer(partial) :
attribute port_location of Reset : label is "PORT(1,2)";
The pin instance name is Reset, but the pin itself is Reset(0).

   

So this added up to:
attribute port_location of \`$INSTANCE_NAME`:Reset(0)\ : label is "PORT(0,4)";

   

But I still have one problem left... this can be overridden. 
When the user has overridden the control file they only get a "note message" I would like it to be an error.... is this possible?

   

 

   

//edit
I think this should be done through the validator parameters, but I can't find anything about how I can retrieve the port location....

0 Likes
Anonymous
Not applicable

bump

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi Niels,

   

 

   

if I remember correctly, there's a project setting which treats warnings as errors. However, I don't know if this only applies to the C code or the whole project.

   

You can also ask technical support about this, maybe they can help - it's an uncommon issue (I don't know any components which uses fixed locations except where dedicated hardware function pins exist), but it would be useful to know. If you open a support case, please keep this post updated.

   

If there are any components with fixed functions in the PSoC component library you might want to check how they work.

   

 

   

Regards,

   

 

   

Ralf

0 Likes
Anonymous
Not applicable

Hi Ralf

   

Thanks, for the tip. I sort of assumed that technical support also responded to questions here.

   

I will update this post with the answer.

   

Regards,

   

Niels

0 Likes
Anonymous
Not applicable

On psoc5lp usbfs should be locked to dm and dp in it's code. Maybe look at it.

0 Likes
Anonymous
Not applicable

Yea tried finding this in the usb component, but couldn't find it. Also suggested this in the support ticket.

   

Still figuring out, will update when i know more.

   

//edit

   

unfortunately this is not possible at the moment.
Support staff:

   
    


The update I got from the Creator developer team is as follows The tool offers multiple ways to assign pins. I understand that you want to protect the pin choices but the whole point of Creator is to allow them to be edited! If we changed the warning to an error then other users would be negatively impacted. So considering the whole purpose of PSoC's flexibility this feature is not likely to be implemented. We are sorry if this causes inconvenience to you.

   
   

will have to stick with warnings then. 

0 Likes