Skip to main content

PHiLIP PAL (PHiLIP Protocol Abstraction Layer)

Description

A set of python modules that abstract away and standardize shell based command for bare metal memory map access. PHiLIP PAL is used to interface to a memory map specified from a csv or by the device. It handles the parsing of offsets, sizes, etc. of the device.

To use this interface a memory must be provided, by default the package contains the PHiLIP memory map for all the versions. If a development version of PHiLIP is used and a memory map has not been released, the memory map can be scanned from the device.

PHiLIP PAL provides a philip_shell which developers can use for manual tests and interacting with PHiLIP. For automated scripts, a Phil() class is provided.

For the API check the docstring of philip_shell.py or philip_if.py

PHiLIP PAL Installation

To interface to PHiLIP first install the philip_pal for python3.

sudo pip3 install philip_pal

Running PHiLIP PAL Shell

First connected PHiLIP to the computer so a serial port connection is available.

This script handles interfacing to the PHiLIP device. It parses data and exposes from the PhilipExtIf class to be run in a shell.

The pip installation installs a script that can be run with philip_shell

The purpose of this script is allow easy setup and manual usage of PHiLIP.

Usage

usage: philip_shell.py  [-h]
                        [--loglevel {debug,info,warning,error,fatal,critical}]
                        [--port PORT]
                        [--filter-data]

optional arguments:
  -h, --help            show this help message and exit
  --loglevel {debug,info,warning,error,fatal,critical}
                        Python logger log level (default: warning)
  --port, -p
                        Specify the serial port
  --data_only, -do
                        Filters data from philip responses to only display
                        what is needed (default: False)

Upon starting the shell use the help command to see what functionality is available.

See the main page for more getting started and examples.

Running PHiLIP PAL from CLI

Besides the full PHiLIP PAL Shell there is also CLI mode for simple one-shot access to PHiLIP interface functions. It allows to reset the PHiLIP MCU and the connected DUT.

After connecting PHiLIP simply run python3 -m philip_pal --help to get the following full usage description:

usage: python3 -m philip_pal [-h] [--verbose] [--dut_reset] [--reset] [port]

positional arguments:
  port         PHiLIP serial port

optional arguments:
  -h, --help   show this help message and exit
  --verbose    Enable more output
  --dut_reset  Reset device-under-test (DUT)
  --reset      Reset PHiLIP MCU

To get output use --verbose, otherwise commands will silently be executed.

Release files for philip-pal 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for philip-pal 1.3.0
File Size Uploaded
philip_pal-1.3.0.tar.gz 41.9 kB Details

Release files / philip_pal-1.3.0.tar.gz

Download URL philip_pal-1.3.0.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7caba0f9b63863416229dd983b58a3953d6698ec4a4ffea51350f6dc6a33f69
BLAKE2b-256 checksum
How to use checksums
9a340bd72aceeeeec79796d2de13414fa6b724a90a96787eb50b17ed22efa0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/62.1.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file

1.2.0

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page