- Additional target config options.
- Some tidying
This commit is contained in:
@@ -209,20 +209,23 @@ namespace Targets::Microchip::Avr8
|
||||
|
||||
this->activated = true;
|
||||
|
||||
/*
|
||||
* Validate the target signature.
|
||||
*
|
||||
* The signature obtained from the device should match what we loaded from the target description file.
|
||||
*/
|
||||
const auto targetSignature = this->avr8DebugInterface->getDeviceId();
|
||||
if (this->targetConfig.signatureValidation) {
|
||||
/*
|
||||
* Validate the target signature.
|
||||
*
|
||||
* The signature obtained from the device should match what we loaded from the target description file.
|
||||
*/
|
||||
const auto targetSignature = this->avr8DebugInterface->getDeviceId();
|
||||
|
||||
if (targetSignature != this->signature) {
|
||||
throw Exception{
|
||||
"Failed to validate connected target - target signature mismatch.\nThe target signature"
|
||||
" (\"" + targetSignature.toHex() + "\") does not match the AVR8 target description signature (\""
|
||||
+ this->signature.toHex() + "\"). This will likely be due to an incorrect target name in the "
|
||||
+ "configuration file (bloom.yaml)."
|
||||
};
|
||||
if (targetSignature != this->signature) {
|
||||
throw Exception{
|
||||
"Failed to validate connected target - target signature mismatch.\nThe target signature"
|
||||
" (\"" + targetSignature.toHex() +
|
||||
"\") does not match the AVR8 target description signature (\""
|
||||
+ this->signature.toHex() + "\"). This will likely be due to an incorrect target name in the "
|
||||
+ "configuration file (bloom.yaml)."
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,5 +38,13 @@ namespace Targets::Microchip::Avr8
|
||||
if (targetNode["preserve_eeprom"]) {
|
||||
this->preserveEeprom = targetNode["preserve_eeprom"].as<bool>(this->preserveEeprom);
|
||||
}
|
||||
|
||||
if (targetNode["signature_validation"]) {
|
||||
this->signatureValidation = targetNode["signature_validation"].as<bool>(this->signatureValidation);
|
||||
}
|
||||
|
||||
if (targetNode["stop_all_timers"]) {
|
||||
this->stopAllTimers = targetNode["stop_all_timers"].as<bool>(this->stopAllTimers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,17 @@ namespace Targets::Microchip::Avr8
|
||||
*/
|
||||
bool preserveEeprom = true;
|
||||
|
||||
/**
|
||||
* Determines whether Bloom will check for an AVR signature mismatch between the signature in the TDF and the
|
||||
* connected target signature.
|
||||
*/
|
||||
bool signatureValidation = true;
|
||||
|
||||
/**
|
||||
* Determines whether Bloom will stop all timer peripherals on the target, when target execution is stopped.
|
||||
*/
|
||||
bool stopAllTimers = true;
|
||||
|
||||
explicit Avr8TargetConfig(const TargetConfig& targetConfig);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace Targets::RiscV
|
||||
|
||||
void RiscV::activate() {
|
||||
this->riscVDebugInterface->activate();
|
||||
this->stop();
|
||||
this->reset();
|
||||
}
|
||||
|
||||
void RiscV::deactivate() {
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace Targets
|
||||
virtual void setDebugTool(DebugTool* debugTool) = 0;
|
||||
|
||||
/**
|
||||
* This function should attempt to establish a connection with the target, and put it in a state where
|
||||
* debugging can be performed.
|
||||
* This function should attempt to establish a connection with the target, halt execution, and put it in a
|
||||
* state where debugging can be performed.
|
||||
*
|
||||
* If an exception is thrown from this function, the TargetController will treat it as a fatal error, and thus
|
||||
* will shutdown, along with the rest of Bloom.
|
||||
|
||||
Reference in New Issue
Block a user