feat: validate JTAG Zynq part matches config.zynq_part (default XC7Z100)
Step 1 now compares detected part (e.g. XC7Z035) against config's zynq_part. If mismatch: log error, return False to block subsequent steps. Also returns False when no Zynq detected (was always True).
This commit is contained in:
+15
-1
@@ -811,9 +811,22 @@ class MainWindow(ctk.CTk):
|
||||
self._log_message(f" - {jtag_dev.name} ({dev_type})")
|
||||
|
||||
if jtag_result.is_present:
|
||||
detected_part = jtag_result.devices[0].part_number
|
||||
expected_part = self._config.zynq_part.upper()
|
||||
|
||||
# Validate part number matches expected
|
||||
if detected_part != expected_part:
|
||||
self._log_message(
|
||||
f" ✗ Wrong Zynq part: detected {detected_part}, expected {expected_part}"
|
||||
)
|
||||
self._jtag_status.configure(
|
||||
text=f"JTAG: {detected_part} ≠ {expected_part}", text_color=ERROR_COLOR
|
||||
)
|
||||
return False
|
||||
|
||||
self._zynq_jtag_present = True
|
||||
self._zynq_jtag_info = jtag_result.devices[0]
|
||||
part = jtag_result.devices[0].part_number
|
||||
part = detected_part
|
||||
|
||||
# Log PS and PL detection status
|
||||
ps_status = "✓" if jtag_result.ps_detected else "✗"
|
||||
@@ -828,6 +841,7 @@ class MainWindow(ctk.CTk):
|
||||
self._zynq_jtag_info = None
|
||||
self._log_message(f" ✗ Zynq not detected on JTAG: {jtag_result.error}")
|
||||
self._jtag_status.configure(text="JTAG: Not detected", text_color=WARNING_COLOR)
|
||||
return False
|
||||
|
||||
# Check UART availability
|
||||
self._log_message(" Checking UART serial port...")
|
||||
|
||||
Reference in New Issue
Block a user