mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Add Makefile for fpga directory (Windows codepath is untested, in any case, go.bat is still there)
Retire rbt2c.pl, instead use objcopy to directly convert the .bit file into an .o that can be linked with the flash image Rename armsrc/fpga.c to armsrc/fpgaloader.c (since there is now a new fpga.o, created from fpga.bit) Remove fpgaimg.c from subversion, add fpga.bit Instead of creating fpgaimage.elf and osimage.elf separately, now create a joined fullimage.elf first (obsoleting ldscript-full), then extract only the fpga and os sections with objcopy (This creates unspecific warnings about an empty segment, need to investigate) Implement a rudimentary .bit parser in the firmware, use that to locate the bitstream in the new fpgaimage (which is just a plain copy of the fpga.bit file) and send it to the FPGA The code will check the format that's in flash and fall back to the legacy format
This commit is contained in:
parent
391a974f53
commit
e73e717239
12 changed files with 178 additions and 10651 deletions
|
@ -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 <<EOT;
|
||||
|
||||
#include <proxmark3.h>
|
||||
|
||||
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 <<EOT;
|
||||
};
|
||||
|
||||
const DWORD FpgaImageLen = sizeof(FpgaImage) / sizeof(FpgaImage[0]);
|
||||
|
||||
EOT
|
Loading…
Add table
Add a link
Reference in a new issue