Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AX520Tool

Description

AX520Tool is a versatile command-line tool designed for programming firmware onto AX520 series devices via a serial port. It facilitates various operations such as flashing firmware, reading and verifying memory, erasing flash, and managing device execution. Whether you're a developer or an embedded systems enthusiast, AX520Tool streamlines the process of interacting with AX520-based hardware.

Features

  • Firmware Downloading: Upload firmware to AX520 devices with precise memory address targeting.
  • Memory Operations: Read, write, and erase device memory regions.
  • Firmware Verification: Ensure the integrity of flashed firmware by comparing device memory with source files.
  • Command-Line Interface: Intuitive and flexible CLI for executing various operations.
  • Progress Indicators: Real-time feedback during lengthy operations using progress bars.
  • Error Handling: Comprehensive exception handling to guide users through issues.

Installation

pip install ax520tool

Usage

AX520Tool is operated via the command line. Below are the instructions to perform various operations.

Basic Syntax

python ax520tool.py -p <serial_port> [options] <command> [command_options]
  • -p, --port: (Required) Specify the serial port connected to the AX520 device (e.g., COM3 on Windows or /dev/ttyUSB0 on Linux).
  • -b, --board: (Optional) Specify the board name. Defaults to M5_TimerCamera520.
  • -r, --reboot: (Optional) Reboot the device after flashing.
  • -c, --check: (Optional) Verify firmware after flashing.

Commands

1. Write Flash

Download firmware to the device.

Syntax:

python ax520tool.py -p <serial_port> write_flash <address1> <firmware1> [<address2> <firmware2> ...]
  • <address>: Starting memory address (hex 0x... or decimal).
  • <firmware>: Path to the firmware binary file.

Example:

python ax520tool.py -p COM3 write_flash 0x3000000 firmware.bin

2. Read Flash

Read firmware from the device.

Syntax:

python ax520tool.py -p <serial_port> read_flash <address> <size> <output_file>
  • <address>: Starting memory address.
  • <size>: Number of bytes to read.
  • <output_file>: Path to save the read firmware.

Example:

python ax520tool.py -p COM3 read_flash 0x3000000 1048576 read_firmware.bin

3. Erase Flash

Erase a region of the device's flash memory.

Syntax:

python ax520tool.py -p <serial_port> erase_flash <address> <size>
  • <address>: Starting memory address.
  • <size>: Number of bytes to erase.

Example:

python ax520tool.py -p COM3 erase_flash 0x3000000 65536

Examples

Flashing Firmware

Download firmware.bin to address 0x3000000 and reboot the device after flashing:

python ax520tool.py -p COM3 -r write_flash 0x3000000 firmware.bin

Reading Firmware

Read 1MB of firmware starting from address 0x3000000 and save it to read_firmware.bin:

python ax520tool.py -p COM3 read_flash 0x3000000 1048576 read_firmware.bin

Erasing Flash Memory

Erase 64KB of flash memory starting at address 0x3000000:

python ax520tool.py -p COM3 erase_flash 0x3000000 65536

Verifying Firmware

After flashing, verify the integrity of the firmware:

python ax520tool.py -p COM3 -c write_flash 0x3000000 firmware.bin

Note: The -c flag enables verification after flashing each file. It will never check overlapping.

Metadata

Release files for ax520tool 0.1.1a0

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

Source distribution (sdist)

Source distribution for ax520tool 0.1.1a0
File Size Uploaded Provenance
ax520tool-0.1.1a0.tar.gz 20.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 41.0 kB

Release files / ax520tool-0.1.1a0.tar.gz

Download URL ax520tool-0.1.1a0.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
63e4e8d9c4e8fd462d5777297b5aa4a8cde49fbe8a2122b504058ef942b40aa3
BLAKE2b-256 checksum
How to use checksums
29c6f45ead74795899e7f5b65a07c0a6b85e720923654c6559852ec2a4e76254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.1

Release files / ax520tool-0.1.1a0-py3-none-any.whl

Download URL ax520tool-0.1.1a0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4afbacea2302496b9375785eb933f6325d09b4abcf418bce01a614065c403285
BLAKE2b-256 checksum
How to use checksums
e8d0c58745e83bc82142e395a8b3351e2a7c3614087f3bcfd022e5fd32f70898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.1

Security for ax520tool 0.1.1a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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