Skip to main content
https://img.shields.io/pypi/v/pysamloader.svg?logo=pypi https://img.shields.io/pypi/pyversions/pysamloader.svg?logo=pypi https://img.shields.io/travis/ebs-universe/pysamloader.svg?logo=travis https://img.shields.io/coveralls/github/ebs-universe/pysamloader.svg?logo=coveralls https://img.shields.io/requires/github/ebs-universe/pysamloader.svg https://img.shields.io/pypi/l/pysamloader.svg

Introduction

pysamloader is a python library for writing flash on Atmel’s ARM chips via SAM-BA. Originally written years ago when Atmel’s standard tools were unavailable or unusable on Linux, it has been adapted to serve narrower but specific use cases.

Specifically, pysamloader is intended to be :

  • Simple, particularly for an end-user

  • Easily installable across platforms

  • Usable from within larger python applications or scripts

Currently, pysamloader seems to be reasonably stable on a tiny set of supported devices.

If you happen to use pysamloader, or wish to use it, let me know along with any feedback you might have to ensure the tool is stable, reliable, and sufficiently versatile. Device support is easy enough to add, and I will do so as the need (and more importantly, the ability to test on other devices) presents itself. Pull requests are also welcome.

See the pysamloader/devices folder for included device support modules. Currently supported devices are :

clearpage tableofcontents clearpage

Features

pysamloader currently supports the following actions :

  • Write device flash

  • Optionally verify flash after writing

  • Optionally set the GPNVM bits to boot from flash after writing

  • Read and parse ChipID

  • Read Unique Identifier from Embedded Flash

  • Read Flash Descriptor

Requirements & Installation

pysamloader should work on any platform which supports python. It is best tested on Linux followed by on Windows (10 and 7).

pysamloader supports both Python 2 (2.7.x) and Python 3 (>3.5). Python 2 support is likely to be removed in the near future.

In general, pysamloader is expected to be pip-installed. It can be safely installed into a virtualenv. As long as you have a functioning python installation of sufficient version, installing pysamloader would be simply :

$ pip install pysamloader

If you require pre-built binaries, they are available for 64-bit Linux and Windows. However, be aware that these binaries are not thoroughly tested, and your mileage may vary based on your specific operating system and machine architecture. You will also have to manually copy the included devices folder to the correct location. (See below)

If you wish to develop, modify the sources, or otherwise get the latest version, it can be installed from a clone of the git repository (or from a source package) as follows :

$ git clone https://github.com/chintal/pysamloader.git
$ cd pysamloader
$ pip install -e .

The pysamloader/devices folder contains the included device support modules, each of which is a python file with a single class of the same name, containing device specific information about one device. This folder can be copied into a separate location where you can safely add, remove, or modify device configuration as needed. This step is generally optional, but will be required if you are using the binary packages. The location is that provided by user_config_dir of the python appdirs package, specifically :

  • Linux : ~/.config/pysamloader

  • Windows : C:\Users\<username>\AppData\Roaming\Quazar Technologies\pysamloader

The current pysamloader windows .msi installer will create this folder and populate it as a part of the install process.

Usage

The primary entry point for use of pysamloader is as a console script.

For those in a hurry, the following is a quick example of how to use the script to burn app.bin to an ATSAM3U4E whose UART SAM-BA interface is accessible on \dev\ttyUSB1:

$ pysamloader --device ATSAM3U4E --port \dev\ttyUSB1 -g app.bin

Script usage and arguments are listed here. This help listing can also be obtained on the command line with pysamloader --help.

Metadata

Release files for pysamloader 0.6.4

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

Source distribution (sdist)

Source distribution for pysamloader 0.6.4
File Size Uploaded
pysamloader-0.6.4.tar.gz 128.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysamloader 0.6.4
File Interpreter ABI Platform
pysamloader-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 163.0 kB

Release files / pysamloader-0.6.4.tar.gz

Download URL pysamloader-0.6.4.tar.gz
Size 128.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e04c1346e0d7779f521bcfdfa518c6d56702864544671952c056b605f5cdb4a
BLAKE2b-256 checksum
How to use checksums
1bca5ff3feae384e9bfe4a5b02b21b0475b7c286c33b16b8ca750cb7953c1373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

Release files / pysamloader-0.6.4-py3-none-any.whl

Download URL pysamloader-0.6.4-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b13482a6155d3c2a969988bcca1d7e0a016026dbf4d63474411128e07ac84566
BLAKE2b-256 checksum
How to use checksums
54291ef801b1ce14f51136efc4279a99d4322da7e8ccc4366bc5fcb7b55c8fa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2

3 release files

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