diff --git a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php index 2ac2f48e..31290202 100644 --- a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php +++ b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php @@ -415,17 +415,3 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile return $failures; } } - -//$j = new Avr8TargetDescriptionFile( -// "/home/nav/Projects/Bloom/build/resources/TargetDescriptionFiles/AVR/AVR8/MEGAAVR/ATMEGA48P.xml" -//); -// -//$h = new Avr8TargetDescriptionFile( -// "/home/nav/Projects/Bloom/build/resources/TargetDescriptionFiles/AVR/AVR8_XMEGA/AVR_XMEGA/ATXMEGA16C4.xml" -//); -// -//$jj = $j->validate(); -// -//$hh = $h->validate(); -// -//echo "Done\n"; diff --git a/build/scripts/TargetDescriptionFiles/TargetDescriptionFile.php b/build/scripts/TargetDescriptionFiles/TargetDescriptionFile.php index 8834e771..7cac899b 100644 --- a/build/scripts/TargetDescriptionFiles/TargetDescriptionFile.php +++ b/build/scripts/TargetDescriptionFiles/TargetDescriptionFile.php @@ -317,16 +317,16 @@ class TargetDescriptionFile } if (empty($this->variants)) { -// $failures[] = 'Missing target variants'; + $failures[] = 'Missing target variants'; } -// foreach ($this->variants as $variant) { -// $variantValidationFailures = $variant->validate(); -// -// if (!empty($variantValidationFailures)) { -// $failures[] = 'Variant validation failures: ' . implode(", ", $variantValidationFailures); -// } -// } + foreach ($this->variants as $variant) { + $variantValidationFailures = $variant->validate(); + + if (!empty($variantValidationFailures)) { + $failures[] = 'Variant validation failures: ' . implode(", ", $variantValidationFailures); + } + } return $failures; } diff --git a/build/scripts/ValidateAvr8TargetDescriptionFiles.php b/build/scripts/ValidateAvr8TargetDescriptionFiles.php index 5100fabb..ab595a2f 100644 --- a/build/scripts/ValidateAvr8TargetDescriptionFiles.php +++ b/build/scripts/ValidateAvr8TargetDescriptionFiles.php @@ -4,6 +4,7 @@ namespace Bloom\BuildScripts; require_once __DIR__ . "/TargetDescriptionFiles/Factory.php"; +print "Loading AVR8 target description files.\n"; $avr8Tdfs = TargetDescriptionFiles\Factory::loadAvr8Tdfs(); $failedValidationCount = 0; diff --git a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp index d697cbf0..18d3a5f5 100644 --- a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp +++ b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp @@ -119,9 +119,10 @@ void GdbRspDebugServer::serve() { if (!this->clientConnection.has_value()) { Logger::info("Waiting for GDB RSP connection"); - while (!this->clientConnection.has_value()) { + do { this->waitForConnection(); - } + + } while (!this->clientConnection.has_value()); this->clientConnection->accept(this->serverSocketFileDescriptor); Logger::info("Accepted GDP RSP connection from " + this->clientConnection->getIpAddress()); @@ -334,8 +335,8 @@ void GdbRspDebugServer::handleGdbPacket(CommandPackets::WriteGeneralRegisters& p try { auto registerDescriptor = this->getRegisterDescriptorFromNumber(packet.registerNumber); this->targetControllerConsole.writeGeneralRegisters({ - TargetRegister(registerDescriptor, packet.registerValue) - }); + TargetRegister(registerDescriptor, packet.registerValue) + }); this->clientConnection->writePacket(ResponsePacket({'O', 'K'})); } catch (const Exception& exception) { diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.hpp b/src/Targets/Microchip/AVR/AVR8/Avr8.hpp index c6bee045..0316fbab 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.hpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.hpp @@ -21,7 +21,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit class Avr8: public Target { protected: - DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* avr8Interface; + DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* avr8Interface = nullptr; std::string name = ""; std::optional family; std::optional targetDescriptionFile; diff --git a/src/Targets/Target.hpp b/src/Targets/Target.hpp index 1ced5b19..d34d920e 100644 --- a/src/Targets/Target.hpp +++ b/src/Targets/Target.hpp @@ -162,7 +162,7 @@ namespace Bloom::Targets * Once at least one of the above conditions are met, the TargetController will break out of the loop and use * the last promoted target instance from there onwards. * - * See TargetController::startup() for more on this. + * See TargetController::acquireHardware() for more on this. * * @return */