All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- @diggit: Fixed typo in exception name raised when
JLINKARM_SelectUSBfails. - @lweyrich1: Fixed Windows init test to be independent of runner bitness.
- Python 2 is no longer supported.
- @concatime: File paths are now encoded using
os.fsencode()to support UTF-8 file paths.
- @hkpeprah: Added JTAG APIs:
jtag_store_instruction- To send an instruction to the JTAG device.jtag_store_data- To send data to the JTAG device (TDO).jtag_get_device_info- To get information about a JTAG device on the scan chain.jtag_read/jtag_read{8,16,32}- To read data from a JTAG device (from the input buffer / TDI).jtag_sync_bits/jtag_sync_bytes- To force a flush of the output buffer.
- @hkpeprah: CPU is not un-conditionally halted when trying to flash the target.
- @mtnpke: Detailed log handler logs now strip extra trailing whitespace.
- @hkpeprah: Fixed a bug where
.flash()raised aJLinkEraseException, now raises aJLinkFlashException()as expected. - @omrisarig13: Fixed broken links in
README.md.
- @tianxiaoMCU: Added APIs to write to the peripheral register of the connected
target:
peripheral_write8()peripheral_write16()peripheral_write32()peripheral_write64()
- @karl-rainlabs: Fixed incorrect decorator around JTAG APIs. Previously, the APIs required a connection, but now can be used prior to connection.
- @bbrown1867: Temporary library copying is now determined dynamically based on the version of the SDK in use. Previously, the default behaviour would always copy the library, which would fail if custom devices and functions were in use via XML files in the same directory as the SDK.
- @hkpeprah: Added Power Trace APIs.
- @gtowers-dukosi: Added API method
set_script_file()to specify a Script File to be loaded.
- @FletcherD: Fixed a bug in
load_library()on Linux where a 32-bit library was being incorrectly loaded on ARM64-based Linux machines.
- @frogamic: Unit tests are now compatible with Python 3.12.
- @cpattenden-sq: Fixed bug in
flash()where return value was being checked against avoidfunction; would lead to exceptions being raised unexpectedly.
- @chanqueo: Added
use_tmpcpyfield to constructor forJLinkandLibraryinstances to workaround temporary files not been cleaned up; a future patch will change the default behaviour based on the version of the SDK. By default, temporary files are used for the SDK binary.
- @curtishx: Changed decorator on
set_reset_strategy()from@connection_requiredto@open_required.
- @avi-jois: Removed dependency on
future.
- @boraozgen: Fixed installation error that prevented
setup.py installwhensixwas not installed. - @denravonska: Changed
.flash()to no longer erase chip on flash; users will now need to ensure they call.erase()prior to flashing a non-erased region of flash.
- @hkpeprah: Add
teststo source distribution.
- @dottspina: Revert
JLINK_SDK_NAMEchange.
- @hkpeprah: Added
teststo the publishedsdist.
- @dottspina: Changed behaviour of
load_library()on Linux-based platforms to resolve sonames; fixes an issue wherefind_library()would fail, and the underlying platform-specific methods would not return the path to the soname file.
- @hkpeprah: Added
teststosdistdistribution. - @hkpeprah: Made
pylink-swvavailable in package.
- @hkpeprah: Fixed issue where device connect would happen twice as reported by @chanqueo in ISSUE-113.
- @hkpeprah: Renamed
swv -> pylink-swv.
- @kylemanna: Fixed error where
argparsewould fail on Python3 when no arguments were passed to the CLI. - @hkpeprah: Publish both
sdistandbdist_wheel. - @mhummels: Switch pin functions from
connection_required() -> open_required()to support being called without connection to target.
- @johannesneyer: Add RTT example as command-line script 'pylink-rtt'.
- @jsiverskog: Updated default logging code to pass
errors='repalce'when decoding the string from the library; fixesUnicodeErrors causing an exit.
- @kettenbach-it: Changed
disable_dialog_boxes()to disable flash info windows when called (programming pop-ups). Updatedenable_dialog_boxes()to show flash info windows when called.
- @sauci: Added method,
set_log_file, to set logging file for logs; redirects logs from STDOUT / STDERR to log file.
- @Gargy007: Changed decorator for toggling the reset pin,
set_reset_pin_highandset_reset_pin_lowtoopen_required()instead ofconnection_required()to allow toggling the reset pin when the debugger is attached, but the target isn't connected.
- @RisinT96: Changed behaviour for getting the target device during
connect()to useget_device_index()instead of iterating manually through each supported device; reduces speed ofconnect()from several seconds to sub one second.
- @Gargy007: Changed decorator on coresight methods to new method
coresight_configuration_required()instead ofconnection_required()to enable use of CoreSight methods without requiring a connection.
- @cy18: Reduced memory / CPU usage of
rtt_read()by slicing buffer before converting to list in return value ofrtt_read(). - @twam: Changed maximum JTAG speed from 12MHz to 50MHz.
- @thetic: Fixed issue where
tempfile.tempdircould beNonewhen creating a path for the library copy; switched to usingtempfile.gettempdir()which populates the cached variable if unset.
- @Moral-ecomo: Fixed issue where unsecure hook was unbounded due to not being bound to the class instance.
- @hkpeprah: Added 'rtt_get_buf_descriptor()', and 'rtt_get_status()' with associated structures for describing an RTT buffer, and the status of an RTT control block.
- @hkpeprah: Changed 'rtt_start()' to take optional block address to specify where RTT block starts.
- @rjshade: Changed
.open()and.close()to operate using a reference count; DLL is now only closed if open reference count is zero.
- @sauci: Added CP15 API:
cp15_present,cp15_register_read, andcp15_register_write.
- @charliebruce: Fix for 'VTarget' in hardware status; incorrectly assigned to 32-bit instead of 16-bit integer.
- @charliebruce: Fix for documentation for 'VTarget' in hardware status; incorrectly displayed mA instead of mV.
- @sauci: Changed register methods ('register_read()', 'register_read_multiple()', 'register_write()', and 'register_write_multiple()') to alternatively take regsiter names instead of just register indices.
- @bojanpotocnik: Implemented context manager to enable automatic debugger connection opening when context is entered, and connection closed when exited.
- @bojanpotocnik: Implemented finalizer method '_finalize()' to tear down connection on destructor.
- @michalfita: Fixed handling for DLL in 64-bit Python instances: on 64-bit Windows platforms running 64-bit Python, the 32-bit DLL was always being loaded; now the 64-bit DLL will be loaded instead.
- @wallacbe: Removed
sleepafterconnect; no-op issued to make sure the target is ready for debugging.
- @ford:
asyncdecorator renamed toasync_decoratorto support new linting rules in Python3.
- @ford: Added missing
sixrequirement tosetup.pyandrequirements.txt. - @Sauci: Added
open_tunnel()method to connect to a J-Link over the remote server.
- @charlesnicholson: flash commands no longer default to powering on the target.
- @MarekNovakNXP: Fixed casting of
swd_read32to properly handle reading 32-bit register when MSB is set. - @sstallion: Fixed casting of
swd_read8, andswd_read16to properly handle reading 32-bit register when MSB is set.
- @charlesnicholson: fixed non-deterministic crash on Linux when unloading DLL.
- @eldonrivers: added support for 'nxp' name for kinetis/freescale chips
- @charlesnicholson: Added support for for RTT.
rtt_stoprtt_readrtt_writertt_get_num_up_buffersrtt_get_num_down_buffersrtt_control
- Cleaned up documentation.
- Linted code.
- Fixed
os.path.isfiletypo.
- When loading the SEGGER lib on Linux,
os.walkis used to descend recursively through the directory tree.
- API Functions
set_trace_sourceset_etb_traceset_etm_trace
- ETM
etm_supportedetm_register_readetm_register_write
- Simple Trace API
strace_configurestrace_startstrace_stopstrace_readstrace_code_fetch_eventstrace_data_access_eventstrace_data_load_eventstrace_data_store_eventstrace_clearstrace_clear_allstrace_set_buffer_size- Example application for simple trace API under
examples/strace.py.
- Trace API
trace_starttrace_stoptrace_flushtrace_sample_counttrace_buffer_sizetrace_set_buffer_sizetrace_min_buffer_sizetrace_max_buffer_sizetrace_set_formattrace_formattrace_region_counttrace_regiontrace_read
- Serial number no longer required command-line argument for command-line tool; if not specified, selects the first emulator.
- Fixed bug in Linux library load where 32-bit DLL was loaded on 64-bit platform.
- Support added for writing to flash outside of flashing firmware:
flash_writeflash_write8flash_write16flash_write32
- Added
unlockmethod for unlocking a device connected to a J-Link instance.
- Fixed logic for determine if J-Link is halted; SDK documentation implies that
return value for
JLINKARM_IsHalted()is<= 1, but example on Page 144 suggests otherwise;.halted()changed to reflect examples suggestion. - Fixed logic in
.exec_command(). Since the J-Link SDK does not conform to the standard of returning zero only in cases of error,JLINKARM_ExecCommandmay succeed, but still return a non-zero value. Checking the error string is the best way to handle this, and the return value should be ignored. - Fixed logic in handling the return value of
JLINKARM_Connect(),JLINKARM_Connect()can return with a positive value which still indicates success.
open()withserial_no=Noneandip_addr=Nonewill connect to the first USB device. This permits operation without having to define serial numbers for workflows using one emulator.
reset()withhalt=Falsewould previously cause a mass erase of the device as it usedJLINKARM_ResetNoHalt(); now usesJLINKARM_Reset()followed by a call toJLINKARM_Go(), and does not trigger a mass erase if the device is secure.
sync_firmware
- Added a minimum version decorator to wrap functions that require at least a certain version of the J-Link software in order to be used.
- Removed 'open_required()' for 'exec_command()', 'disable_dialog_boxes()', and 'enable_dialog_boxes()'.
- Added a sample script for automated updates on Windows platforms.
- General API Functions (88%):
openedconnectedtarget_connectednum_connected_emulatorsconnected_emulatorsnum_supported_devicessupported_devicesopencloseexec_commandconnecterrorclear_errorcompile_dateversionhardware_infohardware_statushardware_versionfirmware_versioncapabilitiesextended_capabilitiesextended_capabilityfeaturesproduct_nameserial_numberoemindexspeedset_speedset_max_speedspeed_infotifsupported_tifsset_tifgpio_propertiesgpio_getgpio_setcomm_supportedcpu_capabilitypower_onpower_offset_reset_strategyset_reset_pin_highset_reset_pin_lowset_tck_pin_highset_tck_pin_lowset_tdi_pin_highset_tdi_pin_lowset_tms_pin_highset_tms_pin_lowset_trst_pin_highset_trst_pin_loweraseflashflash_fileresetreset_taprestarthalthaltedcore_idcore_cpucore_nameir_lenscan_lenscan_chain_lendevice_familycpu_speedcpu_halt_reasonsenable_reset_pulls_resetdisable_reset_pulls_resetenable_reset_pulls_trstdisable_reset_pulls_trstenable_reset_inits_registersdisable_reset_inits_registersset_little_endianset_big_endianset_vector_catchstepenable_soft_breakpointsdisable_soft_breakpointsnum_active_breakpointsnum_available_breakpointsbreakpoint_infobreakpoint_findbreakpoint_setsoftware_breakpoint_sethardware_breakpoint_setbreakpoint_clearbreakpoint_clear_allnum_active_watchpointsnum_available_watchpointswatchpoint_infowatchpoint_setwatchpoint_clearwatchpoint_clear_all
- Automation Utilities:
enable_dialog_boxesdisable_dialog_boxes
- JTAG API Functions:
jtag_configurejtag_create_clockjtag_flushjtag_send
- License API:
licensescustom_licenseadd_licenseerase_licenses
- Firmware API:
invalidate_firmwareupdate_firmwarefirmware_newerfirmware_outdated
- Logging Handlers:
log_handlerdetailed_log_handlererror_handlerwarning_handler
- Coresight API:
coresight_configurecoresight_readcoresight_write
- SWD API:
swd_read8swd_read16swd_read32swd_writeswd_write8swd_write16swd_write32swd_sync
- SWO API:
swo_startswo_stopswo_enabledswo_enableswo_disableswo_flushswo_speed_infoswo_num_bytesswo_set_host_buffer_sizeswo_set_emu_buffer_sizeswo_supported_speedsswo_readswo_read_stimulus
- Memory API Functions:
memory_readmemory_writememory_read8memory_write8memory_read16memory_write16memory_read32memory_write32memory_read64memory_write64num_memory_zonesmemory_zonescode_memory_read
- Register API Functions:
register_readregister_writeregister_read_multipleregister_write_multipleregister_listregister_name
- ICE Register API Functions:
ice_register_readice_register_write
- Added PyLink command-line tool:
- Flash command added.
- Unlock command added.
- License command added.
- Erase command added.
- Added support for accessing the multiple J-Links from the same process.
- Added device lockfiles to prevent multiple accesses to the same J-Link when a thread is already accessing that J-Link.
- Example "Serial Wire Viewer (SWV)" added.
- Example "Core Information Query (CIQ)" added.
- Example "Target Endianness (TE)" added.