You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.3 KiB

2 years ago
  1. # vitis_git
  2. Trying to make Vitis more git-friendly.
  3. ## Use this repository as template
  4. When you use this repository as template, in the new created repository you can delete this file and rename `README_PROJECT_TEMPLATE.md` to `README.md`.
  5. ### Requirements
  6. - Tested on Vitis 2020.2
  7. ### How it works
  8. Vitis is a little bit less pain in the ass than Vivado to version control decently, so this repository provide:
  9. - A good to start with `.gitignore` file.
  10. - Git-hook-scripts to eliminate absolute paths in project files.
  11. ### Workflow
  12. #### Create new project
  13. 1. Use this repository as template and take the `Git Content`.
  14. 2. Clone the new created repository - This folder will be the workspace folder.
  15. 3. Execute the following command in the workspace folder:
  16. - `git config --local core.hooksPath .githooks` - set path to git-hooks for this repository.
  17. 4. Copy the hardware specification file (.xsa) into the workspace folder.
  18. 5. Open Vitis and select the cloned folder as workspace - `vitis -workspace .`.
  19. 6. Create a new platform project called `hw_platform` and choose the copied hardware specification file.
  20. 7. Build the platform project.
  21. 8. Create a new application project via `File -> New -> Application Project...`, choose the platform created befor and name the application project as you want.
  22. 9. Execute the following commands in the workspace folder:
  23. - `git add .` - add all relevant files to the repository - Files that are not relevant are ignored by the `.gitignore` file.
  24. - `git commit -m 'create project'` - create project commit.
  25. #### Clone existing project
  26. 1. After cloning the repository execute the following commands in the cloned folder:
  27. - `git config --local core.hooksPath .githooks` - set path to git-hooks for this repository.
  28. - `git checkout BRANCH` - checkout the BRANCH you want to work with (e.g. `master`) which create local project files (because the hook script will be executed now ; this could take a while).
  29. 2. Open Vitis and select the cloned folder as workspace.
  30. 3. Click on `Inport Project`, choose `Import projects from Git` and click `Next >`.
  31. 4. Choose `Existing local repository` and click `Next >`.
  32. 5. Choose the cloned / workspace folder (should be the only entry) and click `Next >`.
  33. 6. Choose `Import existing Eclipse projects` and click `Next >`.
  34. 7. Leave everything unchanged and click `Finish`.