Giter VIP home page Giter VIP logo

blinka-cli's Introduction

The Blinka Command-Line Interface

This is intended to provide various useful commands for maintaining CircuitPython devices.

Running

PS C:\Users\bcr00\Source\bcr\blinka-cli> python -m blinka --help
usage: python -m blinka [-h] [-v] [-l LOCALE] {backup,bossa,bootloader,update,sync,port,font} ...

Perform CircuitPython operations.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         be chatty
  -l LOCALE, --locale LOCALE
                        specify the locale (default: en_US)

subcommands:
  {backup,bossa,bootloader,update,sync,port,font}
                        specify which operation to perform, use --help after the operation for operation-specific help

Commands

Backup

Update (coming soon)

Tasks

  • Back up CircuitPython contents
  • Maintain CircuitPython
    • Compare version and upgrade if newer version available
    • Allow for installing pre-release version
    • Force reinstall of current version
    • Force install a particular version
  • Maintain libraries
    • Force reinstall of installed libraries to corresponding CircuitPython version

Installation Details

Make sure the requirements are installed per requirements.txt

Observations About Namespaces

Within CircuitPython there are a lot of different places where there are name / numberspaces:

  • Processors
    • M0, M4
    • SAMD21, SAMD51
  • Platform identifiers (from user mode)
    • Adafruit Feather M0 RFM69 with samd21g18
    • Adafruit PyPortal with samd51j20
  • Board IDs (firmware root names)
    • feather_m0_rfm69
    • pyportal_titano
    • adafruit_magtag_2.9_grayscale
  • Board-ID from bootloader INFO_UF2.TXT
    • MagTag-29gray-revC (different than board ID adafruit_magtag_2.9_grayscale in firmware root name)
  • USB VID / PID
    • Adafruit VID
    • PIDs differ between bootloader and user mode COM ports
  • Mounted disk volume labels
    • CIRCUITPY for user mode
      • Can be renamed by user, so not reliable
    • LOTS for bootloader mode
      • BOOT is used a lot for a suffix
      • shIRtty mixed case, no BOOT
      • ARCADE-D5 dash, no BOOT
      • Grove Zero mixed case, space in name, no BOOT
  • os.uname() information
    • (sysname='samd51', nodename='samd51', release='6.0.0', version='6.0.0 on 2020-11-16', machine='Adafruit PyPortal Titano with samd51j20')

Some problems I have encountered:

  • In bootloader mode there is not enough information to find the Board ID (in this case, is it a Titano? I know first-hand that the Titano firmware is materially different than the non-Titano PyPortal)
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\INFO_UF2.TXT
UF2 Bootloader v1.23.1-adafruit.1-89-gcfdd5ba SFHWRO
Model: PyPortal M4 Express
Board-ID: SAMD51J20A-PyPortal-v0
  • Mapping from the Platform Identifer to the Board ID seems fragile
    • Other manufacturers may not be as careful with naming
      • J&J Studios datum-Distance with None -- the None processor
      • SparkFun Qwiic Micro with samd21e18 -- there is both sparkfun_qwiic_micro_no_flash and sparkfun_qwiic_micro_with_flash with this Platform Identifier
      • ndGarage[nĀ°] Bit6: FeatherSnow-v2 with samd21e18 -- a UTF-8 party

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.