DFU-PREFIX(1)

πŸ’– DFU-PREFIX πŸ’–

okay so bestie, welcome to the dfu-prefix manual page β€” she's manual section 1, she's a little niche, she's iconic, and she is going to make your firmware files look ✨special✨


🌸 NAME 🌸

dfu-prefix β€” add, check, or remove special firmware file prefix πŸŽ€


✨ SYNOPSIS ✨

dfu-prefix [ -s address | -L ] --add DFU_FILE
dfu-prefix [ -T | -L ] --check DFU_FILE
dfu-prefix [ -T | -L ] --delete DFU_FILE
dfu-prefix --help
dfu-prefix --version

like… look at her. four whole modes plus help and version. main character energy fr fr πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: dfu-prefix can add, check, or remove a prefix that certain hardware manufacturers use. which formats are supported, you ask? glad you asked:

  • the Stellaris format from TI
  • the LPC format from NXP

that's the whole roster. no cap. 🫢

⚠️ important caveat alert ⚠️ a standard DFU firmware file has no concept of a prefix, okay? like, none. and a DFU host tool like dfu-util just passes the prefix on to the device as part of the normal firmware payload. so don't come for her, she's doing her best πŸ’€

πŸ‘‘ OPTIONS πŸ‘‘

  • -s, --stellaris-address address β€” (only makes sense with --add) adds a TI Stellaris address prefix to the file. bestie you literally hand her the address and she puts it in the file, slay πŸ’–
  • -T, --stellaris β€” (pairs with --delete or --check) acts on the TI Stellaris address prefix of the file. no address needed here, she just needs to know which flavour πŸŽ€
  • -L, --lpc-prefix β€” (pairs with --add or --delete or --check) use the NXP LPC DFU prefix format. so she can do all three modes in LPC mode, unlike -T which is check/delete only. iykyk πŸ”₯
  • -h, --help β€” displays a help message. she's helpful, she's generous, she's humble πŸ₯°
  • -V, --version β€” displays the software version. know your queen's number πŸ’…

🌈 EXAMPLES 🌈

this is the part where it gets real, bestie. watch her work:

dfu-prefix --stellaris-address 0x0100 --add firmware.dfu

adds a Stellaris prefix with load address 0x0100 ✨

dfu-prefix --stellaris --check firmware.dfu

checks the file firmware.dfu for a Stellaris prefix πŸ”

dfu-prefix --lpc-prefix --delete firmware.dfu

removes a LPC prefix from the file firmware.dfu 🧹

three commands. three vibes. one icon. periodt. πŸ’œ


⭐ EXIT VALUES ⭐

she reports back to you, always:

  • 0 β€” Success πŸŽ‰ (also if prefix is missing β€” yes, missing counts as success, she's chill like that)
  • -64 β€” Usage error πŸ™ˆ (you did the syntax wrong, bestie, it happens to everyone)

πŸ’€ BUGS πŸ’€

found something cursed? don't suffer in silence, go here:

https://sourceforge.net/p/dfu-util/tickets/

that's the ticket tracker, she reads them, fr fr πŸ“


License GPLv2: GNU GPL version 2 🫢


🌟 SEE ALSO 🌟

go read those too, they're the extended universe πŸ¦‹


πŸ’œ AUTHORS πŸ’œ

See AUTHORS file in source. πŸ‘‘


and that's the whole page!! this was dfu-util 0.11, from way back in September 2021 β€” yeah she's a little vintage, vintage is a vibe, don't @ me 🌸

bye bestie, go prefix something responsibly πŸ’…βœ¨πŸ¦‹