cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

VaIk_2708246
New Contributor II

Hi

Is there a way to modify an existing component cy_lfclk?

I can import it on the components tab, I can change the code. But I can't figure out how to connect it to the project?
How to replace a component in a project with a modified one?

0 Likes
1 Solution
Ekta
Moderator
Moderator

Hello @VaIk_2708246 

Can you please check if you imported the same version of the cy_lfclk as used by you in the project?

In PSoC Creator, in workspace explorer right click on project and select Update components. Here, you can see the version of cy_lfclk used in the project.

Ekta_0-1615366438322.png

 

Import the correct version of the cy_lfclk

Ekta_1-1615366491698.png

I am attaching a project where I have made the same changes and shown in the images attached by you in the previous response. I can see the change in the generated source file as well.

I have followed the following steps:

1. Create a new project.

2. Check the version of the cy_lfclk in project and import the same version in the project.

3. Make changes in the component files present under the components tab

4. Build the project to create the generated source.

In case if you still see the issue, you can try skip code generation option as well.

Go to the Build Settings of the project, in the code generation section select skip code generation option to true. In this case you should be able to retain the changes you have made in the generated source of the project

Ekta_2-1615368080167.png

Best Regards

Ekta

 

View solution in original post

0 Likes
3 Replies
Ekta
Moderator
Moderator

Hi @VaIk_2708246 

After importing the the cy_lfclk component you can directly make changes in the cy_lfclk component files available under the components tab of the Workspace explorer

Ekta_0-1614874650005.png

After making the changes, save the files and build the project.

In the generated source (under the source tab of workspace explorer) of the project you would notice that the changes you have just made are being reflected.

Ekta_1-1614874793376.png

So, PSoC Creator will be using the updated files in the imported component.

Best Regards

Ekta

 

 

0 Likes
VaIk_2708246
New Contributor II

Thanks, but it doesn't work for me. Therefore, this question arose. I imported the component cy_lfclk_v1_20, then edited CyLFClk.c, saved it and re-compiled the project. There are no such changes in the Generated_Source \ PSoC4 \ CyLFClk.c file. I attach pictures. There, for example, I commented out one line in the imported component, however, in the source generated after this, you can see that the line is uncommented.

0 Likes
Ekta
Moderator
Moderator

Hello @VaIk_2708246 

Can you please check if you imported the same version of the cy_lfclk as used by you in the project?

In PSoC Creator, in workspace explorer right click on project and select Update components. Here, you can see the version of cy_lfclk used in the project.

Ekta_0-1615366438322.png

 

Import the correct version of the cy_lfclk

Ekta_1-1615366491698.png

I am attaching a project where I have made the same changes and shown in the images attached by you in the previous response. I can see the change in the generated source file as well.

I have followed the following steps:

1. Create a new project.

2. Check the version of the cy_lfclk in project and import the same version in the project.

3. Make changes in the component files present under the components tab

4. Build the project to create the generated source.

In case if you still see the issue, you can try skip code generation option as well.

Go to the Build Settings of the project, in the code generation section select skip code generation option to true. In this case you should be able to retain the changes you have made in the generated source of the project

Ekta_2-1615368080167.png

Best Regards

Ekta

 

View solution in original post

0 Likes