pymcuprog.deviceinfo package¶
Submodules¶
pymcuprog.deviceinfo.deviceinfo module¶
deviceinfo.py A simple Device Information service
Device information is stored in files named <devicename>.py in the devices sub-folder Each device file contains a dict of values These device files are [ideally] generated from DFP information by [running generate_device_info.py | hand]
- class pymcuprog.deviceinfo.deviceinfo.DeviceMemoryInfo(device_info)¶
Bases:
object
API to fetch information about device memory segments
- static bytes_or_words(address_param)¶
Return multiplier for address parameter
The returned multiplier can be used to convert the address parameter to byte address
- Parameters:
address_param – Address parameter (used as key in device info dict)
- Returns:
Multiplier to convert the address to byte address
- memory_info_by_address(byte_address, address_type='address', size_type='size')¶
Returns information about the memory type for a given byte address
- Parameters:
byte_address – Memory address to check
address_type – Selects between normal addresses and addresses used in hex files (ADDRESS vs HEXFILE_ADDRESS)
size_type – Selects between normal size and size used in hexfiles (size vs hexfile_size)
- memory_info_by_address_range(start, stop, address_type='address', size_type='size')¶
Returns a list of all memories applicable for the address range(start, stop)
- Parameters:
start – Start address (byte)
stop – End address (byte)
address_type – Selects between normal addresses and addresses used in hex files (address vs hexfile_address)
size_type – Selects between normal size and size used in hexfiles (size vs hexfile_size)
- memory_info_by_name(name)¶
Returns information about the requested memory
- pymcuprog.deviceinfo.deviceinfo.get_supported_devices()¶
Return a list of all supported devices
A device is supported if it has a device model file in the devices folder
- Returns:
list of devices
- pymcuprog.deviceinfo.deviceinfo.getdeviceinfo(devicename)¶
Looks up device info for a given part
- Parameters:
devicename – device to look up
- Returns:
device information dict
pymcuprog.deviceinfo.deviceinfokeys module¶
Definitions of keys for device info dictionaries
- class pymcuprog.deviceinfo.deviceinfokeys.DeviceInfoKeys¶
Bases:
object
Base class with common device info keys
- ARCHITECTURE = 'architecture'¶
- DEVICE_ID = 'device_id'¶
- INTERFACE = 'interface'¶
- NAME = 'name'¶
- classmethod get_all()¶
Get a list of all keys
:return List of all valid keys (baseclass and any subclass keys if run on a subclass)
- class pymcuprog.deviceinfo.deviceinfokeys.DeviceInfoKeysAvr¶
Bases:
DeviceInfoKeys
Keys specific to AVR device info files
- ADDRESS_SIZE = 'address_size'¶
- DATA_ADDRESS_SPACE = 'data_space_base'¶
- HV_IMPLEMENTATION = 'hv_implementation'¶
- NVMCTRL_BASE = 'nvmctrl_base'¶
- OCD_BASE = 'ocd_base'¶
- PROG_CLOCK_KHZ = 'prog_clock_khz'¶
- SYSCFG_BASE = 'syscfg_base'¶
- class pymcuprog.deviceinfo.deviceinfokeys.DeviceInfoKeysAvr32¶
Bases:
DeviceInfoKeys
Keys specific to 32-bit AVR device info files
- RESET_DOMAINS = 'reset_domains'¶
- class pymcuprog.deviceinfo.deviceinfokeys.DeviceInfoKeysPic¶
Bases:
DeviceInfoKeys
Keys specific to PIC device info files
- DEFAULT_BULK_ERASE_ADDRESS = 'default_bulk_erase_address'¶
- class pymcuprog.deviceinfo.deviceinfokeys.DeviceMemoryInfoKeys¶
Bases:
object
Keys for device memory info dictionary
These keys are found in the dictionaries returned by DeviceMemoryInfo for each memory type
- ADDRESS = 'address'¶
- CHIPERASE_EFFECT = 'chiperase_effect'¶
- ERASE_ADDRESS = 'erase_address'¶
- HEXFILE_ADDRESS = 'hexfile_address'¶
- HEXFILE_SIZE = 'hexfile_size'¶
- ISOLATED_ERASE = 'isolated_erase'¶
- NAME = 'name'¶
- PAGE_SIZE = 'page_size'¶
- READ_SIZE = 'read_size'¶
- SIZE = 'size'¶
- VERIFY_MASK = 'verify_mask'¶
- WRITE_SIZE = 'write_size'¶
- classmethod get_all()¶
Get a list of all keys
- Returns:
List of all valid keys (baseclass and any subclass keys if run on a subclass)
pymcuprog.deviceinfo.eraseflags module¶
Definitions of erase related flags for the device models
- pymcuprog.deviceinfo.eraseflags.get_list_of_chiperase_effects()¶
Return a list of all ChiperaseEffect values
pymcuprog.deviceinfo.memorynames module¶
Memory name definitions
- class pymcuprog.deviceinfo.memorynames.MemoryNameAliases¶
Bases:
object
Memory names that are actually not real memories but an alias for several memories
- ALL = 'all'¶
- class pymcuprog.deviceinfo.memorynames.MemoryNames¶
Bases:
object
Memory names corresponding to target device memories
- BOOT_ROW = 'boot_row'¶
- CALIBRATION_ROW = 'calibration_row'¶
- CONFIG_WORD = 'config_words'¶
- DCI = 'dci'¶
- DIA = 'dia'¶
- EEPROM = 'eeprom'¶
- FLASH = 'flash'¶
- FUSES = 'fuses'¶
- ICD = 'icd'¶
- INTERNAL_SRAM = 'internal_sram'¶
- LOCKBITS = 'lockbits'¶
- SIGNATURES = 'signatures'¶
- USER_ID = 'user_id'¶
- USER_ROW = 'user_row'¶
- classmethod get_all()¶
Get a list of all memories representing actual device memories
:return List of all memory names representing actual device memories