This commit is contained in:
Nav
2024-06-05 19:33:18 +01:00
parent 500883af0c
commit 8aad5b9095
2 changed files with 9 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat
} }
/* /*
* GDB allows for a maximum SP size of 2 bytes. We enforce this here. * GDB allows for a maximum SP size of 2 bytes. We confirm this here.
* *
* For more, see GDB's read/write register packets for AVR targets. * For more, see GDB's read/write register packets for AVR targets.
*/ */
@@ -128,8 +128,6 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat
$this->validateDebugWireParameters($tdf->getDebugWireParameters(), $tdf) $this->validateDebugWireParameters($tdf->getDebugWireParameters(), $tdf)
); );
$failures = array_merge($failures, $this->validateIspParameters($tdf->getIspParameters()));
if (!in_array(AvrPhysicalInterface::ISP, $physicalInterfaces)) { if (!in_array(AvrPhysicalInterface::ISP, $physicalInterfaces)) {
$failures[] = 'Missing ISP interface for debugWIRE target'; $failures[] = 'Missing ISP interface for debugWIRE target';
} }
@@ -151,6 +149,10 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat
} }
} }
if (in_array(AvrPhysicalInterface::ISP, $physicalInterfaces)) {
$failures = array_merge($failures, $this->validateIspParameters($tdf->getIspParameters()));
}
if ( if (
in_array(AvrPhysicalInterface::JTAG, $debugPhysicalInterfaces) in_array(AvrPhysicalInterface::JTAG, $debugPhysicalInterfaces)
&& $family == AvrFamily::MEGA && $family == AvrFamily::MEGA
@@ -340,7 +342,7 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat
/* /*
* Bloom removes the IO memory segment offset when sending some of these params to the debug tool. This means * Bloom removes the IO memory segment offset when sending some of these params to the debug tool. This means
* we assume that the offset has already been applied to the params. We enforce this here. * we assume that the offset has already been applied to the params. We confirm this here.
*/ */
if (($ioMemorySegment = $tdf->getIoMemorySegment()) instanceof MemorySegment) { if (($ioMemorySegment = $tdf->getIoMemorySegment()) instanceof MemorySegment) {
if ($parameters->osccalAddress < $ioMemorySegment->startAddress) { if ($parameters->osccalAddress < $ioMemorySegment->startAddress) {
@@ -530,7 +532,7 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat
/* /*
* Bloom removes the IO memory segment offset when sending some of these params to the debug tool. This means * Bloom removes the IO memory segment offset when sending some of these params to the debug tool. This means
* we assume that the offset has already been applied to the params. We enforce this here. * we assume that the offset has already been applied to the params. We confirm this here.
*/ */
if (($ioMemorySegment = $tdf->getIoMemorySegment()) instanceof MemorySegment) { if (($ioMemorySegment = $tdf->getIoMemorySegment()) instanceof MemorySegment) {
if ($parameters->osccalAddress < $ioMemorySegment->startAddress) { if ($parameters->osccalAddress < $ioMemorySegment->startAddress) {

View File

@@ -932,7 +932,7 @@ class ValidationService
$failures = []; $failures = [];
foreach ($targetPeripheral->registerGroups as $registerGroup) { foreach ($targetPeripheral->registerGroups as $registerGroup) {
$failures = array_merge($failures, $this->validateTargetRegisterGroup($registerGroup, $tdf));; $failures = array_merge($failures, $this->validateTargetRegisterGroup($registerGroup, $tdf));
} }
return array_map( return array_map(
@@ -952,6 +952,7 @@ class ValidationService
!empty($registerGroup->addressSpaceKey) !empty($registerGroup->addressSpaceKey)
&& ($addressSpace = $tdf->getAddressSpace($registerGroup->addressSpaceKey)) instanceof AddressSpace && ($addressSpace = $tdf->getAddressSpace($registerGroup->addressSpaceKey)) instanceof AddressSpace
) { ) {
// Ensure that all target registers reside in a known memory segment and do not span multiple segments
foreach ($registerGroup->registers as $register) { foreach ($registerGroup->registers as $register) {
$intersectingSegments = $addressSpace->findIntersectingMemorySegments( $intersectingSegments = $addressSpace->findIntersectingMemorySegments(
$register->address, $register->address,