mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 10:36:58 -07:00
mod hw version: (#631)
* create fpga version info at compile time (by additional functionality in fpgacompress) * remove hw version caching (prepare USB reconnect) * fix calculation of available compressed bytes in fpga_loader.c
This commit is contained in:
parent
5125e4263c
commit
472345daee
9 changed files with 249 additions and 131 deletions
|
@ -75,7 +75,7 @@ LIBS = -lgcc
|
|||
THUMBOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(THUMBSRC)))
|
||||
ARMOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(ARMSRC)))
|
||||
ASMOBJ = $(patsubst %.s,$(OBJDIR)/%.o,$(notdir $(ASMSRC)))
|
||||
VERSIONOBJ = $(OBJDIR)/version.o
|
||||
VERSIONOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(VERSIONSRC)))
|
||||
|
||||
$(THUMBOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
|
@ -99,11 +99,6 @@ OBJCOPY_TRANSLATIONS = --no-change-warnings \
|
|||
$(OBJDIR)/%.s19: $(OBJDIR)/%.elf
|
||||
$(OBJCOPY) -Osrec --srec-forceS3 --strip-debug $(OBJCOPY_TRANSLATIONS) $^ $@
|
||||
|
||||
# version.c should be remade on every compilation
|
||||
.PHONY: version.c
|
||||
version.c: default_version.c
|
||||
perl ../tools/mkversion.pl .. > $@ || $(COPY) $^ $@
|
||||
|
||||
# Automatic dependency generation
|
||||
DEPENDENCY_FILES = $(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(THUMBSRC))) \
|
||||
$(patsubst %.c,$(OBJDIR)/%.d,$(notdir $(ARMSRC))) \
|
||||
|
|
18
common/fpga.h
Normal file
18
common/fpga.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __FPGA_H
|
||||
#define __FPGA_H
|
||||
|
||||
#define FPGA_BITSTREAM_FIXED_HEADER_SIZE sizeof(bitparse_fixed_header)
|
||||
#define FPGA_INTERLEAVE_SIZE 288
|
||||
#define FPGA_CONFIG_SIZE 42336L // our current fpga_[lh]f.bit files are 42175 bytes. Rounded up to next multiple of FPGA_INTERLEAVE_SIZE
|
||||
|
||||
static const uint8_t bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
|
||||
extern const int fpga_bitstream_num;
|
||||
extern const char* const fpga_version_information[];
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue