PYOCD-FLASHTOOL(1)

πŸ“¦
version 0.45.0 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– pyocd-flashtool β€” the manual, but make it a group chat πŸ’–

okay bestie, this is the man page for pyocd-flashtool, straight out of the 0.12.0 era. it's giving "tiny command, huge lore." sit down, grab a strawberry πŸ“, and let's get into it.


✨ Name ✨

pyocd-flashtool β€” ARM Cortex-M programming tool πŸ‘‘

🌸 Description 🌸

pyocd-flashtool is an ARM Cortex-M programming tool. that's it. that's the whole vibe. short, iconic, no notes. πŸ’…

πŸ¦‹ Summary πŸ¦‹

pyOCD is an Open Source python based library for programming and debugging ARM Cortex-M microcontrollers using CMSIS-DAP. ngl that's a lot of acronyms but she handles it.

it includes support for:

  • flashing new binaries πŸ”₯
  • resetting the device
  • halt
  • step
  • resume read/write memory
  • set/remove breakpoints

like… she does everything. main character energy fr fr.

πŸŽ€ Support πŸŽ€

bestie, important tea: the firmware files that live in the upstream source are NOT included in the Debian package, because there's a lack of source code. 😭

no cap β€” you have to go get the target files yourself, separately, from:

https://github.com/mbedmicro/pyOCD/tree/master/binaries

and here's the full list of targets you can use with the --target option (yes, all of them, I'm not skipping a single one, the way that she listed all 44… obsessed):

lpc824, kinetis, w7500, kv11z7, lpc4088qsb, kv10z7, k20d50m, ncs36510, kl28z, kl25z, k82f25615, k28f15, maxwsnenv, max32600mbed, k22fa12, lpc4088, lpc4330, ke18f16, kl46z, stm32f103rc, kl82z7, lpc54114, kl43z4, kl26z, lpc11xx_32, lpc800, rtl8195am, kl05z, lpc1768, kw41z4, lpc4088dm, stm32f051, cortex_m, lpc11u24, kl02z, kw01z4, k64f, k22f, ke15z7, nrf51, nrf52, kl27z4, kw40z4, k66f18

✨ so many boards. so little time. ✨

πŸ’œ Usage πŸ’œ

here's the synopsis, exactly as she wrote it, do not touch:

usage: pyocd-flashtool [-h] [--version] [-b BOARD_ID] [-l] [-d LEVEL]
[-t TARGET] [-f FREQUENCY] [-ce | -se] [-u]
       [-a ADDRESS] [-n COUNT] [-s SKIP] [-hp] [-fp] [-da DAPARG [DAPARG
       ...]] [--mass-erase] [file] [{bin,hex}]

Flash utility β€” that's the one-liner description, short and slay.

positional arguments:

  • file β€” File to program {bin,hex} File format. Default is to use the file extension

and then the doc itself had a little oopsie moment πŸ™ˆ, so we're preserving it exactly as it appears:

System Message: ERROR/3 (debian/pyocd-flashtool.rst:, line 47)
       Unexpected indentation.
          (.bin or .hex)

(that's literally what's in there β€” the .bin or .hex bit got eaten by an indentation gremlin. iconic behavior honestly.)

optional arguments:

  • -h, --help β€” show this help message and exit
  • --version β€” show program's version number and exit
  • -b BOARD_ID, --board BOARD_ID β€” Connect to board by board id. Use -l to list all connected boards.
  • -l, --list β€” List all connected boards.
  • -d LEVEL, --debug LEVEL β€” Set the level of system logging output. Supported choices are: debug, info, warning, critical, error
  • -t TARGET, --target TARGET β€” Override target to debug. Supported targets are: lpc824, kinetis, w7500, kv11z7, lpc4088qsb, kv10z7, k20d50m, ncs36510, kl28z, kl25z, k82f25615, k28f15, maxwsnenv, max32600mbed, k22fa12, lpc4088, lpc4330, ke18f16, kl46z, stm32f103rc, kl82z7, lpc54114, kl43z4, kl26z, lpc11xx_32, lpc800, rtl8195am, kl05z, lpc1768, kw41z4, lpc4088dm, stm32f051, lpc11u24, kl02z, kw01z4, k64f, k22f, ke15z7, nrf51, nrf52, kl27z4, kw40z4, k66f18
  • -f FREQUENCY, --frequency FREQUENCY β€” Set the SWD clock frequency in Hz.
  • -ce, --chip_erase β€” Use chip erase when programming.
  • -se, --sector_erase β€” Use sector erase when programming.
  • -u, --unlock β€” Unlock the device.
  • -a ADDRESS, --address ADDRESS β€” Address. Used for the sector address with sector erase, and for the address where to flash a binary.
  • -n COUNT, --count COUNT β€” Number of sectors to erase. Only applies to sector erase. Default is 1.
  • -s SKIP, --skip SKIP β€” Skip programming the first N bytes. This can only be used with binary files
  • -hp, --hide_progress β€” Don't display programming progress.
  • -fp, --fast_program β€” Use only the CRC of each page to determine if it already has the same data.
  • -da DAPARG [DAPARG ...], --daparg DAPARG [DAPARG ...] β€” Send setting to DAPAccess layer.
  • --mass-erase β€” Mass erase the target device.

okay so the big-brain part, listen up bestie: --chip_erase and --sector_erase can be used alone as individual commands, or they can be used in conjunction with flashing a binary or hex file. 😌

  • for the former (used alone), only the erase option will be performed.
  • with a file, the erase options specify whether to erase the entire chip before flashing the file, or just to erase only those sectors occupied by the file.
  • for a standalone sector erase, the --address and --count options are used to specify the start address of the sector to erase and the number of sectors to erase.

like… she contains multitudes. πŸ’«


2006-2013 ARM Limited


and that's the whole page, babe. 🫢 this was pyocd-flashtool, version 0.12.0, page 1, copyright 2006-2013 ARM Limited. thanks for coming to my ted talk, go flash something responsibly, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from