From fd541d0d4d522609383cf3d91e4a6e67a40293ed Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 29 Jun 2021 22:33:54 +0100 Subject: [PATCH] Blocked use of ambiguous "avr8" target name in configuration file, for UPDI sessions. --- .../VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp index 9e1bacf9..961266ff 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp @@ -487,9 +487,16 @@ void EdbgAvr8Interface::configure(const TargetConfig& targetConfig) { this->physicalInterface = selectedPhysicalInterface; - if (this->physicalInterface == PhysicalInterface::JTAG && !this->family.has_value()) { - throw InvalidConfig("Cannot use JTAG physical interface with ambiguous target name - please specify the" - " exact name of the target in your configuration file. See https://bloom.oscillate.io/docs/supported-targets"); + if (!this->family.has_value()) { + if (this->physicalInterface == PhysicalInterface::JTAG) { + throw InvalidConfig("Cannot use JTAG physical interface with ambiguous target name - please specify the" + " exact name of the target in your configuration file. See https://bloom.oscillate.io/docs/supported-targets"); + + } else if (this->physicalInterface == PhysicalInterface::UPDI) { + throw InvalidConfig("Cannot use UPDI physical interface with ambiguous target name - please " + "specify the exact name of the target in your configuration file. " + "See https://bloom.oscillate.io/docs/supported-targets"); + } } this->configVariant = this->resolveConfigVariant().value_or(Avr8ConfigVariant::NONE);