Class ArchAVR_Core

Inheritance Relationships

Base Type

Class Documentation

class ArchAVR_Core : public Core

Implementation of a CPU core for AVR series The main addition is to handle the address mapping in data space.

Public Types

enum ArchAVR_NVM

Additional NVM enumerations.

Values:

enumerator NVM_EEPROM
enumerator NVM_Lockbit

Public Functions

explicit ArchAVR_Core(const ArchAVR_CoreConfig &config)

Protected Functions

virtual uint8_t cpu_read_data(mem_addr_t data_addr) override

Read memory in data address space. This is a pure virtual function that architectures should implement. Implementations should ensure that, if the address is invalid, the behavior should be consistent with the option IgnoreBadCpuIO.

This function is intended for CPU use only.

See also

cpu_read_ioreg()

Parameters:

data_addr – Memory address (in 8-bits, data address space) to read

Returns:

Content at the flash address

virtual void cpu_write_data(mem_addr_t data_addr, uint8_t value) override

Write memory in data address space. This is a pure virtual function that architectures should implement. Implementations should ensure that, if the address is invalid or read-only, the behavior should be consistent with the option IgnoreBadCpuIO.

This function is intended for CPU use only.

Parameters:
  • data_addr – Memory address (in 8-bits, data address space) to read

  • value – Value to write

virtual void dbg_read_data(mem_addr_t start, uint8_t *buf, mem_addr_t len) override

Read memory in data address space. This is a pure virtual function that architectures should implement.

This function is intended for debug probe use only.

Parameters:
  • start – First memory address (in 8-bits, data address space) to read

  • buf – Buffer where the memory data will be copied into

  • len – Length of the memory block to read

virtual void dbg_write_data(mem_addr_t start, const uint8_t *buf, mem_addr_t len) override

Write memory in data address space. This is a pure virtual function that architectures should implement.

This function is intended for debug probe use only.

Parameters:
  • start – First memory address (in 8-bits, data address space) to read

  • buf – Buffer from which the memory data will be copied

  • len – Length of the memory block to write