Renamed part description files to target description files.

Introduced a generic target description file class with an AVR8 derivation.
Moved AVR8 target description files
This commit is contained in:
Nav
2021-05-31 01:01:14 +01:00
parent 08914372b9
commit 571211b337
270 changed files with 877 additions and 820 deletions

View File

@@ -0,0 +1,46 @@
#pragma once
#include <cstdint>
#include <QDomElement>
#include "src/Helpers/BiMap.hpp"
namespace Bloom::Targets::TargetDescription
{
enum MemorySegmentType {
REGISTERS,
IO,
EEPROM,
RAM,
FLASH,
SIGNATURES,
FUSES,
LOCKBITS,
OSCCAL,
};
struct MemorySegment
{
std::string name;
MemorySegmentType type;
std::uint32_t startAddress;
std::uint32_t size;
std::optional<std::uint16_t> pageSize;
/**
* Mapping of all known memory segment types by their name. Any memory segments belonging to a type
* not defined in here should be ignored.
*/
static const inline BiMap<std::string, MemorySegmentType> typesMappedByName = {
{"regs", MemorySegmentType::REGISTERS},
{"io", MemorySegmentType::IO},
{"eeprom", MemorySegmentType::EEPROM},
{"ram", MemorySegmentType::RAM},
{"flash", MemorySegmentType::FLASH},
{"signatures", MemorySegmentType::SIGNATURES},
{"fuses", MemorySegmentType::FUSES},
{"lockbits", MemorySegmentType::LOCKBITS},
{"osccal", MemorySegmentType::OSCCAL},
};
};
}