Clone and rename a component

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.
YaLe_3489106
Level 2
Level 2
10 replies posted 5 replies posted Welcome!

Hi,

I would like to create a custom UART. For that I'd like to start from the existing UART component, clone it, change some part of the code, and use it in my project.

So I created a new library project, imported the UART component, renamed it to MyUART_v1_10. I also rename the .cymacro, I also changed properties in MyUART_v1_10.cysym from UART to MyUART.

I then added the dependency to the Design project. now in the component list, I see a new version of UART [v1.10] instead of a MyUART component. And when I try to put it in my design, I get an error :

Failed to load assembly, 'C:\Users\XXX\AppData\Local\Cypress Semiconductor\PSoC Creator\4.2\customizer_cache\Library01_896d0d5e2abacff4905603f6c14cc753fa4bd574607d898ad0635376d04b1636.dll'

I probably need to change other things in the imported compoenent, but I don't really know what.
I see lines like "namespace UART_v2_50" in cs files, I probably need to change them to MyUART_v1_10 ? I tried but that doesn't help.

I attache the workspace in which I did the tests

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

YaLe,

Project attached, compiles OK. The key was to close the Creator and delete *.cyfit file. It seems to keep record to the old customizer assembly.

/odissey1

View solution in original post

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

YaLe,

I recommend to import it first into a project. This way it will be easy to modify and debug the component. (1) Rename the component, e.g. UART_ex_v2_50. (2) Use Find and Replace function to change all instances of the old name (UART_v2_50) in the entire project. There are a lot of them hiding in the customizer files *.cs, Verilog files *.v, etc.

(3) Now it should compile.

/odissey1

0 Likes

Hi,

I already added it in a project in the workspace I attached. I did what you suggested, and it renamed all the namespace elements. That changed nothing.

But there is no cycust or verilog files in the UART I imported ...

0 Likes
lock attach
Attachments are accessible only for community members.

YaLe,

Project attached, compiles OK. The key was to close the Creator and delete *.cyfit file. It seems to keep record to the old customizer assembly.

/odissey1

0 Likes