Changed all bloom.yaml config keys/values to use snake_casing
This commit is contained in:
@@ -24,7 +24,6 @@ enum TargetPhysicalInterface: string
|
||||
self::UPDI => 'UPDI',
|
||||
self::DEBUG_WIRE => 'debugWIRE',
|
||||
self::SDI => 'SDI',
|
||||
default => 'Other'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,7 +33,7 @@ enum TargetPhysicalInterface: string
|
||||
self::JTAG => 'jtag',
|
||||
self::PDI => 'pdi',
|
||||
self::UPDI => 'updi',
|
||||
self::DEBUG_WIRE => 'debug-wire',
|
||||
self::DEBUG_WIRE => 'debug_wire',
|
||||
self::SDI => 'sdi',
|
||||
default => null
|
||||
};
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
environments:
|
||||
default:
|
||||
shutdownPostDebugSession: true
|
||||
shutdown_post_debug_session: true
|
||||
|
||||
tool:
|
||||
name: "xplained-pro"
|
||||
name: "xplained_pro"
|
||||
|
||||
target:
|
||||
name: "atmega4809"
|
||||
physicalInterface: "updi"
|
||||
hardwareBreakpoints: true
|
||||
physical_interface: "updi"
|
||||
hardware_breakpoints: true
|
||||
|
||||
server:
|
||||
name: "avr-gdb-rsp"
|
||||
ipAddress: "127.0.0.1"
|
||||
name: "avr_gdb_rsp"
|
||||
ip_address: "127.0.0.1"
|
||||
port: 1442
|
||||
rangeStepping: true
|
||||
range_stepping: true
|
||||
|
||||
insight:
|
||||
activateOnStartup: false
|
||||
activate_on_startup: false
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace DebugServer
|
||||
> DebugServerComponent::getAvailableServersByName() {
|
||||
return std::map<std::string, std::function<std::unique_ptr<ServerInterface>()>> {
|
||||
{
|
||||
"avr-gdb-rsp",
|
||||
"avr_gdb_rsp",
|
||||
[this] () -> std::unique_ptr<ServerInterface> {
|
||||
if (this->targetDescriptor.family != Targets::TargetFamily::AVR_8) {
|
||||
throw Exceptions::Exception{"The AVR GDB RSP server is only compatible with AVR8 targets."};
|
||||
@@ -57,7 +57,7 @@ namespace DebugServer
|
||||
}
|
||||
},
|
||||
{
|
||||
"riscv-gdb-rsp",
|
||||
"riscv_gdb_rsp",
|
||||
[this] () -> std::unique_ptr<ServerInterface> {
|
||||
if (this->targetDescriptor.family != Targets::TargetFamily::RISC_V) {
|
||||
throw Exceptions::Exception{"The RISC-V GDB RSP server is only compatible with RISC-V targets."};
|
||||
|
||||
@@ -8,13 +8,13 @@ namespace DebugServer::Gdb
|
||||
GdbDebugServerConfig::GdbDebugServerConfig(const DebugServerConfig& debugServerConfig)
|
||||
: DebugServerConfig(debugServerConfig)
|
||||
{
|
||||
if (debugServerConfig.debugServerNode["ipAddress"]) {
|
||||
if (YamlUtilities::isCastable<std::string>(debugServerConfig.debugServerNode["ipAddress"])) {
|
||||
this->listeningAddress = debugServerConfig.debugServerNode["ipAddress"].as<std::string>();
|
||||
if (debugServerConfig.debugServerNode["ip_address"]) {
|
||||
if (YamlUtilities::isCastable<std::string>(debugServerConfig.debugServerNode["ip_address"])) {
|
||||
this->listeningAddress = debugServerConfig.debugServerNode["ip_address"].as<std::string>();
|
||||
|
||||
} else {
|
||||
Logger::error(
|
||||
"Invalid GDB debug server config parameter ('ipAddress') provided - must be a string. The "
|
||||
"Invalid GDB debug server config parameter ('ip_address') provided - must be a string. The "
|
||||
"parameter will be ignored."
|
||||
);
|
||||
}
|
||||
@@ -32,25 +32,25 @@ namespace DebugServer::Gdb
|
||||
}
|
||||
}
|
||||
|
||||
if (debugServerConfig.debugServerNode["rangeStepping"]) {
|
||||
if (YamlUtilities::isCastable<bool>(debugServerConfig.debugServerNode["rangeStepping"])) {
|
||||
this->rangeStepping = debugServerConfig.debugServerNode["rangeStepping"].as<bool>();
|
||||
if (debugServerConfig.debugServerNode["range_stepping"]) {
|
||||
if (YamlUtilities::isCastable<bool>(debugServerConfig.debugServerNode["range_stepping"])) {
|
||||
this->rangeStepping = debugServerConfig.debugServerNode["range_stepping"].as<bool>();
|
||||
|
||||
} else {
|
||||
Logger::error(
|
||||
"Invalid GDB debug server config parameter ('rangeStepping') provided - value must be castable to "
|
||||
"Invalid GDB debug server config parameter ('range_stepping') provided - value must be castable to "
|
||||
"a boolean. The parameter will be ignored."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (debugServerConfig.debugServerNode["packetAcknowledgement"]) {
|
||||
if (YamlUtilities::isCastable<bool>(debugServerConfig.debugServerNode["packetAcknowledgement"])) {
|
||||
this->packetAcknowledgement = debugServerConfig.debugServerNode["packetAcknowledgement"].as<bool>();
|
||||
if (debugServerConfig.debugServerNode["packet_acknowledgement"]) {
|
||||
if (YamlUtilities::isCastable<bool>(debugServerConfig.debugServerNode["packet_acknowledgement"])) {
|
||||
this->packetAcknowledgement = debugServerConfig.debugServerNode["packet_acknowledgement"].as<bool>();
|
||||
|
||||
} else {
|
||||
Logger::error(
|
||||
"Invalid GDB debug server config parameter ('packetAcknowledgement') provided - value must be"
|
||||
"Invalid GDB debug server config parameter ('packet_acknowledgement') provided - value must be"
|
||||
" castable to a boolean. The parameter will be ignored."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ namespace DebugToolDrivers::Microchip
|
||||
{
|
||||
const auto& toolNode = toolConfig.toolNode;
|
||||
|
||||
const auto edbgDriverNode = toolNode["edbgDriver"];
|
||||
const auto edbgDriverNode = toolNode["edbg_driver"];
|
||||
if (edbgDriverNode) {
|
||||
if (edbgDriverNode["cmsisCommandDelay"]) {
|
||||
if (YamlUtilities::isCastable<std::uint16_t>(edbgDriverNode["cmsisCommandDelay"])) {
|
||||
if (edbgDriverNode["cmsis_command_delay"]) {
|
||||
if (YamlUtilities::isCastable<std::uint16_t>(edbgDriverNode["cmsis_command_delay"])) {
|
||||
this->cmsisCommandDelay = std::chrono::milliseconds{
|
||||
edbgDriverNode["cmsisCommandDelay"].as<std::uint16_t>()
|
||||
edbgDriverNode["cmsis_command_delay"].as<std::uint16_t>()
|
||||
};
|
||||
|
||||
} else {
|
||||
Logger::error(
|
||||
"Invalid EDBG driver config parameter ('cmsisCommandDelay') provided - must be a 16-bit "
|
||||
"Invalid EDBG driver config parameter ('cmsis_command_delay') provided - must be a 16-bit "
|
||||
"unsigned integer. The parameter will be ignored."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,25 +8,25 @@
|
||||
namespace DebugToolDrivers::Protocols::RiscVDebugSpec
|
||||
{
|
||||
DebugTranslatorConfig::DebugTranslatorConfig(const YAML::Node& configNode) {
|
||||
if (configNode["targetResponseTimeout"]) {
|
||||
if (configNode["target_response_timeout"]) {
|
||||
this->targetResponseTimeout = std::chrono::microseconds{
|
||||
configNode["targetResponseTimeout"].as<std::int64_t>(this->targetResponseTimeout.count())
|
||||
configNode["target_response_timeout"].as<std::int64_t>(this->targetResponseTimeout.count())
|
||||
};
|
||||
}
|
||||
|
||||
if (configNode["preferredMemoryAccessStrategy"]) {
|
||||
const auto strategy = configNode["preferredMemoryAccessStrategy"].as<std::string>();
|
||||
if (configNode["preferred_memory_access_strategy"]) {
|
||||
const auto strategy = configNode["preferred_memory_access_strategy"].as<std::string>();
|
||||
|
||||
if (strategy == "abstract-command") {
|
||||
if (strategy == "abstract_command") {
|
||||
this->preferredMemoryAccessStrategy = DebugModule::MemoryAccessStrategy::ABSTRACT_COMMAND;
|
||||
|
||||
} else if (strategy == "program-buffer") {
|
||||
} else if (strategy == "program_buffer") {
|
||||
this->preferredMemoryAccessStrategy = DebugModule::MemoryAccessStrategy::PROGRAM_BUFFER;
|
||||
|
||||
} else {
|
||||
Logger::error(
|
||||
"Invalid value (\"" + strategy + "\") provided for RISC-V debug translator config parameter "
|
||||
"('preferredMemoryAccessStrategy'). Parameter will be ignored."
|
||||
"('preferred_memory_access_strategy'). Parameter will be ignored."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace DebugToolDrivers::Wch
|
||||
{
|
||||
const auto& toolNode = toolConfig.toolNode;
|
||||
|
||||
if (toolNode["riscVDebugTranslator"]) {
|
||||
if (toolNode["riscv_debug_translator"]) {
|
||||
this->riscVDebugTranslatorConfig = ::DebugToolDrivers::Protocols::RiscVDebugSpec::DebugTranslatorConfig{
|
||||
toolNode["riscVDebugTranslator"]
|
||||
toolNode["riscv_debug_translator"]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ ProjectConfig::ProjectConfig(const YAML::Node& configNode) {
|
||||
this->debugLogging = configNode["debugLoggingEnabled"].as<bool>(this->debugLogging);
|
||||
}
|
||||
|
||||
if (configNode["debugLogging"]) {
|
||||
this->debugLogging = configNode["debugLogging"].as<bool>(this->debugLogging);
|
||||
if (configNode["debug_logging"]) {
|
||||
this->debugLogging = configNode["debug_logging"].as<bool>(this->debugLogging);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ InsightConfig::InsightConfig(const YAML::Node& insightNode) {
|
||||
};
|
||||
}
|
||||
|
||||
if (insightNode["activateOnStartup"]) {
|
||||
this->activateOnStartup = insightNode["activateOnStartup"].as<bool>(this->activateOnStartup);
|
||||
if (insightNode["activate_on_startup"]) {
|
||||
this->activateOnStartup = insightNode["activate_on_startup"].as<bool>(this->activateOnStartup);
|
||||
}
|
||||
|
||||
if (insightNode["shutdownOnClose"]) {
|
||||
this->shutdownOnClose = insightNode["shutdownOnClose"].as<bool>(this->shutdownOnClose);
|
||||
if (insightNode["shutdown_on_close"]) {
|
||||
this->shutdownOnClose = insightNode["shutdown_on_close"].as<bool>(this->shutdownOnClose);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ EnvironmentConfig::EnvironmentConfig(std::string name, const YAML::Node& environ
|
||||
this->insightConfig = InsightConfig(environmentNode["insight"]);
|
||||
}
|
||||
|
||||
if (environmentNode["shutdownPostDebugSession"]) {
|
||||
this->shutdownPostDebugSession = environmentNode["shutdownPostDebugSession"].as<bool>(
|
||||
if (environmentNode["shutdown_post_debug_session"]) {
|
||||
this->shutdownPostDebugSession = environmentNode["shutdown_post_debug_session"].as<bool>(
|
||||
this->shutdownPostDebugSession
|
||||
);
|
||||
}
|
||||
@@ -166,19 +166,18 @@ TargetConfig::TargetConfig(const YAML::Node& targetNode) {
|
||||
this->name = StringService::asciiToLower(targetNode["name"].as<std::string>());
|
||||
|
||||
static auto physicalInterfacesByConfigName = std::map<std::string, TargetPhysicalInterface>{
|
||||
{"debugwire", TargetPhysicalInterface::DEBUG_WIRE}, // Deprecated - left here for backwards compatibility
|
||||
{"debug-wire", TargetPhysicalInterface::DEBUG_WIRE},
|
||||
{"debug_wire", TargetPhysicalInterface::DEBUG_WIRE},
|
||||
{"pdi", TargetPhysicalInterface::PDI},
|
||||
{"jtag", TargetPhysicalInterface::JTAG},
|
||||
{"updi", TargetPhysicalInterface::UPDI},
|
||||
{"sdi", TargetPhysicalInterface::SDI},
|
||||
};
|
||||
|
||||
if (!targetNode["physicalInterface"]) {
|
||||
if (!targetNode["physical_interface"]) {
|
||||
throw Exceptions::InvalidConfig{"No physical interface specified."};
|
||||
}
|
||||
|
||||
const auto physicalInterfaceName = StringService::asciiToLower(targetNode["physicalInterface"].as<std::string>());
|
||||
const auto physicalInterfaceName = StringService::asciiToLower(targetNode["physical_interface"].as<std::string>());
|
||||
const auto physicalInterfaceIt = physicalInterfacesByConfigName.find(physicalInterfaceName);
|
||||
|
||||
if (physicalInterfaceIt == physicalInterfacesByConfigName.end()) {
|
||||
@@ -195,16 +194,16 @@ TargetConfig::TargetConfig(const YAML::Node& targetNode) {
|
||||
this->variantName = StringService::asciiToLower(targetNode["variantName"].as<std::string>());
|
||||
}
|
||||
|
||||
if (targetNode["hardwareBreakpoints"]) {
|
||||
this->hardwareBreakpoints = targetNode["hardwareBreakpoints"].as<bool>(this->hardwareBreakpoints);
|
||||
if (targetNode["hardware_breakpoints"]) {
|
||||
this->hardwareBreakpoints = targetNode["hardware_breakpoints"].as<bool>(this->hardwareBreakpoints);
|
||||
}
|
||||
|
||||
if (targetNode["programMemoryCache"]) {
|
||||
this->programMemoryCache = targetNode["programMemoryCache"].as<bool>(this->programMemoryCache);
|
||||
if (targetNode["program_memory_cache"]) {
|
||||
this->programMemoryCache = targetNode["program_memory_cache"].as<bool>(this->programMemoryCache);
|
||||
}
|
||||
|
||||
if (targetNode["reserveSteppingBreakpoint"]) {
|
||||
this->reserveSteppingBreakpoint = targetNode["reserveSteppingBreakpoint"].as<bool>(false);
|
||||
if (targetNode["reserve_stepping_breakpoint"]) {
|
||||
this->reserveSteppingBreakpoint = targetNode["reserve_stepping_breakpoint"].as<bool>(false);
|
||||
}
|
||||
|
||||
this->targetNode = targetNode;
|
||||
|
||||
@@ -322,13 +322,13 @@ namespace TargetController
|
||||
// The debug tool names in this mapping should always be lower-case.
|
||||
return std::map<std::string, std::function<std::unique_ptr<DebugTool>()>> {
|
||||
{
|
||||
"atmel-ice",
|
||||
"atmel_ice",
|
||||
[this] {
|
||||
return std::make_unique<AtmelIce>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
},
|
||||
{
|
||||
"power-debugger",
|
||||
"power_debugger",
|
||||
[this] {
|
||||
return std::make_unique<PowerDebugger>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
@@ -340,31 +340,31 @@ namespace TargetController
|
||||
}
|
||||
},
|
||||
{
|
||||
"pickit-4",
|
||||
"pickit_4",
|
||||
[this] {
|
||||
return std::make_unique<MplabPickit4>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
},
|
||||
{
|
||||
"xplained-pro",
|
||||
"xplained_pro",
|
||||
[this] {
|
||||
return std::make_unique<XplainedPro>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
},
|
||||
{
|
||||
"xplained-mini",
|
||||
"xplained_mini",
|
||||
[this] {
|
||||
return std::make_unique<XplainedMini>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
},
|
||||
{
|
||||
"xplained-nano",
|
||||
"xplained_nano",
|
||||
[this] {
|
||||
return std::make_unique<XplainedNano>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
},
|
||||
{
|
||||
"curiosity-nano",
|
||||
"curiosity_nano",
|
||||
[this] {
|
||||
return std::make_unique<CuriosityNano>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
@@ -376,7 +376,7 @@ namespace TargetController
|
||||
}
|
||||
},
|
||||
{
|
||||
"wch-link-e",
|
||||
"wch_link_e",
|
||||
[this] {
|
||||
return std::make_unique<WchLinkE>(this->environmentConfig.debugToolConfig);
|
||||
}
|
||||
|
||||
@@ -7,47 +7,36 @@ namespace Targets::Microchip::Avr8
|
||||
{
|
||||
const auto& targetNode = targetConfig.targetNode;
|
||||
|
||||
// The 'manageDwenFuseBit' param used to be 'updateDwenFuseBit' - we still support the old, for now.
|
||||
if (targetNode["updateDwenFuseBit"]) {
|
||||
this->manageDwenFuseBit = targetNode["updateDwenFuseBit"].as<bool>(
|
||||
if (targetNode["manage_dwen_fuse_bit"]) {
|
||||
this->manageDwenFuseBit = targetNode["manage_dwen_fuse_bit"].as<bool>(
|
||||
this->manageDwenFuseBit
|
||||
);
|
||||
}
|
||||
|
||||
if (targetNode["manageDwenFuseBit"]) {
|
||||
this->manageDwenFuseBit = targetNode["manageDwenFuseBit"].as<bool>(
|
||||
this->manageDwenFuseBit
|
||||
);
|
||||
}
|
||||
|
||||
if (targetNode["cycleTargetPowerPostDwenUpdate"]) {
|
||||
this->cycleTargetPowerPostDwenUpdate = targetNode["cycleTargetPowerPostDwenUpdate"].as<bool>(
|
||||
if (targetNode["cycle_target_power_post_dwen_update"]) {
|
||||
this->cycleTargetPowerPostDwenUpdate = targetNode["cycle_target_power_post_dwen_update"].as<bool>(
|
||||
this->cycleTargetPowerPostDwenUpdate
|
||||
);
|
||||
}
|
||||
|
||||
if (targetNode["disableDebugWirePreDisconnect"]) {
|
||||
this->disableDebugWireOnDeactivate = targetNode["disableDebugWirePreDisconnect"].as<bool>(
|
||||
if (targetNode["disable_debug_wire_pre_disconnect"]) {
|
||||
this->disableDebugWireOnDeactivate = targetNode["disable_debug_wire_pre_disconnect"].as<bool>(
|
||||
this->disableDebugWireOnDeactivate
|
||||
);
|
||||
}
|
||||
|
||||
if (targetNode["targetPowerCycleDelay"]) {
|
||||
this->targetPowerCycleDelay = std::chrono::milliseconds{targetNode["targetPowerCycleDelay"].as<int>(
|
||||
if (targetNode["target_power_cycle_delay"]) {
|
||||
this->targetPowerCycleDelay = std::chrono::milliseconds{targetNode["target_power_cycle_delay"].as<int>(
|
||||
this->targetPowerCycleDelay.count()
|
||||
)};
|
||||
}
|
||||
|
||||
if (targetNode["manageOcdenFuseBit"]) {
|
||||
this->manageOcdenFuseBit = targetNode["manageOcdenFuseBit"].as<bool>(
|
||||
this->manageOcdenFuseBit
|
||||
);
|
||||
if (targetNode["manage_ocden_fuse_bit"]) {
|
||||
this->manageOcdenFuseBit = targetNode["manage_ocden_fuse_bit"].as<bool>(this->manageOcdenFuseBit);
|
||||
}
|
||||
|
||||
if (targetNode["preserveEeprom"]) {
|
||||
this->preserveEeprom = targetNode["preserveEeprom"].as<bool>(
|
||||
this->preserveEeprom
|
||||
);
|
||||
if (targetNode["preserve_eeprom"]) {
|
||||
this->preserveEeprom = targetNode["preserve_eeprom"].as<bool>(this->preserveEeprom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user