- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Using PSoC Creator V4.4. How can I insert my company's standard function headers and comment blocks? I have searched but cannot find anything in the published information. There is a Cypress video (less than 1 minute long) but it does not explain how to create or where to put a snippet.
Thanks in advance, SImon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SimonCanada,
So it appears that you cannot add new top-level folders but you can add subfolders. Please follow the below process.
So if I go to the c directory in the snippets directory and create a new directory:
And then create a file under that directory:
And then I change the snippet to do what I want:
I can then close and reopen PSoC Creator (as snippets are loaded at startup.)If I then open a project and go to a c code file, and select insert snippet I see this under c:
And it inserts like:
please try this .
Warm Regards,
Gautami J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simon,
Can you provide a link to a Cypress video you refered above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://www.youtube.com/watch?v=FIGeEAMg-tQ
This old video says what can be done but not how to do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I've not tried this, but I think it's what you're looking for.
Solved: Snippet and template support in PSoC creator 4.3 - Infineon Developer Community
Look in Creator User Guide for My Templates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
No, as that article explains, My Templates is for Template Applications, not for snippets. I am looking for some level of documentation for snippets. I had found and read that article before posting here: I had even less luck that that poster.
It appears that the guy putting the question in that article found, just as I did, that PSoC Creator keeps its snippets in C:\Program Files (x86)\Cypress\PSoC Creator\4.4\PSoC Creator\conf\snippets in sub-folders like "c", "ble" etc. However, simply adding new physical folders then restarting PSoC Creator does not make the new folder appear on the Edit | Snippets context menu.
One of my colleagues did succeed in making a Doxygen function header that worked just be adding to the C folder, but he found that PSoC Creator seems very fussy so the snippet is easily broken if changed. I tried various things but never got one to work even when I could get it to appear on the context menu or respond to tab-tab.
Kind regards, Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SimonCanada,
So it appears that you cannot add new top-level folders but you can add subfolders. Please follow the below process.
So if I go to the c directory in the snippets directory and create a new directory:
And then create a file under that directory:
And then I change the snippet to do what I want:
I can then close and reopen PSoC Creator (as snippets are loaded at startup.)If I then open a project and go to a c code file, and select insert snippet I see this under c:
And it inserts like:
please try this .
Warm Regards,
Gautami J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
As I said, a minor error in the implementation will confuse PSoC Creator and it will refuse to display. But I accept your explanation is as good as it is going to get with the current software.
Thanks, Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SimonCanada,
Glad your query has been resolved.
Please feel free to post any queries or issues you may have on Infineon products in the community and we will be happy to help.
Warm Regards,
Gautami J