Metadata-Version: 2.1
Name: k230_flash
Version: 0.0.6
Summary: Kendryte K230 Flash Tool
Author: kendryte747
Author-email: kendryte747@gmail.com
Maintainer: kendryte747
Maintainer-email: kendryte747@gmail.com
License: Copyright (c) 2022, Canaan Bright Sight Co., Ltd 
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met: 
        
        1. Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution. 
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
        CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
        MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
        CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
        BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
        WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
        NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: homepage, https://github.com/kendryte/k230_flash
Keywords: kendryte,kflash,k230
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# K230 Flash

K230 Flash is a python tools to program Kendryte K230 and K230D Chips, Supports program firmware to `EMMC`, `SDCARD`, `SPI-NOR`, `SPI-NAND` and `OTP`

## Usage

```bash
k230_flash.exe --help
usage: k230_flash [-h] [-m {EMMC,SDCARD,SPINAND,SPINOR,OTP}] [-l] [-d DEVICE_ADDRESS] [--auto-reboot] [--log-level {TRACE,DEBUG,INFO,WARN,ERROR,CRITICAL,OFF}] [--custom-loader] [-la LOAD_ADDRESS] [-lf LOADER_FILE]  
                  [<address> <filename> ...]

Kendryte Burning Tool

positional arguments:
  <address> <filename>  Pairs of addresses followed by binary filenames, separated by space

options:
  -h, --help            show this help message and exit
  -m {EMMC,SDCARD,SPINAND,SPINOR,OTP}, --medium-type {EMMC,SDCARD,SPINAND,SPINOR,OTP}
                        Specify the medium type (choices: EMMC, SDCARD, SPI_NAND, SPI_NOR, OTP)
  -l, --list-device     List devices
  -d DEVICE_ADDRESS, --device-address DEVICE_ADDRESS
                        Device address (format: 1-1 or 3-1), which is the result get from '--list-device'
  --auto-reboot         Enable automatic reboot.
  --log-level {TRACE,DEBUG,INFO,WARN,ERROR,CRITICAL,OFF}
                        Set the logging level, Default is WARN

Custom Loader Options:
  Options related to the custom loader

  --custom-loader       If set, pass a file for the custom loader
  -la LOAD_ADDRESS, --load-address LOAD_ADDRESS
                        Hexadecimal load address (must be between 0x80300000 and 0x80400000), Default is 0x80360000
  -lf LOADER_FILE, --loader-file LOADER_FILE
                        Path to the custom loader file (required if --custom-loader is set)

# Usually just specify the medium type and file address and file path
k230_flash -m EMMC 0 file_0x00.img
```
