Summary
This blog expands on listings shown in several posts which provide details for GIT ignore files for PSoC Creator. When using GIT with an IDE such as PSoC Creator, the .gitignore file defines which files are required for the project and which files can be ignored. Details regarding the use of the ignore feature is available in numerous places, Atlassion being one of them.Examples shown in this blog cover PSoC 4 and PSoC 6 projects.
Existing Solutions
Below are the links to a few existing GIT ignore solutions for use with PSoC Creator and standard PSoC4 projects.
https://github.com/SorenHN/PSoC-gitignore/blob/master/.gitignore
https://github.com/github/gitignore/pull/2086/commits/7ffe05303d632f226d091f46079f1aa9cff933e9
https://git.2li.ch/various/gitignore/commit/5a355ed010640b689e06c589e38019bff81c9a15
Ignore File Additions
For Bootloadable PSoC 4/5 or PSoC6 projects, some additions were required to the existing ignore files.
# PSoC Creator 4.3
# Updated by : GregL
# Dated : 12/03/2020
# Details : Place this ignore file together with cywrk or alter directories to match the required structure
# PSoC Creator Folders to ignore (PSoC4/5)
*Archive/
*Backup/
*codegentemp/
*CortexM0/
*CortexM3/
*Export/
*Generated_Source/
# PSoC Creator Folders to ignore (PSoC6)
*armgcc/
*CortexM0p/
*CortexM4/
*iar/
*mdk/
# PSoC Creator Non-Bootloadable project files to ignore (PSoC4/5)
*_timing.html
# Bootloadable project files to ignore
**.cydsn/*timing.html
*.svd
*.rpt
*.cyfit
*.cycdx
*.log
*.tmp
*.txt
# PSoC Creator Non-Bootloadable project files to ignore (PSoC6)
*.icf
*.ld
*.scat
# Option for .ctl files used in some PSoC Creator examples
#*.ctl
# Option for .pdf files supplied by some PSoC Creator examples or those specifically created from Creator
#*.pdf
#*_datasheet.pdf
# Optional PSoC Creator Files to ignore (Export to IDE feature)
*.mk
makefile
# PSoC Creator User Files to ignore
*.cyprj.*
*.cywrk.*
# For external editors such as NotePad+++
*.bak
gitignore file |
To confirm the ignore file operation with PSoC Creator 4.3, three example projects were used from Code Examples in PSoC Creator. Two of the examples were PSoC 4 projects, one a standard application and the other a bootloader bootloadable application. The third test used a PSoC6 example.
Testing with SourceTree (PSoC4)
For a standard PSoC4 project the top folder in Windows may be similar to the example shown below.
Example PSoC4 Project Top Folder |
Example PSoC4 Project Design Folder |
Example PSoC4 Project in SourceTree using gitignore |
For a PSoC4 project with bootloader and bootloadable application, the top folder in Windows may be similar to the example shown below.
Example PSoC4 Bootloader Project Top Folder |
Example PSoC4 Project Bootloader Design Folder |
Example PSoC4 Project Bootloadable Design Folder |
Example PSoC4 Bootloader Project in SourceTree using gitignore |
For a standard PSoC6 project the top folder in Windows may be similar to the example shown below.
Example PSoC6 Project Top Folder |
Example PSoC6 Project Design Folder |
Example PSoC6 Project in SourceTree using gitignore |
Using an ignore file with version control software such as GIT can ensure that only pertinent files to build a project are retained. The ignore file configuration however should be reviewed when projects change and if a new release of the associated IDE software replaces a prior release.
The ignore file provided in this blog for GIT projects is therefore always a work in progress!
No comments:
Post a Comment