Skip to content

Commit

Permalink
vivado: Do not exit at target open error
Browse files Browse the repository at this point in the history
Prevent the forwarding of an error generated by `open_hw_target` and
continue with possible further targets.
  • Loading branch information
towoe authored and olofk committed Aug 26, 2019
1 parent f60069e commit 6bb5c7a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions edalize/templates/vivado/vivado-program.tcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ set found 0

foreach { hw_target } [get_hw_targets] {
current_hw_target $hw_target
open_hw_target
foreach { hw_device } [get_hw_devices] {
if { [string first [get_property PART $hw_device] $part] == 0 } {
puts "Found hardware target with a ${part} device."
current_hw_device $hw_device
set found 1
break
if {[catch {open_hw_target} res_open_hw] == 0} {
foreach { hw_device } [get_hw_devices] {
if { [string first [get_property PART $hw_device] $part] == 0 } {
puts "Found hardware target with a ${part} device."
current_hw_device $hw_device
set found 1
break
}
}
if {$found} {break}
} else {
puts "Catched $res_open_hw"
}
if {$found} {break}
close_hw_target
}
if { $found == 0 } {
Expand Down

0 comments on commit 6bb5c7a

Please sign in to comment.