Browse Source

Filter out IP repos outside of the project directory

pull/7/head
Ricardo Barbedo 4 years ago
parent
commit
ba3730a542
2 changed files with 6 additions and 4 deletions
  1. +4
    -4
      README.md
  2. +2
    -0
      scripts/write_project_tcl_git.tcl

+ 4
- 4
README.md View File

@ -62,7 +62,7 @@ Vivado is a pain in the ass to source control decently, so these scripts provide
├── project_name.sim/ ├── project_name.sim/
├── project_name.srcs/ ├── project_name.srcs/
│ ├── sources_1/ │ ├── sources_1/
│ │ ├── bd/ # BDs are regenerated from script
│ │ ├── bd/ # BDs are regenerated from script
│ │ │ ├── my_bd/hdl/my_bd_wrapper.{v,vhd} # BD wrappers are also regenerated │ │ │ ├── my_bd/hdl/my_bd_wrapper.{v,vhd} # BD wrappers are also regenerated
│ │ │ └── ... │ │ │ └── ...
│ │ └── ... │ │ └── ...
@ -101,10 +101,10 @@ tracked by Git. If you need to manually modify the BD wrapper generated by Vivad
you can write a handwritten wrapper to the generated wrapper and put only the you can write a handwritten wrapper to the generated wrapper and put only the
handwritten one under source control. handwritten one under source control.
#### Board part repository paths
#### Board part and IP repositories paths
Only board part repositories inside the project are stored in the project
Only board part and IP repositories inside the project are stored in the project
generator script. generator script.
If you have a system wide board part repository, you will need to add it manually
If you have a system wide board part or IP repository, you will need to add it manually
after recreating the project from the Tcl script (e.g. via `Settings --> Board Repository`). after recreating the project from the Tcl script (e.g. via `Settings --> Board Repository`).

+ 2
- 0
scripts/write_project_tcl_git.tcl View File

@ -841,6 +841,8 @@ proc write_specified_fileset { proj_dir proj_name filesets } {
lappend path_list $path lappend path_list $path
} else { } else {
set rel_file_path "[get_relative_file_path_for_source $path [get_script_execution_dir]]" set rel_file_path "[get_relative_file_path_for_source $path [get_script_execution_dir]]"
# Filter out IP repositories outside of the project directory
if { [string first .. $rel_file_path] == 0 } { continue }
set path "\[file normalize \"\$origin_dir/$rel_file_path\"\]" set path "\[file normalize \"\$origin_dir/$rel_file_path\"\]"
lappend path_list $path lappend path_list $path
} }


Loading…
Cancel
Save