Blocked use of ambiguous "avr8" target name in configuration file, for UPDI sessions.

This commit is contained in:
Nav
2021-06-29 22:33:54 +01:00
parent 1526453105
commit fd541d0d4d

View File

@@ -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);