Package be.lmenten.avr.core.descriptor
Class CoreDescriptor
java.lang.Object
be.lmenten.avr.core.descriptor.CoreDescriptor
A descriptor for a specific MCU from the AVR families.
It serves the same purpose as the part specific include file used by AVRASM and extends it to provide a full description of the part.
- A description of the core
- The various coreFeatures supported.
- The definition of all memories supported.
- The definitions of every I/O registers and their bits
- The fuses bytes and lockbits definitions.
- The interrupts names and vectors.
- Some internal informations
- Since:
- 1.0
- Version:
- 1.0, (4 Jun 2020)
- Author:
- Laurent Menten
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
getBootLoaderSection(int bootsz)
Get the size in bytes of the boot loader section according to the BOOTSZ fuse value.int
Get the width of the EEPROM addresses.int
Get the size of the EEPROM in bytes.int
int
int
Get author of the device description file.Get date of the device description file.Get notes of the device description file.Get version of the device description file.int
Get the size of the flash memory in bytes.getFuseDescriptor(String name)
int
Get the number of fuses bytes of this MCU.int
Get the number of interrupt vectors supported by this MCU.int
getInterruptVector(String name)
int
Get the size of a single interrupt vector in bytes.int
int
int
Get the number of lockbits bytes of this MCU.getLockBitsDescriptor(String name)
int
Get the length of the longest register's bit name.int
int
Get the length of the longest register name.getMemoryRange(CoreMemory memory, String name)
getMemoryRanges(CoreMemory memory)
int
int
byte[]
int
Get the number of bits of this MCU's program counter.getRegisterDescriptor(int address)
getRegisterDescriptor(String name)
int
int
int
int
getSymbolDefinition(String symbol)
int
boolean
hasFeature(CoreFeatures feature)
boolean
hasInstruction(InstructionSet instruction)
boolean
isInstructionMissing(InstructionSet instruction)
-
Field Details
-
hasSram
public boolean hasSram -
hasEeprom
public boolean hasEeprom
-
-
Method Details
-
getFileVersion
Get version of the device description file.- Returns:
- the description file version
-
getFileDate
Get date of the device description file.- Returns:
-
getFileAuthor
Get author of the device description file.- Returns:
-
getFileNotes
Get notes of the device description file.- Returns:
-
getMaxRegisterNameLength
public int getMaxRegisterNameLength()Get the length of the longest register name.- Returns:
-
getMaxBitNameLength
public int getMaxBitNameLength()Get the length of the longest register's bit name.- Returns:
-
getPartName
- Returns:
-
getCoreVersionASM
- Returns:
-
getCoreVersion
- Returns:
-
getMissingInstructions
- Returns:
-
isInstructionMissing
- Parameters:
instruction
-- Returns:
-
hasInstruction
- Parameters:
instruction
-- Returns:
-
getPartSignature
public byte[] getPartSignature()- Returns:
-
getFeatures
- Returns:
-
hasFeature
- Parameters:
feature
-- Returns:
-
getSymbolsCount
public int getSymbolsCount()- Returns:
-
exportSymbols
- Parameters:
c
-
-
getSymbolDefinition
- Parameters:
symbol
-- Returns:
-
getFusesCount
public int getFusesCount()Get the number of fuses bytes of this MCU.- Returns:
-
exportFuses
- Parameters:
c
-
-
getLockBitsCount
public int getLockBitsCount()Get the number of lockbits bytes of this MCU.- Returns:
-
exportLockBits
- Parameters:
c
-
-
getMemoryRanges
- Parameters:
memory
-- Returns:
-
getMemoryRange
- Parameters:
memory
-name
-- Returns:
-
getFlashSize
public int getFlashSize()Get the size of the flash memory in bytes.- Returns:
- Size of flash memory in bytes.
-
getProgramCounterWidth
public int getProgramCounterWidth()Get the number of bits of this MCU's program counter.- Returns:
-
getInterruptVectorSize
public int getInterruptVectorSize()Get the size of a single interrupt vector in bytes.- Returns:
-
getInterruptVector
-
getInterruptsCount
public int getInterruptsCount()Get the number of interrupt vectors supported by this MCU.- Returns:
-
exportInterrupts
-
getRwwRange
- Returns:
-
getNRwwRane
- Returns:
-
getPageSize
public int getPageSize()- Returns:
-
getBootLoaderSection
Get the size in bytes of the boot loader section according to the BOOTSZ fuse value.- Parameters:
bootsz
-- Returns:
-
getOnChipSramSize
public int getOnChipSramSize()- Returns:
-
getRegistersBase
public int getRegistersBase() -
getRegistersCount
public int getRegistersCount() -
exportRegisters
-
getIoRegistersBase
public int getIoRegistersBase() -
getIoRegistersCount
public int getIoRegistersCount() -
exportIoRegisters
-
getExtendedIoRegistersBase
public int getExtendedIoRegistersBase() -
getExtendedIoRegistersCount
public int getExtendedIoRegistersCount() -
exportExtendedIoRegisters
-
getSramBase
public int getSramBase() -
getSramSize
public int getSramSize() -
getExternalSramBase
public int getExternalSramBase() -
getMaxExternalSramSize
public int getMaxExternalSramSize() -
getEepromSize
public int getEepromSize()Get the size of the EEPROM in bytes.- Returns:
-
getEepromAddressWidth
public int getEepromAddressWidth()Get the width of the EEPROM addresses.- Returns:
-
getRegisterDescriptor
-
getRegisterDescriptor
-
getFuseDescriptor
-
getLockBitsDescriptor
-