Class CoreDescriptor

java.lang.Object
be.lmenten.avr.core.descriptor.CoreDescriptor

public class CoreDescriptor extends Object

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 Details

    • hasSram

      public boolean hasSram
    • hasEeprom

      public boolean hasEeprom
  • Method Details

    • getFileVersion

      public Runtime.Version getFileVersion()
      Get version of the device description file.
      Returns:
      the description file version
    • getFileDate

      public String getFileDate()
      Get date of the device description file.
      Returns:
    • getFileAuthor

      public String getFileAuthor()
      Get author of the device description file.
      Returns:
    • getFileNotes

      public String 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

      public String getPartName()
      Returns:
    • getCoreVersionASM

      public CoreVersionASM getCoreVersionASM()
      Returns:
    • getCoreVersion

      public CoreVersion getCoreVersion()
      Returns:
    • getMissingInstructions

      public InstructionSet[] getMissingInstructions()
      Returns:
    • isInstructionMissing

      public boolean isInstructionMissing(InstructionSet instruction)
      Parameters:
      instruction -
      Returns:
    • hasInstruction

      public boolean hasInstruction(InstructionSet instruction)
      Parameters:
      instruction -
      Returns:
    • getPartSignature

      public byte[] getPartSignature()
      Returns:
    • getFeatures

      public CoreFeatures[] getFeatures()
      Returns:
    • hasFeature

      public boolean hasFeature(CoreFeatures feature)
      Parameters:
      feature -
      Returns:
    • getSymbolsCount

      public int getSymbolsCount()
      Returns:
    • exportSymbols

      public void exportSymbols(BiConsumer<String,​CoreSymbolDefinition> c)
      Parameters:
      c -
    • getSymbolDefinition

      public CoreSymbolDefinition getSymbolDefinition(String symbol)
      Parameters:
      symbol -
      Returns:
    • getFusesCount

      public int getFusesCount()
      Get the number of fuses bytes of this MCU.
      Returns:
    • exportFuses

      public void exportFuses(BiConsumer<Integer,​CoreRegisterDescriptor> c)
      Parameters:
      c -
    • getLockBitsCount

      public int getLockBitsCount()
      Get the number of lockbits bytes of this MCU.
      Returns:
    • exportLockBits

      public void exportLockBits(BiConsumer<Integer,​CoreRegisterDescriptor> c)
      Parameters:
      c -
    • getMemoryRanges

      public Collection<CoreMemoryRange> getMemoryRanges(CoreMemory memory)
      Parameters:
      memory -
      Returns:
    • getMemoryRange

      public CoreMemoryRange getMemoryRange(CoreMemory memory, String name)
      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

      public int getInterruptVector(String name)
    • getInterruptsCount

      public int getInterruptsCount()
      Get the number of interrupt vectors supported by this MCU.
      Returns:
    • exportInterrupts

      public void exportInterrupts(BiConsumer<String,​CoreInterruptDescriptor> c)
    • getRwwRange

      public CoreMemoryRange getRwwRange()
      Returns:
    • getNRwwRane

      public CoreMemoryRange getNRwwRane()
      Returns:
    • getPageSize

      public int getPageSize()
      Returns:
    • getBootLoaderSection

      public CoreMemoryRange getBootLoaderSection(int bootsz)
      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

      public void exportRegisters(BiConsumer<Integer,​CoreRegisterDescriptor> c)
    • getIoRegistersBase

      public int getIoRegistersBase()
    • getIoRegistersCount

      public int getIoRegistersCount()
    • exportIoRegisters

      public void exportIoRegisters(BiConsumer<Integer,​CoreRegisterDescriptor> c)
    • getExtendedIoRegistersBase

      public int getExtendedIoRegistersBase()
    • getExtendedIoRegistersCount

      public int getExtendedIoRegistersCount()
    • exportExtendedIoRegisters

      public void exportExtendedIoRegisters(BiConsumer<Integer,​CoreRegisterDescriptor> c)
    • 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

      public CoreRegisterDescriptor getRegisterDescriptor(String name)
    • getRegisterDescriptor

      public CoreRegisterDescriptor getRegisterDescriptor(int address)
    • getFuseDescriptor

      public CoreRegisterDescriptor getFuseDescriptor(String name)
    • getLockBitsDescriptor

      public CoreRegisterDescriptor getLockBitsDescriptor(String name)