Included Connectors
pykiso comes with some ready to use implementations of different connectors.
collection of ready to use connectors
- module
connectors
Flashers
JLink Flasher
- module
flash_jlink
- synopsis
a Flasher adapter of the pylink-square library
- class pykiso.lib.connectors.flash_jlink.JLinkFlasher(binary=None, lib=None, serial_number=None, chip_name='STM32L562QE', speed=9600, verbose=False, power_on=False, start_addr=0, xml_path=None, **kwargs)[source]
A Flasher adapter of the pylink-square library.
Constructor.
- Parameters
binary (
Union
[str
,Path
,None
]) – path to the binary firmware filelib (
Union
[str
,Path
,None
]) – path to the location of the JLink.so/JLink.DLL, usually automatically determinedserial_number (
Optional
[int
]) – optional debugger’s S/N (required if many connected) (see pylink-square documentation)chip_name (
str
) – see pylink-square documentationspeed (
int
) – see pylink-square documentationverbose (
bool
) – see pylink-square documentationpower_on (
bool
) – see pylink-square documentationstart_addr (
int
) – see pylink-square documentationxml_path (
Optional
[str
]) – device configuration (see pylink-square documentation)
Lauterbach Flasher
- module
flash_lauterbach
- synopsis
used to flash through lauterbach probe.
- class pykiso.lib.connectors.flash_lauterbach.LauterbachFlasher(t32_exc_path=None, t32_config=None, t32_script_path=None, t32_api_path=None, port=None, node='localhost', packlen='1024', device=1, **kwargs)[source]
Connector used to flash through one and only one Lauterbach probe using Trace32 as remote API.
Initialize attributes with configuration data.
- Parameters
t32_exc_path (
Optional
[str
]) – full path of Trace32 app to executet32_config (
Optional
[str
]) – full path of Trace32 configuration filet32_script_path (
Optional
[str
]) – full path to .cmm flash script to executet32_api_path (
Optional
[str
]) – full path of remote apiport (
Optional
[str
]) – port number used for UDP communicationnode (
str
) – node name (default localhost)packlen (
str
) – data pack length for UDP communication (default 1024)device (
int
) – configure device number given by Trace32 (default 1)
- flash()[source]
Flash software using configured .cmm script.
- The Flash command leads to the following sub-tasks execution :
Send to Trace32 CD.DO internal command (execute script)
Wait until script is finished
Get script execution verdict
- Raises
Exception – if Trace32 error occurred during flash.
- Return type
None
CChannels
Virtual Communication Channel for tests
- module
cc_example
Loopback CChannel
- module
cc_raw_loopback
- synopsis
Loopback CChannel for testing purposes.
Communication Channel Via Uart
- module
cc_uart
- synopsis
Uart communication channel
Communication Channel Via Udp
- module
cc_udp
- synopsis
Udp communication channel
Communication Channel via UDP server
- module
cc_udp_server
- synopsis
basic UDP server
Warning
if multiple clients are connected to this server, ensure that each client receives all necessary responses before receiving messages again. Otherwise the responses may be sent to the wrong client
Communication Channel Via Usb
- module
cc_usb
- synopsis
Usb communication channel
Communication Channel Via lauterbach
- module
cc_fdx_lauterbach
- synopsis
CChannel implementation for lauterbach(FDX)
- class pykiso.lib.connectors.cc_fdx_lauterbach.CCFdxLauterbach(t32_exc_path=None, t32_config=None, t32_main_script_path=None, t32_reset_script_path=None, t32_fdx_clr_buf_script_path=None, t32_in_test_reset_script_path=None, t32_api_path=None, port=None, node='localhost', packlen='1024', device=1, **kwargs)[source]
Lauterbach connector using the FDX protocol.
Constructor: initialize attributes with configuration data.
- Parameters
t32_exc_path (
Optional
[str
]) – full path of Trace32 app to executet32_config (
Optional
[str
]) – full path of Trace32 configuration filet32_main_script_path (
Optional
[str
]) – full path to the main cmm script to executet32_reset_script_path (
Optional
[str
]) – full path to the reset cmm script to executet32_fdx_clr_buf_script_path (
Optional
[str
]) – full path to the FDX reset cmm script to executet32_in_test_reset_script_path (
Optional
[str
]) – full path to the board reset cmm script to executet32_api_path (
Optional
[str
]) – full path of remote apiport (
Optional
[str
]) – port number used for UDP communicationnode (
str
) – node name (default localhost)packlen (
str
) – data pack length for UDP communication (default 1024)device (
int
) – configure device number given by Trace32 (default 1)
Communication Channel Via segger j-link
- module
cc_rtt_segger
- synopsis
channel used to enable RTT communication using Segger J-Link debugger. Additionally, RTT logs can be captured by setting the rtt_log_path parameter on the specified channel.
- class pykiso.lib.connectors.cc_rtt_segger.CCRttSegger(serial_number=None, chip_name='STM32L562QE', speed=4000, block_address=537131008, verbose=False, tx_buffer_idx=3, rx_buffer_idx=0, rtt_log_path=None, rtt_log_buffer_idx=0, connection_timeout=5, **kwargs)[source]
Channel using RTT to communicate through Segger J-Link debugger.
Initialize attributes.
- Parameters
serial_number (
Optional
[int
]) – optional segger debugger serial number (required if many connected)chip_name (
str
) – microcontoller name (STM….)speed (
int
) – communication speed in Hzblock_address (
int
) – start address to start RTT communicationtx_buffer_idx (
int
) – buffer index used for transmissionrx_buffer_idx (
int
) – buffer index used for receptionverbose (
bool
) – boolean indicating if J-Link connection should be verbose in loggingrtt_log_path (
Optional
[str
]) – path to the folder where the RTT log file should be storedrtt_log_buffer_idx (
int
) – buffer index used for RTT loggingconnection_timeout (
int
) – available time (in seconds) to open the connection
Proxy Channel
- module
cc_proxy
- synopsis
CChannel implementation for multi-auxiliary usage.
CCProxy channel was created, in order to enable the connection of multiple auxiliaries on one and only one CChannel. This CChannel has to be used with a so called proxy auxiliary.
Communication Channel using VISA protocol
- module
cc_visa
- synopsis
VISA communication channel to communicate to instruments using SCPI protocol.
- class pykiso.lib.connectors.cc_visa.VISAChannel(**kwargs)[source]
VISA Interface for devices communicating with SCPI
Initialize channel settings.
- class pykiso.lib.connectors.cc_visa.VISASerial(serial_port, baud_rate=9600, **kwargs)[source]
Connector used to communicate with an instrument via Serial.
Initialize channel attributes.
- Parameters
serial_port (
int
) – COM port to use to connect to the instrumentbaud_rate – baud rate used to communicate with the instrument
Communication Channel via socket
- module
cc_socket
- synopsis
connector for communication via socket
- class pykiso.lib.connectors.cc_tcp_ip.CCTcpip(dest_ip, dest_port, max_msg_size=256, **kwargs)[source]
Connector channel used to communicate via socket
Initialize channel settings.
- Parameters
dest_ip (
str
) – destination ip addressdest_port (
int
) – destination portmax_msg_size (
int
) – the maximum amount of data to be received at once