2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <vector>
|
2021-08-07 17:15:48 +01:00
|
|
|
#include <map>
|
2023-05-21 21:08:25 +01:00
|
|
|
#include <algorithm>
|
2022-03-25 00:09:53 +00:00
|
|
|
#include <QMetaType>
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2023-12-12 18:11:17 +00:00
|
|
|
#include "TargetFamily.hpp"
|
2021-10-09 19:17:58 +01:00
|
|
|
#include "TargetMemory.hpp"
|
2024-03-21 15:03:06 +00:00
|
|
|
#include "TargetAddressSpaceDescriptor.hpp"
|
|
|
|
|
#include "TargetPeripheralDescriptor.hpp"
|
2021-04-04 21:04:12 +01:00
|
|
|
#include "TargetVariant.hpp"
|
2023-09-20 23:37:54 +01:00
|
|
|
#include "TargetBreakpoint.hpp"
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace Targets
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
|
|
|
|
struct TargetDescriptor
|
|
|
|
|
{
|
2023-11-22 00:37:29 +00:00
|
|
|
std::string name;
|
2024-03-21 15:03:06 +00:00
|
|
|
TargetFamily family;
|
|
|
|
|
std::string marketId;
|
2022-08-30 02:51:10 +01:00
|
|
|
std::string vendorName;
|
2024-03-21 15:03:06 +00:00
|
|
|
std::map<std::string, TargetAddressSpaceDescriptor> addressSpaceDescriptorsByKey;
|
|
|
|
|
std::map<std::string, TargetPeripheralDescriptor> peripheralDescriptorsByKey;
|
2021-04-04 21:04:12 +01:00
|
|
|
std::vector<TargetVariant> variants;
|
2024-03-21 15:03:06 +00:00
|
|
|
BreakpointResources breakpointResources;
|
2023-05-21 21:08:25 +01:00
|
|
|
|
|
|
|
|
TargetDescriptor(
|
2023-09-20 18:56:44 +01:00
|
|
|
const std::string& name,
|
2024-03-21 15:03:06 +00:00
|
|
|
TargetFamily family,
|
2023-09-20 18:56:44 +01:00
|
|
|
const std::string& vendorName,
|
2024-03-21 15:03:06 +00:00
|
|
|
const std::string& marketName,
|
|
|
|
|
const std::map<std::string, TargetAddressSpaceDescriptor>& addressSpaceDescriptorsByKey,
|
|
|
|
|
const std::map<std::string, TargetPeripheralDescriptor>& peripheralDescriptorsByKey,
|
2023-09-20 18:56:44 +01:00
|
|
|
const std::vector<TargetVariant>& variants,
|
2024-03-21 15:03:06 +00:00
|
|
|
const BreakpointResources& breakpointResources
|
|
|
|
|
);
|
2023-05-21 21:08:25 +01:00
|
|
|
|
2024-03-21 15:03:06 +00:00
|
|
|
std::optional<std::reference_wrapper<const TargetAddressSpaceDescriptor>> tryGetAddressSpaceDescriptor(
|
|
|
|
|
const std::string& key
|
|
|
|
|
) const;
|
2023-05-21 21:08:25 +01:00
|
|
|
|
2024-03-21 15:03:06 +00:00
|
|
|
const TargetAddressSpaceDescriptor& getAddressSpaceDescriptor(const std::string& key) const;
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
Q_DECLARE_METATYPE(Targets::TargetDescriptor)
|