This commit is contained in:
Nav
2022-09-06 17:17:43 +01:00
parent 46d8ce1854
commit 7d07a9cf6c
9 changed files with 38 additions and 31 deletions

View File

@@ -1,6 +1,5 @@
#include "EdbgAvr8Interface.hpp"
#include <cstdint>
#include <thread>
#include <cmath>

View File

@@ -23,7 +23,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
{
public:
explicit EdbgAvrIspInterface(EdbgInterface& edbgInterface)
: edbgInterface(edbgInterface) {};
: edbgInterface(edbgInterface)
{};
/**
* The EdbgAvrIspInterface doesn't actually require any config from the user, at this point in time. So this

View File

@@ -14,7 +14,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrame
{
public:
GetProgramCounter() = default;
explicit GetProgramCounter(const std::vector<AvrResponse>& avrResponses): Avr8GenericResponseFrame(avrResponses) {}
explicit GetProgramCounter(const std::vector<AvrResponse>& avrResponses)
: Avr8GenericResponseFrame(avrResponses)
{}
Targets::TargetProgramCounter extractProgramCounter() {
/*

View File

@@ -13,7 +13,9 @@ namespace Bloom::Events
static constexpr EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED;
static inline const std::string name = "DebugServerThreadStateChanged";
explicit DebugServerThreadStateChanged(ThreadState state): state(state) {};
explicit DebugServerThreadStateChanged(ThreadState state)
: state(state)
{};
[[nodiscard]] EventType getType() const override {
return DebugServerThreadStateChanged::type;

View File

@@ -13,7 +13,9 @@ namespace Bloom::Events
static constexpr EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED;
static inline const std::string name = "TargetControllerThreadStateChanged";
explicit TargetControllerThreadStateChanged(ThreadState state): state(state) {};
explicit TargetControllerThreadStateChanged(ThreadState state)
: state(state)
{};
[[nodiscard]] EventType getType() const override {
return TargetControllerThreadStateChanged::type;

View File

@@ -11,16 +11,16 @@ namespace Bloom::Widgets
Targets::TargetMemorySize size,
QString labelText,
AnnotationItemPosition position
):
QGraphicsItem(nullptr),
startAddress(startAddress),
size(size),
endAddress(static_cast<std::uint32_t>(startAddress + size - 1)),
labelText(std::move(labelText)),
position(position),
width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)),
height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT
) {
)
: QGraphicsItem(nullptr)
, startAddress(startAddress)
, size(size)
, endAddress(static_cast<Targets::TargetMemoryAddress>(startAddress + size - 1))
, labelText(std::move(labelText))
, position(position)
, width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN))
, height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT)
{
this->setAcceptHoverEvents(true);
this->setToolTip(this->labelText);
}
@@ -29,19 +29,22 @@ namespace Bloom::Widgets
const Targets::TargetMemoryAddressRange& addressRange,
const QString& labelText,
AnnotationItemPosition position
): AnnotationItem(
addressRange.startAddress,
addressRange.endAddress - addressRange.startAddress + 1,
labelText,
position
) {}
)
: AnnotationItem(
addressRange.startAddress,
addressRange.endAddress - addressRange.startAddress + 1,
labelText,
position
)
{}
AnnotationItem::AnnotationItem(const FocusedMemoryRegion& focusedMemoryRegion, AnnotationItemPosition position)
: AnnotationItem(
focusedMemoryRegion.addressRange,
focusedMemoryRegion.name,
position
) {}
: AnnotationItem(
focusedMemoryRegion.addressRange,
focusedMemoryRegion.name,
position
)
{}
void AnnotationItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) {
auto lineColor = this->getLineColor();

View File

@@ -37,8 +37,7 @@ namespace Bloom::Widgets
);
AnnotationItem(
const Targets::TargetMemoryAddressRange&
addressRange,
const Targets::TargetMemoryAddressRange& addressRange,
const QString& labelText,
AnnotationItemPosition position
);

View File

@@ -4,7 +4,6 @@
#include "Command.hpp"
#include "src/Targets/TargetBreakpoint.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::TargetController::Commands

View File

@@ -1,14 +1,14 @@
#pragma once
#include <string>
#include <cstdint>
#include <string>
#include <map>
#include "TargetPinDescriptor.hpp"
namespace Bloom::Targets
{
enum class TargetPackage: int
enum class TargetPackage: std::uint8_t
{
UNKNOWN,