Removed redundant 'Bloom' namespace from entire codebase
This commit is contained in:
1069
src/Application.cpp
1069
src/Application.cpp
File diff suppressed because it is too large
Load Diff
@@ -31,291 +31,289 @@
|
||||
|
||||
#include "src/VersionNumber.hpp"
|
||||
|
||||
namespace Bloom
|
||||
|
||||
/**
|
||||
* Bloom - a debug interface for embedded systems development on Linux.
|
||||
*
|
||||
* This is the main entry-point of execution for the Bloom program. The methods within will run on the main
|
||||
* thread. If Insight is enabled, execution will be passed over to Insight::run() upon start up.
|
||||
*/
|
||||
class Application: public QObject, public Thread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const inline VersionNumber VERSION = VersionNumber(std::string(BLOOM_VERSION));
|
||||
|
||||
explicit Application(std::vector<std::string>&& arguments);
|
||||
|
||||
/**
|
||||
* Bloom - a debug interface for embedded systems development on Linux.
|
||||
* Main entry-point for the Bloom program.
|
||||
*
|
||||
* This is the main entry-point of execution for the Bloom program. The methods within will run on the main
|
||||
* thread. If Insight is enabled, execution will be passed over to Insight::run() upon start up.
|
||||
* @return
|
||||
*/
|
||||
class Application: public QObject, public Thread
|
||||
{
|
||||
Q_OBJECT
|
||||
int run();
|
||||
|
||||
public:
|
||||
static const inline VersionNumber VERSION = VersionNumber(std::string(BLOOM_VERSION));
|
||||
private:
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
explicit Application(std::vector<std::string>&& arguments);
|
||||
|
||||
/**
|
||||
* Main entry-point for the Bloom program.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int run();
|
||||
|
||||
private:
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
std::string qtApplicationName = "Bloom";
|
||||
std::array<char*, 1> qtApplicationArgv = {this->qtApplicationName.data()};
|
||||
int qtApplicationArgc = 1;
|
||||
std::string qtApplicationName = "Bloom";
|
||||
std::array<char*, 1> qtApplicationArgv = {this->qtApplicationName.data()};
|
||||
int qtApplicationArgc = 1;
|
||||
#ifndef EXCLUDE_INSIGHT
|
||||
QApplication qtApplication;
|
||||
QApplication qtApplication;
|
||||
#else
|
||||
QCoreApplication qtApplication;
|
||||
QCoreApplication qtApplication;
|
||||
#endif
|
||||
|
||||
EventListenerPointer applicationEventListener = std::make_shared<EventListener>("ApplicationEventListener");
|
||||
EventListenerPointer applicationEventListener = std::make_shared<EventListener>("ApplicationEventListener");
|
||||
|
||||
/**
|
||||
* The SignalHandler deals with any UNIX signals. It runs on a dedicated thread. All other threads
|
||||
* ignore UNIX signals.
|
||||
*
|
||||
* See the SignalHandler class for more on this.
|
||||
*/
|
||||
SignalHandler signalHandler = SignalHandler();
|
||||
std::thread signalHandlerThread;
|
||||
/**
|
||||
* The SignalHandler deals with any UNIX signals. It runs on a dedicated thread. All other threads
|
||||
* ignore UNIX signals.
|
||||
*
|
||||
* See the SignalHandler class for more on this.
|
||||
*/
|
||||
SignalHandler signalHandler = SignalHandler();
|
||||
std::thread signalHandlerThread;
|
||||
|
||||
/**
|
||||
* The TargetController possesses full control of the connected debug tool and target. It runs on a
|
||||
* dedicated thread.
|
||||
*
|
||||
* See the TargetController class for more on this.
|
||||
*
|
||||
* I could have used std::optional here, for the late initialisation, but given that we're using
|
||||
* std::unique_ptr for the debug server (for polymorphism), I thought I'd keep it consistent.
|
||||
*/
|
||||
std::unique_ptr<TargetController::TargetControllerComponent> targetController = nullptr;
|
||||
std::thread targetControllerThread;
|
||||
/**
|
||||
* The TargetController possesses full control of the connected debug tool and target. It runs on a
|
||||
* dedicated thread.
|
||||
*
|
||||
* See the TargetController class for more on this.
|
||||
*
|
||||
* I could have used std::optional here, for the late initialisation, but given that we're using
|
||||
* std::unique_ptr for the debug server (for polymorphism), I thought I'd keep it consistent.
|
||||
*/
|
||||
std::unique_ptr<TargetController::TargetControllerComponent> targetController = nullptr;
|
||||
std::thread targetControllerThread;
|
||||
|
||||
/**
|
||||
* The DebugServer exposes an interface to the connected target, to third-party software such as IDEs. It runs
|
||||
* on a dedicated thread.
|
||||
*
|
||||
* See the DebugServer and GdbRspDebugServer class for more on this.
|
||||
*/
|
||||
std::unique_ptr<DebugServer::DebugServerComponent> debugServer = nullptr;
|
||||
std::thread debugServerThread;
|
||||
/**
|
||||
* The DebugServer exposes an interface to the connected target, to third-party software such as IDEs. It runs
|
||||
* on a dedicated thread.
|
||||
*
|
||||
* See the DebugServer and GdbRspDebugServer class for more on this.
|
||||
*/
|
||||
std::unique_ptr<DebugServer::DebugServerComponent> debugServer = nullptr;
|
||||
std::thread debugServerThread;
|
||||
|
||||
#ifndef EXCLUDE_INSIGHT
|
||||
/**
|
||||
* Insight is a small Qt application that serves a GUI to the user. It occupies the main thread, as well as a
|
||||
* single worker thread, and possibly other threads created by Qt.
|
||||
*
|
||||
* Insight is optional - users can disable it via their project configuration.
|
||||
*
|
||||
* When the user closes the Insight GUI, control of the main thread is returned to Application::run(). See the
|
||||
* Insight class for more on this.
|
||||
*
|
||||
* Because Insight is optional, we only construct the Insight object when we need it. We can't use
|
||||
* std::optional here because the Insight class extends QObject, which disables the copy constructor and
|
||||
* the assignment operator. So we use an std::unique_ptr instead, which is perfectly fine for this use case,
|
||||
* as we want to manage the lifetime of the object here.
|
||||
*/
|
||||
std::unique_ptr<Insight> insight = nullptr;
|
||||
/**
|
||||
* Insight is a small Qt application that serves a GUI to the user. It occupies the main thread, as well as a
|
||||
* single worker thread, and possibly other threads created by Qt.
|
||||
*
|
||||
* Insight is optional - users can disable it via their project configuration.
|
||||
*
|
||||
* When the user closes the Insight GUI, control of the main thread is returned to Application::run(). See the
|
||||
* Insight class for more on this.
|
||||
*
|
||||
* Because Insight is optional, we only construct the Insight object when we need it. We can't use
|
||||
* std::optional here because the Insight class extends QObject, which disables the copy constructor and
|
||||
* the assignment operator. So we use an std::unique_ptr instead, which is perfectly fine for this use case,
|
||||
* as we want to manage the lifetime of the object here.
|
||||
*/
|
||||
std::unique_ptr<Insight> insight = nullptr;
|
||||
|
||||
/**
|
||||
* Activation of the Insight GUI can be requested by triggering an InsightActivationRequested event.
|
||||
*
|
||||
* This flag will be set upon that event being triggered. The Insight GUI will be started shortly after.
|
||||
*/
|
||||
bool insightActivationPending = false;
|
||||
/**
|
||||
* Activation of the Insight GUI can be requested by triggering an InsightActivationRequested event.
|
||||
*
|
||||
* This flag will be set upon that event being triggered. The Insight GUI will be started shortly after.
|
||||
*/
|
||||
bool insightActivationPending = false;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Configuration extracted from the user's project configuration file.
|
||||
*
|
||||
* See ProjectConfig.hpp for more on this.
|
||||
*/
|
||||
std::optional<ProjectConfig> projectConfig;
|
||||
std::optional<EnvironmentConfig> environmentConfig;
|
||||
std::optional<DebugServerConfig> debugServerConfig;
|
||||
std::optional<InsightConfig> insightConfig;
|
||||
/**
|
||||
* Configuration extracted from the user's project configuration file.
|
||||
*
|
||||
* See ProjectConfig.hpp for more on this.
|
||||
*/
|
||||
std::optional<ProjectConfig> projectConfig;
|
||||
std::optional<EnvironmentConfig> environmentConfig;
|
||||
std::optional<DebugServerConfig> debugServerConfig;
|
||||
std::optional<InsightConfig> insightConfig;
|
||||
|
||||
/**
|
||||
* Settings extracted from the settings file in the user's project root.
|
||||
*/
|
||||
std::optional<ProjectSettings> projectSettings;
|
||||
/**
|
||||
* Settings extracted from the settings file in the user's project root.
|
||||
*/
|
||||
std::optional<ProjectSettings> projectSettings;
|
||||
|
||||
/**
|
||||
* The project environment selected by the user.
|
||||
*
|
||||
* If an environment name is not provided as an argument when running Bloom, Bloom will fallback to the
|
||||
* environment named "default".
|
||||
*/
|
||||
std::string selectedEnvironmentName = "default";
|
||||
/**
|
||||
* The project environment selected by the user.
|
||||
*
|
||||
* If an environment name is not provided as an argument when running Bloom, Bloom will fallback to the
|
||||
* environment named "default".
|
||||
*/
|
||||
std::string selectedEnvironmentName = "default";
|
||||
|
||||
/**
|
||||
* Some CLI arguments are interpreted as commands and thus require specific handler methods to be called.
|
||||
* This mapping maps command names to the appropriate handler methods. The mapped handler method is invoked
|
||||
* when the command name is provided as an argument from the CLI.
|
||||
*
|
||||
* See Application::run() for more on this.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
std::map<std::string, std::function<int()>> getCommandHandlersByCommandName();
|
||||
/**
|
||||
* Some CLI arguments are interpreted as commands and thus require specific handler methods to be called.
|
||||
* This mapping maps command names to the appropriate handler methods. The mapped handler method is invoked
|
||||
* when the command name is provided as an argument from the CLI.
|
||||
*
|
||||
* See Application::run() for more on this.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
std::map<std::string, std::function<int()>> getCommandHandlersByCommandName();
|
||||
|
||||
/**
|
||||
* Kicks off the application.
|
||||
*
|
||||
* Will start the TargetController and DebugServer. And register the main application's event handlers.
|
||||
*/
|
||||
void startup();
|
||||
/**
|
||||
* Kicks off the application.
|
||||
*
|
||||
* Will start the TargetController and DebugServer. And register the main application's event handlers.
|
||||
*/
|
||||
void startup();
|
||||
|
||||
/**
|
||||
* Will cleanly shutdown the application.
|
||||
*/
|
||||
void shutdown();
|
||||
/**
|
||||
* Will cleanly shutdown the application.
|
||||
*/
|
||||
void shutdown();
|
||||
|
||||
/**
|
||||
* Will trigger a clean shutdown.
|
||||
*/
|
||||
void triggerShutdown();
|
||||
/**
|
||||
* Will trigger a clean shutdown.
|
||||
*/
|
||||
void triggerShutdown();
|
||||
|
||||
/**
|
||||
* Extracts or generates project settings.
|
||||
*/
|
||||
void loadProjectSettings();
|
||||
/**
|
||||
* Extracts or generates project settings.
|
||||
*/
|
||||
void loadProjectSettings();
|
||||
|
||||
/**
|
||||
* Saves the current project settings.
|
||||
*/
|
||||
void saveProjectSettings();
|
||||
/**
|
||||
* Saves the current project settings.
|
||||
*/
|
||||
void saveProjectSettings();
|
||||
|
||||
/**
|
||||
* Extracts the project config from the user's config file and populates the following members:
|
||||
* - this->projectConfig
|
||||
* - this->environmentConfig
|
||||
* - this->debugServerConfig
|
||||
* - this->insightConfig
|
||||
*
|
||||
* @see ProjectConfig declaration for more on this.
|
||||
*/
|
||||
void loadProjectConfiguration();
|
||||
/**
|
||||
* Extracts the project config from the user's config file and populates the following members:
|
||||
* - this->projectConfig
|
||||
* - this->environmentConfig
|
||||
* - this->debugServerConfig
|
||||
* - this->insightConfig
|
||||
*
|
||||
* @see ProjectConfig declaration for more on this.
|
||||
*/
|
||||
void loadProjectConfiguration();
|
||||
|
||||
/**
|
||||
* Presents application help text to user.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentHelpText();
|
||||
/**
|
||||
* Presents application help text to user.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentHelpText();
|
||||
|
||||
/**
|
||||
* Presents the current Bloom version number to user.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentVersionText();
|
||||
/**
|
||||
* Presents the current Bloom version number to user.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentVersionText();
|
||||
|
||||
/**
|
||||
* Presents the current Bloom version number, in JSON format.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentVersionMachineText();
|
||||
/**
|
||||
* Presents the current Bloom version number, in JSON format.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int presentVersionMachineText();
|
||||
|
||||
/**
|
||||
* Initialises a project in the user's working directory.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int initProject();
|
||||
/**
|
||||
* Initialises a project in the user's working directory.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int initProject();
|
||||
|
||||
/**
|
||||
* Prepares a dedicated thread for the SignalHandler and kicks it off with a call to SignalHandler::run().
|
||||
*/
|
||||
void startSignalHandler();
|
||||
/**
|
||||
* Prepares a dedicated thread for the SignalHandler and kicks it off with a call to SignalHandler::run().
|
||||
*/
|
||||
void startSignalHandler();
|
||||
|
||||
/**
|
||||
* Sends a shutdown request to the SignalHandler and waits on the dedicated thread to exit.
|
||||
*/
|
||||
void stopSignalHandler();
|
||||
/**
|
||||
* Sends a shutdown request to the SignalHandler and waits on the dedicated thread to exit.
|
||||
*/
|
||||
void stopSignalHandler();
|
||||
|
||||
/**
|
||||
* Prepares a dedicated thread for the TargetController and kicks it off with a call to
|
||||
* TargetControllerComponent::run().
|
||||
*/
|
||||
void startTargetController();
|
||||
/**
|
||||
* Prepares a dedicated thread for the TargetController and kicks it off with a call to
|
||||
* TargetControllerComponent::run().
|
||||
*/
|
||||
void startTargetController();
|
||||
|
||||
/**
|
||||
* Invokes a clean shutdown of the TargetController. The TargetController should disconnect from the target
|
||||
* and debug tool in a clean and safe manner, ensuring that both are left in a sensible state.
|
||||
*
|
||||
* This will join the TargetController thread.
|
||||
*/
|
||||
void stopTargetController();
|
||||
/**
|
||||
* Invokes a clean shutdown of the TargetController. The TargetController should disconnect from the target
|
||||
* and debug tool in a clean and safe manner, ensuring that both are left in a sensible state.
|
||||
*
|
||||
* This will join the TargetController thread.
|
||||
*/
|
||||
void stopTargetController();
|
||||
|
||||
/**
|
||||
* Prepares a dedicated thread for the DebugServer and kicks it off with a call to DebugServer::run().
|
||||
*/
|
||||
void startDebugServer();
|
||||
/**
|
||||
* Prepares a dedicated thread for the DebugServer and kicks it off with a call to DebugServer::run().
|
||||
*/
|
||||
void startDebugServer();
|
||||
|
||||
/**
|
||||
* Sends a shutdown request to the DebugServer thread and waits on it to exit.
|
||||
*/
|
||||
void stopDebugServer();
|
||||
/**
|
||||
* Sends a shutdown request to the DebugServer thread and waits on it to exit.
|
||||
*/
|
||||
void stopDebugServer();
|
||||
|
||||
/**
|
||||
* Dispatches any pending events. This function will be called periodically, via a QTimer.
|
||||
*/
|
||||
void dispatchEvents();
|
||||
/**
|
||||
* Dispatches any pending events. This function will be called periodically, via a QTimer.
|
||||
*/
|
||||
void dispatchEvents();
|
||||
|
||||
/**
|
||||
* Queries the Bloom server for the latest version number. If the current version number doesn't match the
|
||||
* latest version number returned by the server, we'll display a warning in the logs to instruct the user to
|
||||
* upgrade.
|
||||
*/
|
||||
void checkBloomVersion();
|
||||
/**
|
||||
* Queries the Bloom server for the latest version number. If the current version number doesn't match the
|
||||
* latest version number returned by the server, we'll display a warning in the logs to instruct the user to
|
||||
* upgrade.
|
||||
*/
|
||||
void checkBloomVersion();
|
||||
|
||||
#ifndef EXCLUDE_INSIGHT
|
||||
/**
|
||||
* Activate the Insight GUI.
|
||||
*
|
||||
* This function should never be called more than once.
|
||||
*/
|
||||
void activateInsight();
|
||||
/**
|
||||
* Activate the Insight GUI.
|
||||
*
|
||||
* This function should never be called more than once.
|
||||
*/
|
||||
void activateInsight();
|
||||
|
||||
/**
|
||||
* Handles requests to start the Insight GUI.
|
||||
*/
|
||||
void onInsightActivationRequest(const Events::InsightActivationRequested&);
|
||||
/**
|
||||
* Handles requests to start the Insight GUI.
|
||||
*/
|
||||
void onInsightActivationRequest(const Events::InsightActivationRequested&);
|
||||
|
||||
/**
|
||||
* Performs any post-insight-closed actions.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onInsightMainWindowClosed(const Events::InsightMainWindowClosed& event);
|
||||
/**
|
||||
* Performs any post-insight-closed actions.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onInsightMainWindowClosed(const Events::InsightMainWindowClosed& event);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Triggers a shutdown of Bloom and all of its components.
|
||||
*/
|
||||
void onShutdownApplicationRequest(const Events::ShutdownApplication&);
|
||||
/**
|
||||
* Triggers a shutdown of Bloom and all of its components.
|
||||
*/
|
||||
void onShutdownApplicationRequest(const Events::ShutdownApplication&);
|
||||
|
||||
/**
|
||||
* If the TargetController unexpectedly shuts down, the rest of the application will follow.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onTargetControllerThreadStateChanged(const Events::TargetControllerThreadStateChanged& event);
|
||||
/**
|
||||
* If the TargetController unexpectedly shuts down, the rest of the application will follow.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onTargetControllerThreadStateChanged(const Events::TargetControllerThreadStateChanged& event);
|
||||
|
||||
/**
|
||||
* Same goes for the DebugServer - it should never shutdown unless a shutdown request was issued. If it does,
|
||||
* something horrible has happened and so we shutdown the rest of the application in response.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onDebugServerThreadStateChanged(const Events::DebugServerThreadStateChanged& event);
|
||||
/**
|
||||
* Same goes for the DebugServer - it should never shutdown unless a shutdown request was issued. If it does,
|
||||
* something horrible has happened and so we shutdown the rest of the application in response.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onDebugServerThreadStateChanged(const Events::DebugServerThreadStateChanged& event);
|
||||
|
||||
/**
|
||||
* If configured to do so, Bloom will shutdown upon the end of the current debug session.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onDebugSessionFinished(const Events::DebugSessionFinished& event);
|
||||
};
|
||||
}
|
||||
/**
|
||||
* If configured to do so, Bloom will shutdown upon the end of the current debug session.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void onDebugSessionFinished(const Events::DebugSessionFinished& event);
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include "src/Exceptions/InvalidConfig.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServer
|
||||
namespace DebugServer
|
||||
{
|
||||
using namespace Bloom::Events;
|
||||
using namespace Events;
|
||||
|
||||
DebugServerComponent::DebugServerComponent(const DebugServerConfig& debugServerConfig)
|
||||
: debugServerConfig(debugServerConfig)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "ServerInterface.hpp"
|
||||
|
||||
namespace Bloom::DebugServer
|
||||
namespace DebugServer
|
||||
{
|
||||
/**
|
||||
* The DebugServer exposes the connected target to third-party debugging software such as IDEs.
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
#include "CommandPackets/FlashWrite.hpp"
|
||||
#include "CommandPackets/FlashDone.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb
|
||||
namespace DebugServer::Gdb::AvrGdb
|
||||
{
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
using Bloom::Targets::TargetRegisterDescriptor;
|
||||
using Bloom::Targets::TargetRegisterType;
|
||||
using Targets::TargetRegisterDescriptor;
|
||||
using Targets::TargetRegisterType;
|
||||
|
||||
AvrGdbRsp::AvrGdbRsp(
|
||||
const DebugServerConfig& debugServerConfig,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/GdbRspDebugServer.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb
|
||||
namespace DebugServer::Gdb::AvrGdb
|
||||
{
|
||||
class AvrGdbRsp: public GdbRspDebugServer
|
||||
{
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
FlashDone::FlashDone(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The FlashDone class implements the structure for the "vFlashDone" packet.
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
FlashErase::FlashErase(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The FlashErase class implements the structure for the "vFlashErase" packet. Upon receiving this packet, the
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
FlashWrite::FlashWrite(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The FlashWrite class implements the structure for the "vFlashWrite" packet. Upon receiving this packet, the
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ReadMemory class implements a structure for "m" packets. Upon receiving these packets, the server is
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/CommandPackets/CommandPacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ReadMemoryMap class implements a structure for the "qXfer:memory-map:read::..." packet. Upon receiving this
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/RegisterDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ReadRegister class implements a structure for the "p" command packet. In response to this packet, the server
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/RegisterDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ReadRegisters class implements a structure for the "g" command packet. In response to this packet, the
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
WriteMemory::WriteMemory(const RawPacket& rawPacket, const TargetDescriptor& gdbTargetDescriptor)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The WriteMemory class implements the structure for "M" packets. Upon receiving this packet, the server is
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "src/Targets/TargetRegister.hpp"
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The WriteRegister class implements the structure for "P" packets.
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb
|
||||
namespace DebugServer::Gdb::AvrGdb
|
||||
{
|
||||
using Bloom::Targets::TargetRegisterDescriptor;
|
||||
using Bloom::Targets::TargetRegisterType;
|
||||
using Targets::TargetRegisterDescriptor;
|
||||
using Targets::TargetRegisterType;
|
||||
|
||||
using Bloom::Exceptions::Exception;
|
||||
using Exceptions::Exception;
|
||||
|
||||
TargetDescriptor::TargetDescriptor(const Bloom::Targets::TargetDescriptor& targetDescriptor)
|
||||
TargetDescriptor::TargetDescriptor(const Targets::TargetDescriptor& targetDescriptor)
|
||||
: DebugServer::Gdb::TargetDescriptor(
|
||||
targetDescriptor,
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/TargetDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::AvrGdb
|
||||
namespace DebugServer::Gdb::AvrGdb
|
||||
{
|
||||
class TargetDescriptor: public DebugServer::Gdb::TargetDescriptor
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
enum class BreakpointType: int
|
||||
{
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Bloom::Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
ActivateInsight::ActivateInsight(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Monitor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ActivateInsight class implements a structure for the "monitor insight" GDB command.
|
||||
|
||||
@@ -11,17 +11,13 @@
|
||||
#include "src/Services/StringService.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
BloomVersion::BloomVersion(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
{}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "Monitor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The BloomVersion class implements a structure for the "monitor version" GDB command.
|
||||
|
||||
@@ -11,16 +11,12 @@
|
||||
#include "src/Services/StringService.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
BloomVersionMachine::BloomVersionMachine(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
{}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "Monitor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The BloomVersionMachine class implements a structure for the "monitor version machine" GDB command.
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
#include "src/DebugServer/Gdb/Signal.hpp"
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
@@ -21,8 +20,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
using ResponsePackets::EmptyResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
void CommandPacket::handle(DebugSession& debugSession, TargetControllerService& targetControllerService) {
|
||||
const auto packetString = std::string(this->data.begin(), this->data.end());
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Services/TargetControllerService.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* GDB RSP command packets are sent to the server, from the GDB client. These packets carry instructions that the
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
ContinueExecution::ContinueExecution(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ContinueExecution class implements a structure for "c" packets. These packets instruct the server
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
Detach::Detach(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
class Detach: public CommandPacket
|
||||
{
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
#include "src/DebugServer/Gdb/Exceptions/InvalidCommandOption.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Bloom::Exceptions::Exception;
|
||||
|
||||
using ::Exceptions::Exception;
|
||||
using Exceptions::InvalidCommandOption;
|
||||
|
||||
EepromFill::EepromFill(Monitor&& monitorPacket)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The EepromFill class implements a structure for the "monitor eeprom fill" GDB command.
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Exceptions::Exception;
|
||||
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
GenerateSvd::GenerateSvd(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "src/Targets/TargetDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The GenerateSvd class implements a structure for the "monitor svd" GDB command.
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
HelpMonitorInfo::HelpMonitorInfo(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "Monitor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The HelpMonitorInfo class implements a structure for the "monitor help" GDB command.
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::TargetStopped;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using Exceptions::Exception;
|
||||
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
void InterruptExecution::handle(DebugSession& debugSession, TargetControllerService& targetControllerService) {
|
||||
Logger::info("Handling InterruptExecution packet");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The InterruptException class represents interrupt command packets. Upon receiving an interrupt packet, the
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* This is a base class for 'qRcmd' packets - invoked by the GDB 'monitor' command.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
using ResponsePackets::OkResponsePacket;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
RemoveBreakpoint::RemoveBreakpoint(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The RemoveBreakpoint class implements the structure for "z" command packets. Upon receiving this command, the
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
ResetTarget::ResetTarget(Monitor&& monitorPacket)
|
||||
: Monitor(std::move(monitorPacket))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "Monitor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The ResetTarget class implements a structure for the custom reset command (triggered via the "monitor reset"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::EmptyResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
SetBreakpoint::SetBreakpoint(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The SetBreakpoint class implements the structure for "Z" command packets. Upon receiving this command, the
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
StepExecution::StepExecution(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The StepExecution class implements the structure for "s" command packets. Upon receiving this command, the
|
||||
|
||||
@@ -8,18 +8,16 @@
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/DebugServer/Gdb/Exceptions/ClientNotSupported.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::SupportedFeaturesResponse;
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using Bloom::Exceptions::Exception;
|
||||
using Gdb::Exceptions::ClientNotSupported;
|
||||
using Exceptions::ClientNotSupported;
|
||||
|
||||
SupportedFeaturesQuery::SupportedFeaturesQuery(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "CommandPacket.hpp"
|
||||
#include "../Feature.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The SupportedFeaturesQuery command packet is a query from the GDB client, requesting a list of GDB features
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Services/StringService.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
using namespace Exceptions;
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace ::Exceptions;
|
||||
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "src/DebugServer/Gdb/Packet.hpp"
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ResponsePacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
/**
|
||||
* The Connection class represents an active connection between the GDB RSP server and client.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/EventManager/EventManager.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
DebugSession::DebugSession(
|
||||
Connection&& connection,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
class DebugSession
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* In the event that communication between the GDB RSP client and Bloom fails, a ClientCommunicationFailure
|
||||
@@ -10,15 +10,15 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
*
|
||||
* See GdbRspDebugServer::serve() for handling code.
|
||||
*/
|
||||
class ClientCommunicationError: public Bloom::Exceptions::Exception
|
||||
class ClientCommunicationError: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit ClientCommunicationError(const std::string& message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit ClientCommunicationError(const char* message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit ClientCommunicationError() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* When a GDB RSP client unexpectedly drops the connection in the middle of an IO operation, a ClientDisconnected
|
||||
@@ -11,7 +11,7 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
*
|
||||
* See GdbRspDebugServer::serve() for handling code.
|
||||
*/
|
||||
class ClientDisconnected: public Bloom::Exceptions::Exception
|
||||
class ClientDisconnected: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit ClientDisconnected() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* In the event that the GDB debug server determines that the connected client cannot be served,
|
||||
@@ -10,15 +10,15 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
*
|
||||
* See GdbRspDebugServer::serve() for handling code.
|
||||
*/
|
||||
class ClientNotSupported: public Bloom::Exceptions::Exception
|
||||
class ClientNotSupported: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit ClientNotSupported(const std::string& message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit ClientNotSupported(const char* message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit ClientNotSupported() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* The GDB debug server spends most of its time in a blocking state, waiting for a new connection or for some data
|
||||
@@ -13,7 +13,7 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
* For more on how the GDB server implementation allows for interruptions, see the "Servicing events" section in
|
||||
* src/DebugServer/README.md.
|
||||
*/
|
||||
class DebugServerInterrupted: public Bloom::Exceptions::Exception
|
||||
class DebugServerInterrupted: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit DebugServerInterrupted() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* The GDB server may fail to prepare for a debug session, if an internal error occurs. One circumstance where
|
||||
@@ -10,15 +10,15 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
*
|
||||
* See GdbRspDebugServer::serve() for handling code.
|
||||
*/
|
||||
class DebugSessionInitialisationFailure: public Bloom::Exceptions::Exception
|
||||
class DebugSessionInitialisationFailure: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit DebugSessionInitialisationFailure(const std::string& message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit DebugSessionInitialisationFailure(const char* message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit DebugSessionInitialisationFailure() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
namespace DebugServer::Gdb::Exceptions
|
||||
{
|
||||
/**
|
||||
* For GDB monitor commands, each command can define a set of required/optional command options.
|
||||
@@ -10,15 +10,15 @@ namespace Bloom::DebugServer::Gdb::Exceptions
|
||||
*
|
||||
* This exception is typically thrown and caught within the handling of monitor commands.
|
||||
*/
|
||||
class InvalidCommandOption: public Bloom::Exceptions::Exception
|
||||
class InvalidCommandOption: public ::Exceptions::Exception
|
||||
{
|
||||
public:
|
||||
explicit InvalidCommandOption(const std::string& message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit InvalidCommandOption(const char* message)
|
||||
: Bloom::Exceptions::Exception(message)
|
||||
: ::Exceptions::Exception(message)
|
||||
{}
|
||||
|
||||
explicit InvalidCommandOption() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Helpers/BiMap.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
enum class Feature: int
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "src/Helpers/YamlUtilities.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
GdbDebugServerConfig::GdbDebugServerConfig(const DebugServerConfig& debugServerConfig)
|
||||
: DebugServerConfig(debugServerConfig)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/ProjectConfig.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
/**
|
||||
* Extending the generic DebugServerConfig struct to accommodate GDB debug server configuration parameters.
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
|
||||
#include "src/Services/ProcessService.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
using namespace Exceptions;
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace ::Exceptions;
|
||||
|
||||
using CommandPackets::CommandPacket;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "src/EventManager/Events/TargetExecutionStopped.hpp"
|
||||
#include "src/EventManager/Events/TargetExecutionResumed.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
/**
|
||||
* The GdbRspDebugServer is an implementation of the GDB Remote Serial Protocol.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
using RawPacket = std::vector<unsigned char>;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
/**
|
||||
* A programming session is created upon receiving the first FlashWrite (vFlashWrite) packet from GDB.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
using GdbRegisterId = std::uint16_t;
|
||||
|
||||
@@ -60,10 +60,10 @@ namespace std
|
||||
* class).
|
||||
*/
|
||||
template<>
|
||||
class hash<Bloom::DebugServer::Gdb::RegisterDescriptor>
|
||||
class hash<DebugServer::Gdb::RegisterDescriptor>
|
||||
{
|
||||
public:
|
||||
std::size_t operator () (const Bloom::DebugServer::Gdb::RegisterDescriptor& descriptor) const {
|
||||
std::size_t operator () (const DebugServer::Gdb::RegisterDescriptor& descriptor) const {
|
||||
// We use the GDB register number as the hash, as it is unique to the register.
|
||||
return static_cast<size_t>(descriptor.id);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "ResponsePacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* Empty response packet expected by the GDB client, in response to certain commands.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "ResponsePacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* Error response packet expected by the GDB client, to indicate an error, in response to certain commands.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "ResponsePacket.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* OK response packet expected by the GDB client, in response to certain commands.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/Packet.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* Upon receiving a CommandPacket from the connected GDB RSP client, the server is expected to respond with a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "SupportedFeaturesResponse.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
SupportedFeaturesResponse::SupportedFeaturesResponse(
|
||||
const std::set<std::pair<Feature, std::optional<std::string>>>& supportedFeatures
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/Feature.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* The SupportedFeaturesResponse class implements the response packet structure for the "qSupported" command.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "src/Services/StringService.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb::ResponsePackets
|
||||
namespace DebugServer::Gdb::ResponsePackets
|
||||
{
|
||||
/**
|
||||
* The TargetStopped class implements the response packet structure for any commands that expect a "StopReply"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
enum class Signal: unsigned char
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/Helpers/BiMap.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
enum class StopReason: int
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "TargetDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
TargetDescriptor::TargetDescriptor(
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "RegisterDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
namespace DebugServer::Gdb
|
||||
{
|
||||
/**
|
||||
* GDB target descriptor.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Bloom::DebugServer
|
||||
namespace DebugServer
|
||||
{
|
||||
/**
|
||||
* Every debug server must implement this interface.
|
||||
|
||||
@@ -10,103 +10,100 @@
|
||||
|
||||
#include "TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp"
|
||||
|
||||
namespace Bloom
|
||||
/**
|
||||
* A debug tool can be any device that provides access to the connected target. Debug tools are usually connected
|
||||
* to the host machine via USB.
|
||||
*
|
||||
* Each debug tool must implement this interface. Note that target specific driver code should not be placed here.
|
||||
* Each target family will expect the debug tool to provide an interface for that particular group of targets.
|
||||
* For an example, see the Avr8DebugInterface class and DebugTool::getAvr8DebugInterface(), for the family of AVR
|
||||
* 8-bit targets.
|
||||
*/
|
||||
class DebugTool
|
||||
{
|
||||
public:
|
||||
DebugTool() = default;
|
||||
virtual ~DebugTool() = default;
|
||||
|
||||
DebugTool(const DebugTool& other) = default;
|
||||
DebugTool(DebugTool&& other) = default;
|
||||
|
||||
DebugTool& operator = (const DebugTool& other) = default;
|
||||
DebugTool& operator = (DebugTool&& other) = default;
|
||||
|
||||
/**
|
||||
* A debug tool can be any device that provides access to the connected target. Debug tools are usually connected
|
||||
* to the host machine via USB.
|
||||
*
|
||||
* Each debug tool must implement this interface. Note that target specific driver code should not be placed here.
|
||||
* Each target family will expect the debug tool to provide an interface for that particular group of targets.
|
||||
* For an example, see the Avr8DebugInterface class and DebugTool::getAvr8DebugInterface(), for the family of AVR
|
||||
* 8-bit targets.
|
||||
* Should establish a connection to the device and prepare it for a debug session.
|
||||
*/
|
||||
class DebugTool
|
||||
{
|
||||
public:
|
||||
DebugTool() = default;
|
||||
virtual ~DebugTool() = default;
|
||||
virtual void init() = 0;
|
||||
|
||||
DebugTool(const DebugTool& other) = default;
|
||||
DebugTool(DebugTool&& other) = default;
|
||||
/**
|
||||
* Should disconnect from the device after performing any tasks required to formally end the debug session.
|
||||
*/
|
||||
virtual void close() = 0;
|
||||
|
||||
DebugTool& operator = (const DebugTool& other) = default;
|
||||
DebugTool& operator = (DebugTool&& other) = default;
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Should establish a connection to the device and prepare it for a debug session.
|
||||
*/
|
||||
virtual void init() = 0;
|
||||
virtual std::string getSerialNumber() = 0;
|
||||
|
||||
/**
|
||||
* Should disconnect from the device after performing any tasks required to formally end the debug session.
|
||||
*/
|
||||
virtual void close() = 0;
|
||||
/**
|
||||
* All debug tools that support target power management functions must provide an implementation of the
|
||||
* TargetPowerManagementInterface class, via this function.
|
||||
*
|
||||
* For debug tools that cannot manage target power, a nullptr should be returned.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned TargetPowerManagementInterface
|
||||
* instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* getTargetPowerManagementInterface() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual std::string getName() = 0;
|
||||
/**
|
||||
* All debug tools that support debugging operations on AVR8 targets must provide an implementation of
|
||||
* the Avr8DebugInterface class, via this function.
|
||||
*
|
||||
* For debug tools that do not support debugging on AVR8 targets, this function should return a nullptr.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned Avr8DebugInterface instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface(
|
||||
const Targets::Microchip::Avr::Avr8Bit::Avr8TargetConfig& targetConfig,
|
||||
Targets::Microchip::Avr::Avr8Bit::Family targetFamily,
|
||||
const Targets::Microchip::Avr::Avr8Bit::TargetParameters& targetParameters,
|
||||
const Targets::TargetRegisterDescriptorMapping& targetRegisterDescriptorsById
|
||||
) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual std::string getSerialNumber() = 0;
|
||||
/**
|
||||
* All debug tools that support interfacing with AVR targets via the ISP interface must provide an
|
||||
* implementation of the AvrIspInterface class, via this function.
|
||||
*
|
||||
* For debug tools that do not support the interface, a nullptr should be returned.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned AvrIspInterface instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::AvrIspInterface* getAvrIspInterface(
|
||||
const Targets::Microchip::Avr::Avr8Bit::Avr8TargetConfig& targetConfig
|
||||
) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* All debug tools that support target power management functions must provide an implementation of the
|
||||
* TargetPowerManagementInterface class, via this function.
|
||||
*
|
||||
* For debug tools that cannot manage target power, a nullptr should be returned.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned TargetPowerManagementInterface
|
||||
* instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* getTargetPowerManagementInterface() {
|
||||
return nullptr;
|
||||
}
|
||||
[[nodiscard]] bool isInitialised() const {
|
||||
return this->initialised;
|
||||
}
|
||||
|
||||
/**
|
||||
* All debug tools that support debugging operations on AVR8 targets must provide an implementation of
|
||||
* the Avr8DebugInterface class, via this function.
|
||||
*
|
||||
* For debug tools that do not support debugging on AVR8 targets, this function should return a nullptr.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned Avr8DebugInterface instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface(
|
||||
const Targets::Microchip::Avr::Avr8Bit::Avr8TargetConfig& targetConfig,
|
||||
Targets::Microchip::Avr::Avr8Bit::Family targetFamily,
|
||||
const Targets::Microchip::Avr::Avr8Bit::TargetParameters& targetParameters,
|
||||
const Targets::TargetRegisterDescriptorMapping& targetRegisterDescriptorsById
|
||||
) {
|
||||
return nullptr;
|
||||
}
|
||||
protected:
|
||||
void setInitialised(bool initialised) {
|
||||
this->initialised = initialised;
|
||||
}
|
||||
|
||||
/**
|
||||
* All debug tools that support interfacing with AVR targets via the ISP interface must provide an
|
||||
* implementation of the AvrIspInterface class, via this function.
|
||||
*
|
||||
* For debug tools that do not support the interface, a nullptr should be returned.
|
||||
*
|
||||
* Note: the caller of this function will not manage the lifetime of the returned AvrIspInterface instance.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::AvrIspInterface* getAvrIspInterface(
|
||||
const Targets::Microchip::Avr::Avr8Bit::Avr8TargetConfig& targetConfig
|
||||
) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool isInitialised() const {
|
||||
return this->initialised;
|
||||
}
|
||||
|
||||
protected:
|
||||
void setInitialised(bool initialised) {
|
||||
this->initialised = initialised;
|
||||
}
|
||||
|
||||
private:
|
||||
bool initialised = false;
|
||||
};
|
||||
}
|
||||
private:
|
||||
bool initialised = false;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "AtmelIce.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
AtmelIce::AtmelIce()
|
||||
: EdbgDevice(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/DebugToolDrivers/Microchip/EdbgDevice.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
/**
|
||||
* The Atmel-ICE device is an EDBG (Embedded Debugger) device.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "CuriosityNano.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
CuriosityNano::CuriosityNano()
|
||||
: EdbgDevice(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/DebugToolDrivers/Microchip/EdbgDevice.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
/**
|
||||
* The Curiosity Nano is an evaluation board featuring an on-board debugger. The debugger is EDBG-based.
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include "src/TargetController/Exceptions/DeviceFailure.hpp"
|
||||
#include "src/TargetController/Exceptions/DeviceInitializationFailure.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
using namespace Protocols::CmsisDap::Edbg::Avr;
|
||||
using namespace Bloom::Exceptions;
|
||||
using namespace Exceptions;
|
||||
|
||||
using Protocols::CmsisDap::Edbg::EdbgInterface;
|
||||
using Protocols::CmsisDap::Edbg::EdbgTargetPowerManagementInterface;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvrIspInterface.hpp"
|
||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgTargetPowerManagementInterface.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
/**
|
||||
* Microchip EDBG (Embedded Debugger) devices implement the CMSIS-DAP interface. As well as the CMSIS-DAP protocol,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "JtagIce3.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
JtagIce3::JtagIce3()
|
||||
: EdbgDevice(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/DebugToolDrivers/Microchip/EdbgDevice.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
/**
|
||||
* The JTAGICE3, from firmware version 3.x+, is an EDBG device.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "src/TargetController/Exceptions/DeviceNotFound.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
MplabPickit4::MplabPickit4()
|
||||
: EdbgDevice(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "src/DebugToolDrivers/Microchip/EdbgDevice.hpp"
|
||||
|
||||
namespace Bloom::DebugToolDrivers
|
||||
namespace DebugToolDrivers
|
||||
{
|
||||
/**
|
||||
* Like the MPLAB Snap, the PICkit 4 is a hybrid device. It can present itself as an EDBG (Embedded Debugger)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user