Skip to content

聆思 CSK 系列芯片烧录工具

License

Notifications You must be signed in to change notification settings

LISTENAI/cskburn

Repository files navigation

cskburn

release downloads license issues stars commits

聆思 CSK 系列芯片烧录工具,串口 OTA 协议的一个跨平台参考实现。

使用

Usage: cskburn [<options>] <addr1> <file1> [<addr2> <file2> ...]
       cskburn [<options>] --verify <addr1>:<size1> [--verify <addr2>:<size2> ...]
       cskburn [<options>] --erase <addr1>:<size1> [--erase <addr2>:<size2> ...]

Burning options:
  -u, --usb (-|<bus>:<device>)
    burn with specified USB device. Pass "-" to select first CSK device automatically
  -s, --serial <port>
    burn with specified serial device (e.g. /dev/cu.usbserial-0001)

Common options:
  -h, --help
    show help
  -V, --version
    show version
  -v, --verbose
    print verbose log

USB burning options:
  -w, --wait
    wait for device presence and start burning
  -R, --repeat
    repeatly wait for device presence and start burning
  -c, --check
    check for device presence (without burning)

Serial burning options:
  -b, --baud <rate>
    baud rate used for serial burning (default: 3000000)
  -C, --chip <family>
    chip family, acceptable values: 3/4/6 (default: 4)
  --chip-id
    read unique chip ID
  --verify-all
    verify all partitions after burning
  -n, --nand
    burn to NAND flash (CSK6 only)
  --probe-timeout <ms>
    timeout for probing device (default: 10000 ms)
  --reset-attempts <n>
    number of attempts to reset device during probing (default: 4)
  --reset-delay <ms>
    delay in milliseconds the reset line is held low (default: 500 ms)
  --timeout <ms>
    override timeout for each operation (default: 0), acceptable values:
      -1: no timeout
       0: use default strategy
       n: timeout after n milliseconds (n > 0)
    this option does not affect the timeout of probing device, use --probe-timeout if needed

Advanced operations (serial only):
  --erase <addr:size>
    erase specified flash region
  --erase-all
    erase the entire flash
  --verify <addr:size>
    verify specified flash region

Example:
    cskburn -C 6 -s /dev/cu.usbserial-0001 -b 15000000 --verify-all 0x0 app.bin 0x100000 res.bin

编译

cmake -G Ninja -B build
cmake --build build --config Release

编译环境

Windows

  • MSYS2 MinGW64
  • CMake
  • Ninja

Linux/macOS

  • CMake
  • Ninja

Android

  • Android NDK r22b
  • CMake
  • Ninja

协议

Apache-2.0 License