| 1 |
# xsct tcl file |
| 2 |
|
| 3 |
set m_mode [lindex $argv 0] |
| 4 |
sdk setws . |
| 5 |
|
| 6 |
if {$m_mode == "init"} { |
| 7 |
|
| 8 |
set hdf_file [lindex $argv 1] |
| 9 |
hsi open_hw_design $hdf_file |
| 10 |
set cpu_name [lindex [hsi get_cells -filter {IP_TYPE==PROCESSOR}] 0] |
| 11 |
|
| 12 |
sdk createhw -name hw -hwspec $hdf_file |
| 13 |
sdk createapp -name xilsw -hwproject hw -proc $cpu_name -bsp bsp -app {Hello World} |
| 14 |
sdk createapp -name sw -hwproject hw -proc $cpu_name -bsp bsp -app {Empty Application} |
| 15 |
exit |
| 16 |
} |
| 17 |
|
| 18 |
if {$m_mode == "sources"} { |
| 19 |
|
| 20 |
for {set i 1} {$i < $argc} {incr i} { |
| 21 |
file copy -force [lindex $argv $i] sw/src/ |
| 22 |
} |
| 23 |
exit |
| 24 |
} |
| 25 |
|
| 26 |
if {$m_mode == "defines"} { |
| 27 |
|
| 28 |
sdk configapp -app sw build-config debug |
| 29 |
for {set i 1} {$i < $argc} {incr i} { |
| 30 |
sdk configapp -app sw define-compiler-symbols [lindex $argv $i] |
| 31 |
} |
| 32 |
sdk configapp -app sw build-config release |
| 33 |
for {set i 1} {$i < $argc} {incr i} { |
| 34 |
sdk configapp -app sw define-compiler-symbols [lindex $argv $i] |
| 35 |
} |
| 36 |
exit |
| 37 |
} |
| 38 |
|
| 39 |
if {$m_mode == "make-bsp-xilsw"} { |
| 40 |
|
| 41 |
sdk projects -build -type bsp -name bsp |
| 42 |
sdk projects -build -type app -name xilsw |
| 43 |
exit |
| 44 |
} |
| 45 |
|
| 46 |
sdk projects -build -type app -name sw |
| 47 |
exit |
| 48 |
|