Skip to content

Instantly share code, notes, and snippets.

@kost
Last active February 2, 2020 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kost/3f30d71349a6e3de15029e2a19fba74a to your computer and use it in GitHub Desktop.
Save kost/3f30d71349a6e3de15029e2a19fba74a to your computer and use it in GitHub Desktop.
ECP5 - repack 25f bitstream file to 12f
#!/bin/sh
# Repack 25f to 12f bitstream file.
# Usage: script <input> <output>
TMPECP5CONFIG=`mktemp`
ecpunpack --input "$1" --textcfg "$TMPECP5CONFIG" --idcode 0x41111043
ecppack --compress --input "$TMPECP5CONFIG" --bit "$2" --idcode 0x21111043
rm -- "$TMPECP5CONFIG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment