diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 16209500..7c37f9ca 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -483,6 +483,21 @@ TargetParameters& Avr8::getTargetParameters() { return this->targetParameters.value(); } +void Avr8::activate() { + if (this->isActivated()) { + return; + } + + this->avr8Interface->init(); + + if (this->targetDescriptionFile.has_value()) { + this->avr8Interface->setTargetParameters(this->getTargetParameters()); + } + + this->avr8Interface->activate(); + this->activated = true; +} + std::unique_ptr Avr8::promote() { std::unique_ptr promoted = nullptr; @@ -513,16 +528,6 @@ std::unique_ptr Avr8::promote() { return promoted; } -void Avr8::activate() { - if (this->isActivated()) { - return; - } - - this->avr8Interface->init(); - this->avr8Interface->activate(); - this->activated = true; -} - void Avr8::deactivate() { try { this->avr8Interface->deactivate();