pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Start here
    • Getting started guide
    • Playground
  • Development
    • The pbl CLI
      • pbl configure
      • pbl build
      • pbl bundle
      • pbl menuconfig
      • pbl clean
      • pbl test
      • pbl itest
      • pbl samples
      • pbl sdk
      • pbl run
      • pbl console
      • pbl debug
      • pbl debugserver
      • pbl emulator
      • pbl image_resources
      • pbl image_recovery
      • pbl erase
      • pbl lab
      • pbl power
      • Extending pbl
    • Build system
    • Samples
    • Emulator and simulator
    • Testing
    • Debugging
    • Conventions
  • System
    • Architecture overview
    • Kernel
    • Subsystems
    • Drivers
    • Services
    • Libraries
    • Third-party
    • Application SDK
  • Hardware
    • Boards
    • Programmers
  • Community
    • Contribution Guidelines
  • Reference
    • Reference
    • Kconfig options

pbl erase

Erase parts of the flash of a watch connected through a development kit: regions of the board’s flash layout, by name, or offset ranges in it.

Warning

Erasing FILESYSTEM wipes the pairings, apps and settings stored on the watch.

pbl erase --region FILESYSTEM --region SHARED_PRF_STORAGE

The regions are the partitions of the build: those of its devicetree, or of the include/pbl/board/partitions_*.h header of the board’s layout. --region NAME:SIZE erases only the first SIZE bytes of a region, and --range OFFSET:SIZE any range; both can be repeated. Ranges start at offset 0 of the flash, and must be aligned to its erase size (4 KiB).

Options

pbl erase [-h] [-b DIR] [--dry-run] [--lab FILE] [--watch NAME]
          [--wait [SECONDS]] [--region NAME[:SIZE]] [--range OFFSET:SIZE]
          [-r {native,nrfutil,openocd,phone,probe-rs,qemu,sftool,wasm}]
          [--tty TTY] [--probe VID:PID[:SERIAL]] [--keep-flash-image]
          [--decoration NAME] [--sunlight] [--bt-hci CHARDEV]
          [--http-port HTTP_PORT] [--no-browser] [--via {adb,cloud,ip}]
          [--address ADDRESS] [--adb-serial ADB_SERIAL]
--region NAME[:SIZE]

Erase a flash region, or only its first SIZE bytes (repeatable)

--range OFFSET:SIZE

Erase SIZE bytes from flash OFFSET (repeatable)

-r, --runner {native,nrfutil,openocd,phone,probe-rs,qemu,sftool,wasm}

Override the board’s runner

--tty TTY

Serial port for the sftool and probe-rs runners (default: the lab’s)

--probe VID:PID[:SERIAL]

Debug probe for the probe-rs runner (default: the lab’s)

--keep-flash-image

Keep the emulator’s SPI flash image, and the apps and data in it, instead of rebuilding it

--decoration NAME

SDL decoration the emulator draws around the screen, or ‘none’ (default: the board’s first)

--sunlight

Show the colors as a watch’s panel does in sunlight

--bt-hci CHARDEV

H4 Bluetooth controller for builds with CONFIG_BT_HCI_UART, e.g. the serial port /dev/cu.usbmodem1101

--http-port HTTP_PORT

Port the wasm runner serves the page on (default: 8000)

--no-browser

Do not open the page the wasm runner serves in a browser

--via {adb,cloud,ip}

How the phone runner reaches the phone’s Developer Connection: adb (Android, the default), cloud (signed in with ‘pebble login’) or ip (implied by –address)

--address ADDRESS

Phone address (Developer Connection) for the phone runner

--adb-serial ADB_SERIAL

Serial of the Android phone for the phone runner, when adb sees several

Generated from PebbleOS 7753e801d. This page is maintained in the pebbleos repository: docs/pbl/erase.md.