X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/391a974f53b8344d2dd1e04dab382bb5d397916d..e73e717239300d6b47d5f5d81256d8feb493299f:/tools/rbt2c.pl diff --git a/tools/rbt2c.pl b/tools/rbt2c.pl deleted file mode 100644 index 3e1e1fc4..00000000 --- a/tools/rbt2c.pl +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl - -# This tool converts a Xilinx xxx.rbt FPGA bitstream to a table that will -# compile as C source code. The output format is DWORDs, MSB first. - -local $/ = "\r\n"; - -print "// Generated by rbt2c.pl, do not edit!\n\n"; - -for(1..7) { - chomp($_ = <>); - print "//// $_\n"; -} - -print < - -const DWORD FpgaImage[] = { -EOT - -while(<>) { - chomp; - $v = 0; - for $b (split(//, $_)) { - $v <<= 1; - if($b eq '1') { - $v |= 1; - } elsif($b ne '0') { - die; - } - } - printf("\t0x%08x,\n", $v); -} - -print <