forked from qt-creator/qt-creator
Debugger: Add peripheral registers description file support
This feature is useful for the bare-metal programming. It allows to view the peripheral registers of the debugged device using the GDB. An information about the peripheral registers for a concrete device contains in a special SVD file. A format of this file described e.g. here: * https://www.keil.com/pack/doc/CMSIS/SVD/html/svd_Format_pg.html This feature supported only for ARM devices, and an appropriate SVD files can be found in the Internet, also this files provides by KEIL or IAR EW IDE's. A use case in QtC is that the user should to choose desired SVD file and set its path to the bare-metal device configuration widget. After this, the user can enable the "Peripheral Registers" view, choose a desired register group and to see a peripheral register values. Currently the following basic features are implemented: * Choosing SVD file for a target bare-metal device. * Choosing any peripheral register group, which is available for this device. * Seeing the info about the each peripheral register and its fields. * Seeing the value for the each peripheral register and its fields. * Changing the value for the each peripheral register and its fields (if it is allowed by access for a concrete register or field). * Changing the format of the values (hexadecimal, decimal, octal, binary). Fixes: QTCREATORBUG-18729 Change-Id: I3c38ea50ccd2e128746458f9b918095b4c2d644a Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <debugger/breakhandler.h>
|
||||
#include <debugger/registerhandler.h>
|
||||
#include <debugger/peripheralregisterhandler.h>
|
||||
#include <debugger/watchhandler.h>
|
||||
#include <debugger/watchutils.h>
|
||||
#include <debugger/debuggeritem.h>
|
||||
@@ -266,10 +267,13 @@ private: ////////// General Interface //////////
|
||||
// Register specific stuff
|
||||
//
|
||||
void reloadRegisters() final;
|
||||
void reloadPeripheralRegisters() final;
|
||||
void setRegisterValue(const QString &name, const QString &value) final;
|
||||
void setPeripheralRegisterValue(quint64 address, quint64 value) final;
|
||||
void handleRegisterListNames(const DebuggerResponse &response);
|
||||
void handleRegisterListing(const DebuggerResponse &response);
|
||||
void handleRegisterListValues(const DebuggerResponse &response);
|
||||
void handlePeripheralRegisterListValues(const DebuggerResponse &response);
|
||||
void handleMaintPrintRegisters(const DebuggerResponse &response);
|
||||
QHash<int, Register> m_registers; // Map GDB register numbers to indices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user