Massive refactor to accommodate RISC-V targets

- Refactored entire codebase (excluding the Insight component) to accommodate multiple target architectures (no longer specific to AVR)
- Deleted 'generate SVD' GDB monitor command - I will eventually move this functionality to the Bloom website
- Added unit size property to address spaces
- Many other changes which I couldn't be bothered to describe here
This commit is contained in:
Nav
2024-07-23 21:14:22 +01:00
parent 2986934485
commit 6cdbfbe950
331 changed files with 8815 additions and 8565 deletions

View File

@@ -2,11 +2,14 @@
#include <string>
#include <map>
#include <vector>
#include <optional>
#include <functional>
#include <string_view>
#include "TargetRegisterGroupDescriptor.hpp"
#include "TargetRegisterDescriptor.hpp"
#include "TargetPeripheralSignalDescriptor.hpp"
namespace Targets
{
@@ -16,17 +19,32 @@ namespace Targets
std::string key;
std::string name;
std::map<std::string, TargetRegisterGroupDescriptor, std::less<void>> registerGroupDescriptorsByKey;
std::vector<TargetPeripheralSignalDescriptor> signalDescriptors;
TargetPeripheralDescriptor(
const std::string& key,
const std::string& name,
const std::map<std::string, TargetRegisterGroupDescriptor, std::less<void>>& registerGroupDescriptorsByKey
std::map<std::string, TargetRegisterGroupDescriptor, std::less<void>>&& registerGroupDescriptorsByKey,
std::vector<TargetPeripheralSignalDescriptor>&& signalDescriptors
);
std::optional<std::reference_wrapper<const TargetRegisterGroupDescriptor>> tryGetRegisterGroupDescriptor(
std::string_view keyStr
TargetPeripheralDescriptor(const TargetPeripheralDescriptor& other) = delete;
TargetPeripheralDescriptor& operator = (const TargetPeripheralDescriptor& other) = delete;
TargetPeripheralDescriptor(TargetPeripheralDescriptor&& other) noexcept = default;
TargetPeripheralDescriptor& operator = (TargetPeripheralDescriptor&& other) = default;
[[nodiscard]] std::optional<
std::reference_wrapper<const TargetRegisterGroupDescriptor>
> tryGetRegisterGroupDescriptor(std::string_view keyStr) const;
[[nodiscard]] const TargetRegisterGroupDescriptor& getRegisterGroupDescriptor(std::string_view key) const;
[[nodiscard]] const TargetRegisterDescriptor& getRegisterDescriptor(
std::string_view groupKey,
const std::string& registerKey
) const;
const TargetRegisterGroupDescriptor& getRegisterGroupDescriptor(std::string_view key) const;
[[nodiscard]] TargetPeripheralDescriptor clone() const;
};
}