This script makes it easy to manage your PSoC Creator project with Git using Windows PowerShell. A .gitignore file is provided that works whether or not you decide to use this script.
Tested with PSoC Creator 4.2 on Windows 10
- Install Git
- Make sure Git is set up with your PATH
- Create a new repository
- In the PSoC Creator project directory:
git init
git remote add ...
- Make sure you are logged in to GitHub (or GitLab, BitBucket, etc.)
- Copy the .gitignore and .ps1 file to your project directory. Review them and make any changes. A helpful, but somewhat out-of-date, guide from Cypress about version control can be found here
Open PowerShell and invoke the .ps1 script, or right-click it and select "Run with PowerShell." Note that you may get a script execution warning, just press Y
You will see all the files that were added, and then you will be prompted for a commit message. Hopefully, the changes will commit and push to the repo
Actually, any files from Generated_Source/ folder should not be modified by user code. For example, all the ISRs from USB_episr.c have entry and exit callbacks. You can enable those callbacks by defining special constants in 'cyapicallbacks.h' and write your own implementation. Read the USBFS datasheet carefully on that.
For example, this is the code from my cyapicallbacks.h for endpoint 2: