Enum value for all possible memory segment types

This commit is contained in:
Nav
2023-12-19 21:54:30 +00:00
parent 0d1ab0205d
commit 647b8aa8a3

View File

@@ -8,17 +8,19 @@
namespace Targets::TargetDescription namespace Targets::TargetDescription
{ {
enum class MemorySegmentType enum class MemorySegmentType: std::uint8_t
{ {
ALIASED,
REGISTERS, REGISTERS,
IO,
EEPROM, EEPROM,
RAM,
FLASH, FLASH,
SIGNATURES,
FUSES, FUSES,
IO,
RAM,
LOCKBITS, LOCKBITS,
OSCCAL, OSCCAL,
SIGNATURES,
USER_SIGNATURES,
}; };
struct MemorySegment struct MemorySegment
@@ -34,15 +36,17 @@ namespace Targets::TargetDescription
* not defined in here should be ignored. * not defined in here should be ignored.
*/ */
static const inline BiMap<std::string, MemorySegmentType> typesMappedByName = { static const inline BiMap<std::string, MemorySegmentType> typesMappedByName = {
{"aliased", MemorySegmentType::ALIASED},
{"regs", MemorySegmentType::REGISTERS}, {"regs", MemorySegmentType::REGISTERS},
{"io", MemorySegmentType::IO},
{"eeprom", MemorySegmentType::EEPROM}, {"eeprom", MemorySegmentType::EEPROM},
{"ram", MemorySegmentType::RAM},
{"flash", MemorySegmentType::FLASH}, {"flash", MemorySegmentType::FLASH},
{"signatures", MemorySegmentType::SIGNATURES},
{"fuses", MemorySegmentType::FUSES}, {"fuses", MemorySegmentType::FUSES},
{"io", MemorySegmentType::IO},
{"ram", MemorySegmentType::RAM},
{"lockbits", MemorySegmentType::LOCKBITS}, {"lockbits", MemorySegmentType::LOCKBITS},
{"osccal", MemorySegmentType::OSCCAL}, {"osccal", MemorySegmentType::OSCCAL},
{"signatures", MemorySegmentType::SIGNATURES},
{"user_signatures", MemorySegmentType::USER_SIGNATURES},
}; };
}; };
} }