query
stringlengths
9
9.05k
document
stringlengths
10
222k
negatives
listlengths
19
20
metadata
dict
Returns the DLL's compatible JLink firmware version.
def compatible_firmware_version(self): identifier = self.firmware_version.split('compiled')[0] buf_size = self.MAX_BUF_SIZE buf = (ctypes.c_char * buf_size)() res = self._dll.JLINKARM_GetEmbeddedFWString(identifier.encode(), buf, buf_size) if res < 0: raise errors.JLi...
[ "def firmware_version(self):\n return self._get_system_status()[\"firmware\"]", "def hardware_version(self):\n version = self._dll.JLINKARM_GetHardwareVersion()\n major = version / 10000 % 100\n minor = version / 100 % 100\n return '%d.%02d' % (major, minor)", "def firmware_versio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether the JLink's firmware version is newer than the one that the DLL is compatible with.
def firmware_newer(self): if self.firmware_outdated(): return False return self.firmware_version != self.compatible_firmware_version
[ "def is_old_firmware():\n # Read firmware version from runt.\n fw_version = get_runt(PROP_FW_VERSION)\n\n # Compare firmware year and month with old versions.\n year = int(fw_version.split(\".\")[0])\n month = int(fw_version.split(\".\")[1])\n if year < OLD_FW_YEAR:\n return True\n if ye...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves and returns the hardware status.
def hardware_status(self): stat = structs.JLinkHardwareStatus() res = self._dll.JLINKARM_GetHWStatus(ctypes.byref(stat)) if res == 1: raise errors.JLinkException('Error in reading hardware status.') return stat
[ "def hardware_status(self):\n return self._hardware_status", "def get_status(self):\n return self.o.read_register(self.dev_id, STATUS)", "def hardware_error_status(self):\n return self._read(MX_HARDWARE_ERROR_STATUS)", "def _check_status(self):\n self.system_status_lock.acquire()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hardware version of the connected JLink as a major.minor string.
def hardware_version(self): version = self._dll.JLINKARM_GetHardwareVersion() major = version / 10000 % 100 minor = version / 100 % 100 return '%d.%02d' % (major, minor)
[ "def operatingsystem_version_minor(self):\n # type: () -> string_types\n return self._operatingsystem_version_minor", "def minor_version(self) -> str:\n return pulumi.get(self, \"minor_version\")", "def browser_version_minor(self):\n # type: () -> string_types\n return self._b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a bitwise combination of the emulator's capabilities.
def capabilities(self): return self._dll.JLINKARM_GetEmuCaps()
[ "def extended_capabilities(self):\n buf = (ctypes.c_uint8 * 32)()\n self._dll.JLINKARM_GetEmuCapsEx(buf, 32)\n return list(buf)", "def capabilities(self):\n return []", "def capabilities(self):\n\n class Capabilities(ct.Structure):\n _fields_ = [(\"Size\", ct.c_ulon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the capabilities of the connected emulator as a list.
def extended_capabilities(self): buf = (ctypes.c_uint8 * 32)() self._dll.JLINKARM_GetEmuCapsEx(buf, 32) return list(buf)
[ "def get_capabilities(self) -> List[str]:\n return list(self._get_controller().capabilities)", "def capabilities(self):\n return []", "def capabilities(self):\n return self._dll.JLINKARM_GetEmuCaps()", "def list_caps():\n global _CAPABILITIES_MAP\n\n try:\n return tuple(sorte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the emulator has the given extended capability.
def extended_capability(self, capability): res = self._dll.JLINKARM_EMU_HasCapEx(capability) return (res == 1)
[ "def has_capability(self, capability):\n return False", "def is_capable(cls, requested_capability):\r\n for c in requested_capability:\r\n if not c in cls.capability:\r\n return False\r\n return True", "def extended_capabilities(self):\n buf = (ctypes.c_uint...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the product name of the connected JLink.
def product_name(self): buf = (ctypes.c_char * self.MAX_BUF_SIZE)() self._dll.JLINKARM_EMU_GetProductName(buf, self.MAX_BUF_SIZE) return ctypes.string_at(buf).decode()
[ "def product_name(self):\n return self._product_name", "def get_product_name(self):\n return self.name", "def getProduct_Name(self):\r\n return self.__Product_Name", "def getProductName():\n return options.product_name", "def getName(self):\n return _libsbml.GeneProduct_getNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the serial number of the connected JLink.
def serial_number(self): return self._dll.JLINKARM_GetSN()
[ "def serial_num(self):\n return self._serial_num", "def serial_number(self) -> int:\n return pulumi.get(self, \"serial_number\")", "def get_serialno(self):\n return self.run_cmd('get-serialno')", "def serial_number(self):\n self.myiter.next()\n return ffi.string(self.myiter....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves and returns the OEM string of the connected JLink.
def oem(self): buf = (ctypes.c_char * self.MAX_BUF_SIZE)() res = self._dll.JLINKARM_GetOEMString(ctypes.byref(buf)) if res != 0: raise errors.JLinkException('Failed to grab OEM string.') oem = ctypes.string_at(buf).decode() if len(oem) == 0: # In the case...
[ "def oem(self):\n return self._oem", "def connection(entity) -> str:\n return entity.__connection__", "def getOdtLink(self):\n return self.base.get(\"application/vnd.oasis.opendocument.text\", [])", "def lom_hostname(self) -> str:\n return self.__lom_hostname", "def om(self):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the speed of the JTAG communication with the ARM core. If no arguments are present, automatically detects speed. If a ``speed`` is provided, the speed must be no larger than ``JLink.MAX_JTAG_SPEED`` and no smaller than ``JLink.MIN_JTAG_SPEED``. The given ``speed`` can also not be ``JLink.INVALID_JTAG_SPEED``.
def set_speed(self, speed=None, auto=False, adaptive=False): if speed is None: speed = 0 elif not util.is_natural(speed): raise TypeError('Expected positive number for speed, given %s.' % speed) elif speed > self.MAX_JTAG_SPEED: raise ValueError('Given speed e...
[ "def set_speed(self, speed):\n # create the MAV_CMD_DO_CHANGE_SPEED command\n msg = self.message_factory.command_long_encode(0, 0,mavutil.mavlink.MAV_CMD_DO_CHANGE_SPEED,0,0,speed,0, 0, 0, 0, 0)\n\n # send command to vehicle\n self.send_mavlink(msg)\n self.flush()", "def set_spe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets JTAG communication speed to the maximum supported speed.
def set_max_speed(self): self._dll.JLINKARM_SetMaxSpeed() return None
[ "def max_speed(self, value):\n self.__max_speed = value", "def use_max_speed(self):\n command = _build_robovac_command(RobovacModes.SET_SPEED, RobovacCommands.FAST_SPEED)\n message = self._build_command_user_data_message(command)\n\n self._send_packet(message, False)", "def init_max_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string of the builtin licenses the JLink has.
def licenses(self): buf_size = self.MAX_BUF_SIZE buf = (ctypes.c_char * buf_size)() res = self._dll.JLINK_GetAvailableLicense(buf, buf_size) if res < 0: raise errors.JLinkException(res) return ctypes.string_at(buf).decode()
[ "def custom_licenses(self):\n buf = (ctypes.c_char * self.MAX_BUF_SIZE)()\n result = self._dll.JLINK_EMU_GetLicenses(buf, self.MAX_BUF_SIZE)\n if result < 0:\n raise errors.JLinkException(result)\n return ctypes.string_at(buf).decode()", "def licenses(self) -> Sequence[str]:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string of the installed licenses the JLink has.
def custom_licenses(self): buf = (ctypes.c_char * self.MAX_BUF_SIZE)() result = self._dll.JLINK_EMU_GetLicenses(buf, self.MAX_BUF_SIZE) if result < 0: raise errors.JLinkException(result) return ctypes.string_at(buf).decode()
[ "def licenses(self):\n buf_size = self.MAX_BUF_SIZE\n buf = (ctypes.c_char * buf_size)()\n res = self._dll.JLINK_GetAvailableLicense(buf, buf_size)\n if res < 0:\n raise errors.JLinkException(res)\n return ctypes.string_at(buf).decode()", "def licenses(self) -> Sequen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given ``contents`` as a new custom license to the JLink.
def add_license(self, contents): buf_size = len(contents) buf = (ctypes.c_char * (buf_size + 1))(*contents.encode()) res = self._dll.JLINK_EMU_AddLicense(buf) if res == -1: raise errors.JLinkException('Unspecified error.') elif res == -2: raise errors.JL...
[ "def write_license(content):\n with open(\"LICENSE\", \"w\") as f:\n print(\"Creating the LICENSE file...\")\n f.write(content)", "def write_license_mit(content, full_name, email):\n year = date.today().year\n content = content.replace(\"[year]\", str(year)).replace(\n \"[fullname]\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Erases the custom licenses from the connected JLink.
def erase_licenses(self): res = self._dll.JLINK_EMU_EraseLicenses() return (res == 0)
[ "def licensecleanup(): # 3\n res = _msk.Env.licensecleanup()\n if res != 0:\n raise Error(rescode(res),\"\")", "def licensecleanup():\n res = __library__.MSK_XX_licensecleanup()\n if res != 0:\n raise Error(rescode(res),Env.getcodedesc(rescode(res))[1])", "def fusion_api_remove_all_l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a bitmask of the supported target interfaces.
def supported_tifs(self): buf = ctypes.c_uint32() self._dll.JLINKARM_TIF_GetAvailable(ctypes.byref(buf)) return buf.value
[ "def get_cpu_mask(self):\n if self.__dev_is_bond_iface():\n return self.__gen_cpumask_bonding_iface()\n elif self.__dev_is_hw_iface(self.__args.nic):\n return self.__gen_cpumask_one_hw_iface(self.__args.nic)\n else:\n sys.exit(\"Not supported virtual device {}\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the properties of the usercontrollable GPIOs. Provided the device supports usercontrollable GPIOs, they will be returned by this method.
def gpio_properties(self): res = self._dll.JLINK_EMU_GPIO_GetProps(0, 0) if res < 0: raise errors.JLinkException(res) num_props = res buf = (structs.JLinkGPIODescriptor * num_props)() res = self._dll.JLINK_EMU_GPIO_GetProps(ctypes.byref(buf), num_props) if re...
[ "def gpio_pins(self):\n with self._lock:\n return self._get_gpio_mask()", "def get_cgpio_state(self):\r\n return self._arm.get_cgpio_state()", "def getRPIVersionGPIO(self):\r\n gpio1 = ((0,0,0,0),\r\n (1,1,0,0),\r\n (4,2,0,0),\r\n (17,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of states for the given pins. Defaults to the first four pins if an argument is not given.
def gpio_get(self, pins=None): if pins is None: pins = range(4) size = len(pins) indices = (ctypes.c_uint8 * size)(*pins) statuses = (ctypes.c_uint8 * size)() result = self._dll.JLINK_EMU_GPIO_GetState(ctypes.byref(indices), ...
[ "def gpio_set(self, pins, states):\n if len(pins) != len(states):\n raise ValueError('Length mismatch between pins and states.')\n\n size = len(pins)\n indices = (ctypes.c_uint8 * size)(*pins)\n states = (ctypes.c_uint8 * size)(*states)\n result_states = (ctypes.c_uint8...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the state for one or more usercontrollable GPIOs. For each of the given pins, sets the the corresponding state based on the index.
def gpio_set(self, pins, states): if len(pins) != len(states): raise ValueError('Length mismatch between pins and states.') size = len(pins) indices = (ctypes.c_uint8 * size)(*pins) states = (ctypes.c_uint8 * size)(*states) result_states = (ctypes.c_uint8 * size)() ...
[ "def set_control_pins(self, *pin_values):\n for pin, pin_value in zip(self.pins, pin_values):\n pin.write_digital(pin_value)", "def set_in_pins(pins):\n for pin in pins:\n GPIO.setup(pin, GPIO.IN, GPIO.PUD_DOWN)\n\tGPIO.setup(LEDPIN, GPIO.OUT)\n\tGPIO.output(LEDPIN, GPIO.LOW)", "def...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the connected emulator supports ``comm_`` functions.
def comm_supported(self): return bool(self._dll.JLINKARM_EMU_COM_IsSupported())
[ "def platform_supported(self):\n return platform.system().lower() in self.platforms if self.platforms else False", "def is_implemented(self, strcommand):\n result = ct.c_bool()\n command = ct.c_wchar_p(strcommand)\n self.lib.AT_IsImplemented(self.AT_H, command, ct.addressof(result))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turns on the power supply over pin 19 of the JTAG connector. If given the optional ``default`` parameter, activates the power supply by default.
def power_on(self, default=False): if default: return self.exec_command('SupplyPowerDefault = 1') return self.exec_command('SupplyPower = 1')
[ "def set_power(self, power: bool):\r\n if not self.backlight:\r\n return\r\n\r\n self.backlight.power = power", "def power_off(self, default=False):\n if default:\n return self.exec_command('SupplyPowerDefault = 0')\n return self.exec_command('SupplyPower = 0')", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turns off the power supply over pin 19 of the JTAG connector. If given the optional ``default`` parameter, deactivates the power supply by default.
def power_off(self, default=False): if default: return self.exec_command('SupplyPowerDefault = 0') return self.exec_command('SupplyPower = 0')
[ "def power_on(self, default=False):\n if default:\n return self.exec_command('SupplyPowerDefault = 1')\n return self.exec_command('SupplyPower = 1')", "def turn_off(self, **kwargs):\n self.smartplug.turn_off()", "def power_off(self, port):\n port = int(port)\n self._validat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unlocks the device connected to the JLink. Unlocking a device allows for access to read/writing memory, as well as flash programming.
def unlock(self): if not unlockers.unlock(self, self._device.manufacturer): raise errors.JLinkException('Failed to unlock device.') return True
[ "def unlock(self, **kwargs) -> None:\n # Hack until PyISY is updated\n req_url = self._conn.compileURL(['nodes', self.unique_id, 'cmd',\n 'SECMD', '0'])\n response = self._conn.request(req_url)\n\n if response is None:\n _LOGGER.error('U...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the JLink has support for a CPU capability. This method checks if the emulator has builtin intelligence to handle the given CPU capability for the target CPU it is connected to.
def cpu_capability(self, capability): res = self._dll.JLINKARM_EMU_HasCPUCap(capability) return (res == 1)
[ "def check_cpu_usage():\n usage = psutil.cpu_percent(1)\n return usage < 73", "def hardware_accel_check():\n with settings(warn_only=True):\n output = run(\"egrep -c '(vmx|svm)' /proc/cpuinfo\") \n\n if int(output) < 1:\n print blue(\"Compute node does not support Hardware acceler...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the source to be used for tracing. The ``source`` must be one of the ones provided by ``enums.JLinkTraceSource``.
def set_trace_source(self, source): self._dll.JLINKARM_SelectTraceSource(source) return None
[ "def SetSource(self, source):\r\n self._default_params['source'] = source", "def set_source(self, source_name):\n self.source = source_name", "def set_source(self, source):\n self.data['source'] = source", "def set_flow_source(self, source):\n self._source = source", "def set_sou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the trace source to ETB.
def set_etb_trace(self): return self.set_trace_source(enums.JLinkTraceSource.ETB)
[ "def set_trace_source(self, source):\n self._dll.JLINKARM_SelectTraceSource(source)\n return None", "def set_etm_trace(self):\n return self.set_trace_source(enums.JLinkTraceSource.ETM)", "def set_source(self, source):\r\n Analyzer.set_source(self, source)\r\n\r\n # Phy-layer l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the trace source to ETM.
def set_etm_trace(self): return self.set_trace_source(enums.JLinkTraceSource.ETM)
[ "def set_trace_source(self, source):\n self._dll.JLINKARM_SelectTraceSource(source)\n return None", "def set_etb_trace(self):\n return self.set_trace_source(enums.JLinkTraceSource.ETB)", "def set_source(self, source):\n Analyzer.set_source(self, source)\n\n # Phy-layer logs\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the reset strategy for the target. The reset strategy defines what happens when the target is reset.
def set_reset_strategy(self, strategy): return self._dll.JLINKARM_SetResetType(strategy)
[ "def reset(self, reset):\n\n self._reset = reset", "def reset_target(self):\n if self.reset_pin is not None:\n self.logger.handle(\"Attempting to reset the target..\", self.logger.INFO)\n if self.advanced_options[\"reset_pol\"][\"Value\"].upper() == \"LOW\":\n se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the reset pin high.
def set_reset_pin_high(self): self._dll.JLINKARM_SetRESET() return None
[ "def set_high(self):\n if self._mode == self.INPUT:\n raise GPIOError('Failed to write pin %d high. Pin %d is an input.'\n % (self._pin, self._pin))\n self._write(HIGH)", "def set_high(pin):\n _write_value(HIGH, \"{0}/gpio{1}/value\".format(_path_prefix, pin)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the TCK pin to the high value (1).
def set_tck_pin_high(self): res = self._dll.JLINKARM_SetTCK() if res < 0: raise errors.JLinkException('Feature not supported.') return None
[ "def set_tck_pin_low(self):\n res = self._dll.JLINKARM_ClrTCK()\n if res < 0:\n raise errors.JLinkException('Feature not supported.')\n return None", "def set_high(self):\n if self._mode == self.INPUT:\n raise GPIOError('Failed to write pin %d high. Pin %d is an i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the TCK pin to the low value (0).
def set_tck_pin_low(self): res = self._dll.JLINKARM_ClrTCK() if res < 0: raise errors.JLinkException('Feature not supported.') return None
[ "def set_tck_pin_high(self):\n res = self._dll.JLINKARM_SetTCK()\n if res < 0:\n raise errors.JLinkException('Feature not supported.')\n return None", "def set_low(self):\n if self._mode == self.INPUT:\n raise GPIOError('Failed to write pin %d low. Pin %d is an in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the TRST pin to high (``1``). Deasserts the TRST pin.
def set_trst_pin_high(self): self._dll.JLINKARM_SetTRST()
[ "def set_trst_pin_low(self):\n self._dll.JLINKARM_ClrTRST()", "def set_tck_pin_high(self):\n res = self._dll.JLINKARM_SetTCK()\n if res < 0:\n raise errors.JLinkException('Feature not supported.')\n return None", "def toggle_pin(self, pin=TIOCM_DTR, time=1000):\n\n\t\tlogg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the TRST pin to low (``0``). This asserts the TRST pin.
def set_trst_pin_low(self): self._dll.JLINKARM_ClrTRST()
[ "def set_trst_pin_high(self):\n self._dll.JLINKARM_SetTRST()", "def set_low(self):\n if self._mode == self.INPUT:\n raise GPIOError('Failed to write pin %d low. Pin %d is an input.'\n % (self._pin, self._pin))\n self._write(LOW)", "def set_low(pin):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flashes the target device. The given ``on_progress`` callback will be called as ``on_progress(action, progress_string, percentage)`` periodically as the data is written to flash. The action is one of ``Compare``, ``Erase``, ``Verify``, ``Flash``.
def flash_file(self, path, addr, on_progress=None, power_on=False): if on_progress is not None: # Set the function to be called on flash programming progress. func = enums.JLinkFunctions.FLASH_PROGRESS_PROTOTYPE(on_progress) self._dll.JLINK_SetFlashProgProgressCallback(func) ...
[ "def flash(self, partition, timeout_ms=None, info_cb=DEFAULT_MESSAGE_CALLBACK):\n return self._simple_command(\n 'flash', arg=partition, info_cb=info_cb, timeout_ms=timeout_ms)", "def flash(self, flash_mode, serial_port):\n os.chdir(espqdir)\n # Flash the right software.\n if self.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the TAP controller via TRST.
def reset_tap(self): self._dll.JLINKARM_ResetTRST()
[ "def resetSimulator():\n\tif settings._telnet == True:\n\t\toutput('Resetting simulator...')\n\t\tsettings.obj = []\n\t\tsendData('RESET', read=True, flush=True)\n\t\t\n\t\ttry:\n\t\t\tsettings._tn.close()\n\t\texcept:\n\t\t\tpass\n\t\t\n\t\tsettings._tn = None\n\t\tsettings._telnet = False\n\t\ttime.sleep(5)\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the identifier of the target ARM core.
def core_id(self): return self._dll.JLINKARM_GetId()
[ "def core_name(self):\n buf_size = self.MAX_BUF_SIZE\n buf = (ctypes.c_char * buf_size)()\n self._dll.JLINKARM_Core2CoreName(self.core_cpu(), buf, buf_size)\n return ctypes.string_at(buf).decode()", "def _get_coreid(self):\n return self.__coreid", "def core_cpu(self):\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the identifier of the core CPU.
def core_cpu(self): return self._dll.JLINKARM_CORE_GetFound()
[ "def cpu_number(self) -> str:\n return pulumi.get(self, \"cpu_number\")", "def CPU(self):\n return self._core.runtime.cpu", "def cpu(self):\n return self.ABI_CPU_MAP[self.abi()]", "def cpu(self) -> int:\n return pulumi.get(self, \"cpu\")", "def get_cpu_number():\n try:\n ou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the target ARM core.
def core_name(self): buf_size = self.MAX_BUF_SIZE buf = (ctypes.c_char * buf_size)() self._dll.JLINKARM_Core2CoreName(self.core_cpu(), buf, buf_size) return ctypes.string_at(buf).decode()
[ "def core_cpu(self):\n return self._dll.JLINKARM_CORE_GetFound()", "def core_id(self):\n return self._dll.JLINKARM_GetId()", "def core_device_thing_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"core_device_thing_name\")", "def primary_core(self) -> CoreTarget:\n prim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the device family of the target CPU.
def device_family(self): return self._dll.JLINKARM_GetDeviceFamily()
[ "def get_device_family(self, strict = False):\r\n\t\tc = self.get_device_category(self.category_device_family, strict)\r\n\t\tif c == None:\r\n\t\t\treturn None\r\n\t\treturn c.get_value()", "def read_device_family(self):\n family = ctypes.c_int()\n\n result = self._lib.NRFJPROG_read_device_family(c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of the indices for the CPU registers. The returned indices can be used to read the register content or grab the register name.
def register_list(self): num_items = self.MAX_NUM_CPU_REGISTERS buf = (ctypes.c_uint32 * num_items)() num_regs = self._dll.JLINKARM_GetRegisterList(buf, num_items) return buf[:num_regs]
[ "def read_all_registers(self):\n return self.REGISTERS", "def GetRegisterList():\n return ida_idp.ph_get_regnames()", "def get_registers_list(self):\n enabled_id_list = self.init_sensor_discovery()\n enabled_registers = []\n\n for param_id in enabled_id_list:\n param_regist...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrives and returns the name of an ARM CPU register.
def register_name(self, register_index): result = self._dll.JLINKARM_GetRegisterName(register_index) return ctypes.cast(result, ctypes.c_char_p).value.decode()
[ "def read_cpu_register(self, register_name):\n if not self._is_enum(register_name, CpuRegister):\n raise ValueError('Parameter register_name must be of type int, str or CpuRegister enumeration.')\n\n register_name = self._decode_enum(register_name, CpuRegister)\n if register_name is ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the CPU speed of the target. If the target does not support CPU frequency detection, this function will return ``0``.
def cpu_speed(self, silent=False): res = self._dll.JLINKARM_MeasureCPUSpeedEx(-1, 1, int(silent)) if res < 0: raise errors.JLinkException(res) return res
[ "def get_cpu_speed(self):\n\t\treturn call_sdk_function('PrlSrvCfg_GetCpuSpeed', self.handle)", "def cpu(self) -> int:\n return pulumi.get(self, \"cpu\")", "def CPU(self):\n return self._core.runtime.cpu", "def get_speed(self):\n speed = 0\n if self.is_psu_fan:\n psu_fan_pat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrives the reasons that the CPU was halted.
def cpu_halt_reasons(self): buf_size = self.MAX_NUM_MOES buf = (structs.JLinkMOEInfo * buf_size)() num_reasons = self._dll.JLINKARM_GetMOEs(buf, buf_size) if num_reasons < 0: raise errors.JLinkException(num_reasons) return list(buf)[:num_reasons]
[ "def suspension_reasons(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"suspension_reasons\")", "def get_reboot_cause(self):\n hx_cause = 0\n if self.get_cpld1_wdt_rst() == 1:\n reboot_cause = self.REBOOT_CAUSE_WATCHDOG\n description = \"CPLD Watchdog ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a JTAG clock on TCK.
def jtag_create_clock(self): return self._dll.JLINKARM_Clock()
[ "def __init__(self, clock=proctime):\n self._clock = clock", "def create_visual_clock(self):\n # add the clock\n self.add_decoration(\"clock\")\n deco = self.decorations[0].get_sprite()\n self.decorations[0].set_sprite(pygame.transform.scale(deco, (deco.get_width() // 2, deco.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads bytes from code memory.
def code_memory_read(self, addr, num_bytes): buf_size = num_bytes buf = (ctypes.c_uint8 * buf_size)() res = self._dll.JLINKARM_ReadCodeMem(addr, buf_size, buf) if res < 0: raise errors.JLinkException(res) return list(buf)[:res]
[ "def read_bytes(self) -> bytes:\n t = self.pc\n while self.data[self.pc] != 0:\n self.pc += 1\n result = self.data[t:self.pc]\n self.pc += 1 # jump '\\0'\n return result", "def memory_read(self, addr: str) -> Byte:\n print(f\"memory read {addr}\")\n _pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of memory zones supported by the target.
def num_memory_zones(self): count = self._dll.JLINK_GetMemZones(0, 0) if count < 0: raise errors.JLinkException(count) return count
[ "def get_number_of_zones(self):\n return len(self.coordinate3d_combined)", "def memory_size(self):\n\n return ipset.ipmap_memory_size(self.map)", "def get_allocated_memory_units(self, runner) -> int:", "def memory_size(self):\n\n return ipset.ipset_memory_size(self.set)", "def allocatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all memory zones supported by the current target. Some targets support multiple memory zones. This function provides the ability to get a list of all the memory zones to facilate using the memory zone routing functions.
def memory_zones(self): count = self.num_memory_zones() if count == 0: return list() buf = (structs.JLinkMemoryZone * count)() res = self._dll.JLINK_GetMemZones(buf, count) if res < 0: raise errors.JLinkException(res) return list(buf)
[ "def get_all_zones():\n global _all_zones\n if not _all_zones:\n _all_zones = [\n item['name']\n for item in _compute_agent.list_resource(ExecutionContext(), 'zones')]\n return _all_zones", "def get_all_zones():\n cf = CloudFlare.CloudFlare(raw=True)\n page_number = 0\n total_pages = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads memory from a target system or specific memory zone. The optional ``zone`` specifies a memory zone to access to read from, e.g. ``IDATA``, ``DDATA``, or ``CODE``. The given number of bits, if provided, must be either ``8``, ``16``, or ``32``. If not provided, always reads ``num_units`` bytes.
def memory_read(self, addr, num_units, zone=None, nbits=None): buf_size = num_units buf = None access = 0 if nbits is None: buf = (ctypes.c_uint8 * buf_size)() access = 0 elif nbits == 8: buf = (ctypes.c_uint8 * buf_size)() access ...
[ "def memory_read32(self, addr, num_words, zone=None):\n return self.memory_read(addr, num_words, zone=zone, nbits=32)", "def readZone(self, run, cycle, zone):\n zid = self._getZoneOffset(zone)\n index = self._readFileIndex(run, zid['part'])\n meta = self._readMetaData(zid['part'])\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads memory from the target system in units of 16bits.
def memory_read16(self, addr, num_halfwords, zone=None): return self.memory_read(addr, num_halfwords, zone=zone, nbits=16)
[ "def readmem16(self, address):\n return self._readmem(address, 'mem16')", "def read_u16(self) -> int:\n ...", "def read_16bit(self, address: int) -> int:\n if self.lib is None:\n raise PEMicroException(\"Library is not loaded\")\n mem_result = c_ulong()\n value = se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads memory from the target system in units of 32bits.
def memory_read32(self, addr, num_words, zone=None): return self.memory_read(addr, num_words, zone=zone, nbits=32)
[ "def readmem32(self, address):\n return self._readmem(address, 'mem32')", "def memory_read64(self, addr, num_long_words):\n buf_size = num_long_words\n buf = (ctypes.c_ulonglong * buf_size)()\n units_read = self._dll.JLINKARM_ReadMemU64(addr, buf_size, buf, 0)\n if units_read < ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads memory from the target system in units of 64bits.
def memory_read64(self, addr, num_long_words): buf_size = num_long_words buf = (ctypes.c_ulonglong * buf_size)() units_read = self._dll.JLINKARM_ReadMemU64(addr, buf_size, buf, 0) if units_read < 0: raise errors.JLinkException(units_read) return buf[:units_read]
[ "def read64(self):\n\t\tresult = ctypes.c_ulonglong()\n\t\tif not core.BNRead64(self.handle, result):\n\t\t\treturn None\n\t\treturn result.value", "def read_memory(self, address, size):\n return self.read(0, address, size, mem_device=True)", "def getMemory(self) -> ghidra.program.model.mem.Memory:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes memory to a target system or specific memory zone. The optional ``zone`` specifies a memory zone to access to write to, e.g. ``IDATA``, ``DDATA``, or ``CODE``. The given number of bits, if provided, must be either ``8``, ``16``, or ``32``.
def memory_write(self, addr, data, zone=None, nbits=None): buf_size = len(data) buf = None access = 0 if nbits is None: # Pack the given data into an array of 8-bit unsigned integers in # order to write it successfully packed_data = map(lambda d: reve...
[ "def write_memory(self, address, wordsize, value, num_words=1, raw=False):\n pass", "def _write_byte_to_mem_array(self, value, mem, aligned, offset):\n offset *= 8 # Convert to bits\n mask = 0xFF << offset # Mask for input value\n mask_ = 0xFFFFFFFF ^ mask # Mask f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes long words to memory of a target system.
def memory_write64(self, addr, data, zone=None): words = [] bitmask = 0xFFFFFFFF for long_word in data: words.append(long_word & bitmask) # Last 32-bits words.append((long_word >> 32) & bitmask) # First 32-bits return self.memory_write32(addr, words, zon...
[ "def write_memory(self, address, wordsize, value, num_words=1, raw=False):\n pass", "def write_long(self, n):\n self.f.write(pack('Q', n))", "def write_long(self, value):\n\n value = self._pad(value, 8)\n self.fp.write(value)", "def writeLong(self, val):\n self._writePrimitive(c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes into an ARM register.
def register_write(self, reg_index, value): # TODO: rename 'reg_index' to 'register' if isinstance(reg_index, six.string_types): reg_index = self._get_register_index_from_name(reg_index) res = self._dll.JLINKARM_WriteReg(reg_index, value) if res != 0: raise errors...
[ "def write_register(self, register, value):\n pass", "def do_write_reg(self, arg):\n self._print_func_result(self.phil.write_reg, arg)", "def writeRegister(self, addr, value):\n self.registers[addr] = value", "def write_register(self, register, value):\n read = self.sendget_command...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes to multiple CPU registers. Writes the values to the given registers in order. There must be a onetoone correspondence between the values and the registers specified.
def register_write_multiple(self, register_indices, values): # TODO: rename 'register_indices' to 'registers' register_indices = register_indices[:] if len(register_indices) != len(values): raise ValueError('Must be an equal number of registers and values') num_regs = len(re...
[ "def write_multiple_holding_registers(self, addr, regs):\r\n return self._arm.write_multiple_holding_registers(addr, regs)", "def i2c_write_to_all_sensors(pi, i2c_multiplexer_handle, i2c_sensor_handle, channel_numbers, reg, data):\n for channel_number in channel_numbers:\n i2c_multiplexer_select_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a value from an ARM ICE register.
def ice_register_read(self, register_index): return self._dll.JLINKARM_ReadICEReg(register_index)
[ "def read(self, register): #good\r\n\t\tcurrentVal = self.i2c.readU8(register)\r\n\t\treturn currentVal", "def read_register(self, register):\n resp = self.sendget_command(\"regread %s\" % register)\n try:\n st = resp.find('0x')\n r = resp[st:st+10]\n r = int(r,16)\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a value to an ARM ICE register.
def ice_register_write(self, register_index, value, delay=False): self._dll.JLINKARM_WriteICEReg(register_index, int(value), int(delay)) return None
[ "def write_register(self, register, value):\n pass", "def write_register(self, register, value):\n register &= 0x7F # Write, bit 7 low.\n with self._spi as spi:\n spi.write(bytes([register, value & 0xFF]))", "def _write_register(self, value):\n try:\n self._hub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns if the CPU core supports ETM.
def etm_supported(self): res = self._dll.JLINKARM_ETM_IsPresent() if (res == 1): return True # JLINKARM_ETM_IsPresent() only works on ARM 7/9 devices. This # fallback checks if ETM is present by checking the Cortex ROM table # for debugging information for ETM. ...
[ "def has_emeter(self):\n features = self.sys_info['feature'].split(':')\n return SmartDevice.FEATURE_ENERGY_METER in features", "def is_eht_on(self):\n raise NotImplementedError", "def is_vtd_supported(self):\n\t\treturn bool(call_sdk_function('PrlSrvCfg_IsVtdSupported', self.handle))", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a value from an ETM register.
def etm_register_read(self, register_index): return self._dll.JLINKARM_ETM_ReadReg(register_index)
[ "def read(self, register): #good\r\n\t\tcurrentVal = self.i2c.readU8(register)\r\n\t\treturn currentVal", "def read_value(self, address):\n\t\treturn self.memory[address]", "def read_register(self, register):\n resp = self.sendget_command(\"regread %s\" % register)\n try:\n st = resp.fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a value to an ETM register.
def etm_register_write(self, register_index, value, delay=False): self._dll.JLINKARM_ETM_WriteReg(int(register_index), int(value), int(delay)) return None
[ "def write_register(self, register, value):\n pass", "def writeRegister(self, addr, value):\n self.registers[addr] = value", "def write_value(self, value):\n raise NotImplementedError", "def write_value(self, address, value):\n\t\tself.memory[address] = value", "def write(value):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads an Ap/DP register on a CoreSight DAP. Wait responses and special handling are both handled by this method.
def coresight_read(self, reg, ap=True): data = ctypes.c_uint32() ap = 1 if ap else 0 res = self._dll.JLINKARM_CORESIGHT_ReadAPDPReg(reg, ap, ctypes.byref(data)) if res < 0: raise errors.JLinkException(res) return data.value
[ "def axilite_read(sim, addr, basename=\"s_axi_control_\"):\n _write_signal(sim, basename + \"ARADDR\", addr)\n _write_signal(sim, basename + \"ARVALID\", 1)\n wait_for_handshake(sim, \"AR\", basename=basename)\n # read request OK\n _write_signal(sim, basename + \"ARVALID\", 0)\n # wait for read re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes an Ap/DP register on a CoreSight DAP.
def coresight_write(self, reg, data, ap=True): ap = 1 if ap else 0 res = self._dll.JLINKARM_CORESIGHT_WriteAPDPReg(reg, ap, data) if res < 0: raise errors.JLinkException(res) return res
[ "def write_access_port_register(self, ap_index, addr, data):\n if not self._is_u8(ap_index):\n raise ValueError('The ap_index parameter must be an unsigned 8-bit value.')\n\n if not self._is_u8(addr):\n raise ValueError('The addr parameter must be an unsigned 8-bit value.')\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables RESET pin toggling on the JTAG bus on resets. When ``.reset()`` is called, it will not toggle the RESET pin on the JTAG bus.
def disable_reset_pulls_reset(self): self._dll.JLINKARM_ResetPullsRESET(0) return None
[ "def reset(self):\n if self._reset is not None:\n self._reset.value = False\n time.sleep(0.001)\n self._reset.value = True\n time.sleep(0.001)\n else:\n raise RuntimeError(\"No reset pin defined\")", "def reset(self):\n self._i2c.send(6, 0x00...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables TRST pin toggling on the JTAG bus on resets. When ``.reset()`` is called, it will also toggle the TRST pin on the JTAG bus.
def enable_reset_pulls_trst(self): self._dll.JLINKARM_ResetPullsTRST(1) return None
[ "def set_trst_pin_high(self):\n self._dll.JLINKARM_SetTRST()", "def set_trst_pin_low(self):\n self._dll.JLINKARM_ClrTRST()", "def disable_reset_pulls_trst(self):\n self._dll.JLINKARM_ResetPullsTRST(0)\n return None", "def turnStirrerOn(self):\n self.gpio.output(self.stirrerP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables TRST pin toggling on the JTAG bus on resets. When ``.reset()`` is called, it will not toggle the TRST pin on the JTAG bus.
def disable_reset_pulls_trst(self): self._dll.JLINKARM_ResetPullsTRST(0) return None
[ "def enable_reset_pulls_trst(self):\n self._dll.JLINKARM_ResetPullsTRST(1)\n return None", "def hard_reset(self, reset_pin):\n # tDRESET, tRESET, figure 7 in datasheet\n if reset_pin is not None:\n reset_pin.value(0)\n utime.sleep_ms(1) #\n reset_pin.v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables CPU register initialization on resets. When ``.reset()`` is called, it will initialize the CPU registers.
def enable_reset_inits_registers(self): return bool(self._dll.JLINKARM_SetInitRegsOnReset(1))
[ "def reset():\n for cpu_id in POSSIBLE_CPUS:\n set_cpu(cpu_id, True)", "def disable_reset_inits_registers(self):\n return bool(self._dll.JLINKARM_SetInitRegsOnReset(0))", "def device_setup(self): # type: () -> None\n # Reset the core\n self.core.reset()", "def _global_reset(sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables CPU register initialization on resets. When ``.reset()`` is called, the CPU registers will be read and not initialized.
def disable_reset_inits_registers(self): return bool(self._dll.JLINKARM_SetInitRegsOnReset(0))
[ "def reset():\n for cpu_id in POSSIBLE_CPUS:\n set_cpu(cpu_id, True)", "def _global_reset(self):\n self.reg.set(types.IXGBE_CTRL, types.IXGBE_CTRL_RST_MASK)\n self.reg.wait_clear(types.IXGBE_CTRL, types.IXGBE_CTRL_RST_MASK)\n time.sleep(0.01)", "def reset(self):\n\t\tfor i in rang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the target hardware to little endian.
def set_little_endian(self): res = self._dll.JLINKARM_SetEndian(0) return (res == 1)
[ "def set_big_endian(self):\n res = self._dll.JLINKARM_SetEndian(1)\n return (res == 0)", "def perform_get_default_endianness(self):\n\t\treturn core.LittleEndian", "def write32le(self, value):\n\t\tvalue = struct.pack(\"<I\", value)\n\t\treturn self.write(value)", "def perform_get_default_endian...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the target hardware to big endian.
def set_big_endian(self): res = self._dll.JLINKARM_SetEndian(1) return (res == 0)
[ "def set_byte_order(self, byteorder='little'):\n self._byteorder = byteorder", "def _setTwoBytes(self, value, low_reg, high_reg):\n val = value.to_bytes(2, 'little')\n self._write(val[0], low_reg)\n self._write(val[1], high_reg)", "def i2b_bigendian(number, num_bytes = 0):\n\n # Encoding and ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets vector catch bits of the processor. The CPU will jump to a vector if the given vector catch is active, and will enter a debug state. This has the effect of halting the CPU as well, meaning the CPU must be explicitly restarted.
def set_vector_catch(self, flags): res = self._dll.JLINKARM_WriteVectorCatch(flags) if res < 0: raise errors.JLinkException(res) return None
[ "def set(self, incoming_vector):\n self.vector = incoming_vector", "def set_state_vector(self,svec):\n self.state_vector = svec", "def setv(self, node, vector):\n\n self.daq.setVector(f'/{self.device_id}/{node}', vector)", "def test_set_st_to_vx(self, cpu):\n cpu.V_register = bytea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of currently active breakpoints.
def num_active_breakpoints(self): return self._dll.JLINKARM_GetNumBPs()
[ "def num_active_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPs()", "def number_of_launches(self):\n return self._number_of_launches", "def number_of_active_runners(self):\n return self._number_of_active_runners", "def memory_breakpoints(self):\n return self._pctx.breakpoi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of available breakpoints of the specified type. If ``arm`` is set, gets the number of available ARM breakpoint units. If ``thumb`` is set, gets the number of available THUMB breakpoint units. If ``ram`` is set, gets the number of available software RAM breakpoint units. If ``flash`` is set, gets the ...
def num_available_breakpoints(self, arm=False, thumb=False, ram=False, flash=False, hw=False): flags = [ enums.JLinkBreakpoint.ARM, enums.JLinkBreakpoint.THUMB, enums.JLinkBreakpoint.SW_RAM, enums.JLinkBreakpoint.SW_FLASH, enums.JLinkBreakpoint.HW ...
[ "def num_active_breakpoints(self):\n return self._dll.JLINKARM_GetNumBPs()", "def num_available_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPUnits()", "def num_supported_devices(self):\n return int(self._dll.JLINKARM_DEVICE_GetInfo(-1, 0))", "def num_active_watchpoints(self):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the handle of a breakpoint at the given address, if any.
def breakpoint_find(self, addr): return self._dll.JLINKARM_FindBP(addr)
[ "def find_breakpoint(view):\r\n rg = view.find(bp_regex, 0)\r\n return rg.end() if rg else None", "def test_simple_hardware_breakpoint_name_addr(self):\n TEST_CASE = self\n data = [0]\n class TSTBP(windows.debug.HXBreakpoint):\n def trigger(self, dbg, exc):\n a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set.
def breakpoint_set(self, addr, thumb=False, arm=False): flags = enums.JLinkBreakpoint.ANY if thumb: flags = flags | enums.JLinkBreakpoint.THUMB elif arm: flags = flags | enums.JLinkBreakpoint.ARM handle = self._dll.JLINKARM_SetBPEx(int(addr), flags) if h...
[ "def hardware_breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.HW\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a software breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set. If ``flash`` is ``True``, the breakpoint is set in flash, otherwise if ``ram`` is ``True``, the breakpo...
def software_breakpoint_set(self, addr, thumb=False, arm=False, flash=False, ram=False): if flash and not ram: flags = enums.JLinkBreakpoint.SW_FLASH elif not flash and ram: flags = enums.JLinkBreakpoint.SW_RAM else: flags = enums.JLinkBreakpoint.SW i...
[ "def hardware_breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.HW\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a hardware breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set.
def hardware_breakpoint_set(self, addr, thumb=False, arm=False): flags = enums.JLinkBreakpoint.HW if thumb: flags = flags | enums.JLinkBreakpoint.THUMB elif arm: flags = flags | enums.JLinkBreakpoint.ARM handle = self._dll.JLINKARM_SetBPEx(int(addr), flags) ...
[ "def breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.ANY\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr), flags)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of currently active watchpoints.
def num_active_watchpoints(self): return self._dll.JLINKARM_GetNumWPs()
[ "def num_available_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPUnits()", "def number_of_active_runners(self):\n return self._number_of_active_runners", "def _poll_active_players(self):\n active_players = 0\n for player in self.players_list:\n if player.active:\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of available watchpoints.
def num_available_watchpoints(self): return self._dll.JLINKARM_GetNumWPUnits()
[ "def num_active_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPs()", "def get_count():\n _check_init()\n return _pypm.CountDevices()", "def get_n_available(self) -> int:\n return self.n_available", "def watchlist_items_count(self) -> Optional[int]:\n return pulumi.get(self, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns information about the specified watchpoint.
def watchpoint_info(self, handle=0, index=-1): if index < 0 and handle == 0: raise ValueError('Handle must be provided if index is not set.') wp = structs.JLinkWatchpointInfo() res = self._dll.JLINKARM_GetWPInfoEx(index, ctypes.byref(wp)) if res < 0: raise errors...
[ "def description_of_watch(cls, watch):\r\n raise NotImplementedError", "def describe_current_location(self):\n print(self.curr_location.description)", "def get_time_info(self):\n\n raise NotImplementedError", "def get_public_timer_details(id):\n\twith postgres, postgres.cursor(cursor_factory=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a watchpoint at the given address. This method allows for a watchpoint to be set on an given address or range of addresses. The watchpoint can then be triggered if the data at the given address matches the specified ``data`` or range of data as determined by ``data_mask``, on specific access size events, reads, wr...
def watchpoint_set(self, addr, addr_mask=0x0, data=0x0, data_mask=0x0, access_size=None, read=False, write=False, privileged=False): ...
[ "def set_data(self, addr, value):\n\t\tif addr < 0:\n\t\t\tprint(\"FAIL - negative address\")\n\t\tif addr >= len(self.data):\n\t\t\tself.regs[ addr ] = value\n\t\telse:\n\t\t\tself.data[ addr ] = value", "def set(self, addr, value):\n\n if len(addr) == 4:\n ipset.ipmap_ipv4_set(self.map, addr, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the watchpoint with the specified handle.
def watchpoint_clear(self, handle): return not self._dll.JLINKARM_ClrDataEvent(handle)
[ "def RemoveWatch(self, handle):\n result = self.watch_manager.rm_watch(handle)\n\n return result[handle]", "def strace_clear(self, handle):\n data = ctypes.c_int(handle)\n res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data))\n if res < 0:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configures the trace port width for tracing. Note that configuration cannot occur while STRACE is running.
def strace_configure(self, port_width): if port_width not in [1, 2, 4]: raise ValueError('Invalid port width: %s' % str(port_width)) config_string = 'PortWidth=%d' % port_width res = self._dll.JLINK_STRACE_Config(config_string.encode()) if res < 0: raise errors.J...
[ "def overwriteMaxTraceLength(self,maxNrOfPoints=-1,maxLength=-1): \n \n if (maxNrOfPoints and maxNrOfPoints>0):\n self.TRACE_N_MAX = maxNrOfPoints\n \n if (maxLength and maxLength>0):\n self.TRACE_LENGTH_MAX = maxLength", "def set_width(self, valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops the sampling of STRACE data. Any capturing of STRACE data is automatically stopped when the CPU is halted.
def strace_stop(self): res = self._dll.JLINK_STRACE_Stop() if res < 0: raise errors.JLinkException('Failed to stop STRACE.') return None
[ "def stop_recording(self):\n ret = 0\n if self.trace_name is not None:\n logging.debug('Stopping ETW trace')\n command = ['xperf', '-stop', self.trace_name]\n ret = subprocess.call(command, shell=True)\n return ret", "def stopSampling(self):\n self.veri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads and returns a number of instructions captured by STRACE. The number of instructions must be a nonnegative value of at most ``0x10000`` (``65536``).
def strace_read(self, num_instructions): if num_instructions < 0 or num_instructions > 0x10000: raise ValueError('Invalid instruction count.') buf = (ctypes.c_uint32 * num_instructions)() buf_size = num_instructions res = self._dll.JLINK_STRACE_Read(ctypes.byref(buf), buf_si...
[ "def _get_n_opcodes_length(self, address, count):\n length = 0\n t = self._vdb.getTrace()\n arch = self._vdb.arch.getArchId()\n for i in xrange(count):\n op = t.parseOpcode(address + length, arch=arch)\n length += op.size\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets an event to trigger trace logic when data access is made. Data access corresponds to either a read or write.
def strace_data_access_event(self, operation, address, data, data_mask=None, access_width=4, address_range=0): cmd...
[ "def trace_data(self, trace_data):\n\n self._trace_data = trace_data", "def on_trace_change(self, _name, _index, _mode):\n pass", "def writeEvent(self):\n\t\ttry:\n\t\t\tif self.dataFileHnd:\n\t\t\t\tself.dataFileHnd.writeRecord( (self.mdList())+[self.eventData] )\n\t\texcept sqlite3.OperationalEr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the trace event specified by the given handle.
def strace_clear(self, handle): data = ctypes.c_int(handle) res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data)) if res < 0: raise errors.JLinkException('Failed to clear STRACE event.') return None
[ "async def cancel_listen_log(self, handle: str) -> None:\n self.logger.debug(\"Canceling listen_log for %s\", self.name)\n await self.AD.logging.cancel_log_callback(self.name, handle)", "def clear (self, save_to_filename=None):\n wrapped (win32evtlog.ClearEventLog, self._handle, unicode (save_to_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears all STRACE events.
def strace_clear_all(self): data = 0 res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR_ALL, data) if res < 0: raise errors.JLinkException('Failed to clear all STRACE events.') return None
[ "def clear_trace() -> None:\n _func_traces.clear()", "def strace_clear(self, handle):\n data = ctypes.c_int(handle)\n res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data))\n if res < 0:\n raise errors.JLinkException('Failed to clear S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the STRACE buffer size.
def strace_set_buffer_size(self, size): size = ctypes.c_uint32(size) res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.SET_BUFFER_SIZE, size) if res < 0: raise errors.JLinkException('Failed to set the STRACE buffer size.') return None
[ "def trace_set_buffer_capacity(self, size):\n cmd = enums.JLinkTraceCommand.SET_CAPACITY\n data = ctypes.c_uint32(size)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to set trace buffer size.')\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flushes the trace buffer. After this method is called, the trace buffer is empty. This method is best called when the device is reset.
def trace_flush(self): cmd = enums.JLinkTraceCommand.FLUSH res = self._dll.JLINKARM_TRACE_Control(cmd, 0) if (res == 1): raise errors.JLinkException('Failed to flush the trace buffer.') return None
[ "def flush(self):\n self.buffer = []", "def flushRawBuffer(self):\n with self.rawBufferLock:\n self.rawBuffer = ''", "def flush_tx_buffer(self):\n pass", "def _flush(self):\n self._ftdi.write_data(self._immediate)\n self._ftdi.purge_buffers()", "def flush(self):...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the number of samples in the trace buffer.
def trace_sample_count(self): cmd = enums.JLinkTraceCommand.GET_NUM_SAMPLES data = ctypes.c_uint32(self.trace_max_buffer_capacity()) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace sample count.')...
[ "def GetNumberOfSamples(self):\n ...", "def _number_of_samples(self):\n return len(self._raw_data.samples)", "def getSampleCount(self): # real signature unknown; restored from __doc__\n pass", "def sample_count(self):\n if self._sample_count:\n return self._sample_count\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the trace buffer's current capacity.
def trace_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_CONF_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace buffer size.') return data.value
[ "def trace_min_buffer_capacity(self):\n cmd = enums.JLinkTraceCommand.GET_MIN_CAPACITY\n data = ctypes.c_uint32(0)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to get min trace buffer size.')\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the capacity for the trace buffer.
def trace_set_buffer_capacity(self, size): cmd = enums.JLinkTraceCommand.SET_CAPACITY data = ctypes.c_uint32(size) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to set trace buffer size.') return Non...
[ "def capacity(self, capacity):\n\n self._capacity = capacity", "def capacity(self, capacity: SmartNvmeSize):\n\n self._capacity = capacity", "def set_capacity(self, cap):\n return self.get_interaction().set_capacity(cap)", "def _extend_buf(self):\n self.buf_size += min(self.buf_size, s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the minimum capacity the trace buffer can be configured with.
def trace_min_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_MIN_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get min trace buffer size.') return data...
[ "def trace_buffer_capacity(self):\n cmd = enums.JLinkTraceCommand.GET_CONF_CAPACITY\n data = ctypes.c_uint32(0)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to get trace buffer size.')\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the maximum size the trace buffer can be configured with.
def trace_max_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_MAX_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get max trace buffer size.') return data...
[ "def get_max_history_size():\n try:\n size = os.environ[MAX_HISTORY_SIZE_ENVAR]\n except KeyError:\n size = DEFAULT_HISTORY_SIZE\n\n return int(size)", "def GetMaximumSize(self):\n ...", "def get_max_size(self):\n return self._maxsize", "def _buffer_size(self):\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the format for the trace buffer to use.
def trace_set_format(self, fmt): cmd = enums.JLinkTraceCommand.SET_FORMAT data = ctypes.c_uint32(fmt) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to set trace format.') return None
[ "def traceformat(self, traceformat) :\n\t\ttry :\n\t\t\tself._traceformat = traceformat\n\t\texcept Exception as e:\n\t\t\traise e", "def set_format(cls, fmt):\n TAPTestResult.FORMAT = fmt", "def setFormat(self, formatName):\n pass", "def format(self, format):\n\n self._format = format", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the current format the trace buffer is using.
def trace_format(self): cmd = enums.JLinkTraceCommand.GET_FORMAT data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace format.') return data.value
[ "def traceformat(self) :\n\t\ttry :\n\t\t\treturn self._traceformat\n\t\texcept Exception as e:\n\t\t\traise e", "def getFormat(self):\n pass", "def default_format(self):\n return next(itervalues(self.formats))", "def _get_format_code(self):\n return self._format_code", "def getLogForma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a count of the number of available trace regions.
def trace_region_count(self): cmd = enums.JLinkTraceCommand.GET_NUM_REGIONS data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace region count.') return data.value
[ "def tracecount(self):\n return self._tracecount", "def getNumberOfTraces(self) -> int:\n\n if not self.debug:\n self.myFieldFox.write(\"CALC:PAR:COUN?\")\n ret = self.myFieldFox.read()\n else:\n ret = 4\n return ret", "def count(self, trace):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the properties of a trace region.
def trace_region(self, region_index): cmd = enums.JLinkTraceCommand.GET_REGION_PROPS_EX region = structs.JLinkTraceRegion() region.RegionIndex = int(region_index) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(region)) if (res == 1): raise errors.JLinkExcept...
[ "def get_region_attributes(self):\n try:\n return self.ah_obj.get_nested_attribute_values(self.get_databag_attrs_fromcache(\"global_config_data\", \"atlas_yaml_databag\"), \"regions\")[1]\n except Exception as exp_object:\n exc_type, exc_obj, exc_tb = sys.exc_info()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads data from the trace buffer and returns it.
def trace_read(self, offset, num_items): buf_size = ctypes.c_uint32(num_items) buf = (structs.JLinkTraceData * num_items)() res = self._dll.JLINKARM_TRACE_Read(buf, int(offset), ctypes.byref(buf_size)) if (res == 1): raise errors.JLinkException('Failed to read from trace buff...
[ "def read(self):\n return self._buf", "def _get_data(self, read_size):\n return self._character_device.read(read_size)", "def get_data(self, ptr, unbuffered=False):\n return _decode(self.get_raw_data(ptr, unbuffered),\n reading_format[self.data_format])", "def read(s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }