Commit graph

17 commits

Author SHA1 Message Date
pwpiwi
472345daee
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
2018-08-05 18:15:03 +02:00
pwpiwi
44964fd181
Code cleanup (#616)
* coverity fixes (including a real bug in cmdhftopaz.c)
* Typo fix
* replace TRUE/FALSE by stdbool true/false
2018-06-13 08:13:20 +02:00
pwpiwi
ec0872181b fix clang compiler warnings
identified in http://www.proxmark.org/forum/viewtopic.php?id=5388
2018-01-23 16:55:48 +01:00
Oleg Moiseenko
36b1cdd1b4 fix fpga_comress sending no-error messages to stderr (#430) 2017-10-19 12:23:09 +02:00
pwpiwi
7f9e4c257f hardnested: reduce disk space for tables (by > 700MBytes) and other minor changes
- compress tables
- minor changes to progress reporting
- free memory on aborts (@iceman1001)
2017-06-30 08:48:37 +02:00
Johnny Bengtsson
ad8a18e66e Code cleanup
Some variable type changes.
2016-09-14 13:27:24 +02:00
Johnny Bengtsson
015520dc4e Warning removal fix
Minor fix of data type corrections.

gcc -std=c99 -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall  -g -O4 -DHAVE_GUI -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED  -c -o obj/fpga_compress.o fpga_compress.c
fpga_compress.c: I funktion "zlib_compress":
fpga_compress.c:90:20: varning: format "%lu" förväntar sig argument av typen "long unsigned int", men argument 3 har typen "int" [-Wformat=]
    fprintf(stderr, "Input files too big (total > %lu bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONF
                    ^
fpga_compress.c:142:18: varning: format "%lu" förväntar sig argument av typen "long unsigned int", men argument 3 har typen "uint32_t {även unsigned int}" [-Wformat=]
  fprintf(stderr, "compressed %lu input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out);
2016-09-13 12:21:46 +02:00
marshmellow42
38d618baa9 remove redundant llx prix64 defines
remove unused commented out #includes
coverity indicates compressed_fpga_stream.opaque needs to be initialized
to Z_NULL
fgetc returns int
define llu
2016-02-14 14:43:19 -05:00
pwpiwi
7b242c1ca2 fix: fpga_compressor file size check
- commit 61611f5 fixed the check in case of correct filesizes but fails
  in case of files which are too big to fit in fpga_config[]
- fix exit codes and Makefile to handle errors correctly during make
2015-06-25 08:16:48 +02:00
Frederik Möllers
61611f5b85 Fix comparison error in fpga_compress
The comparison would check for greater-than-or-equal the maximum amount
of bytes to read/write when it should check for greater-than only.
2015-06-24 14:57:08 +02:00
pwpiwi
97a0f5f4aa fix format strings for nit picking compilers 2015-05-31 19:51:44 +02:00
pwpiwi
8e074056ac also delete *.bin and fpga_compressor when "make clean".
Add target to make fpga_compressor when client is not yet compiled.
Get version information and cache it when client starts (avoids clearing
BigBuf when calling hw version).
Add some comments and remove debugging printouts.
Add version info and ChangeLog in modified zlib.
2015-05-26 18:12:40 +02:00
pwpiwi
4b3f6d79ea Add option -d (decompress) to fpga_compress. Allows testing.
Improve zlib deflate (note: no change required to inflate).
2015-05-26 08:31:35 +02:00
pwpiwi
0fa01ec7da Compress the .data section as well (saves another 4KBytes and comes for free)
zlib tuning: prevent fpga_compress from generating fixed code blocks
armsrc/Makefile: replace osimage with fullimage
2015-05-26 08:31:32 +02:00
pwpiwi
fb22897415 fpga_compress: interleave (combine) fpga_lf.bit and fpga_hf.bit before compression.
fpga_loader.c: change to unweave fpga_lf and fpga_hf accordingly
prepare fpga_compress, fpga_loader and Makefile to handle more than two FPGA config files
revert removal of fullimage Makefile target. Remove osimage instead.
2015-05-26 08:31:28 +02:00
pwpiwi
f39198789b replaced gzip with an own compressor tool (fpga_compress.c, based on zlib)
This allows to remove the gzip header support and the z_crc32.[ch] files
(which saves more than 2KBytes of the ARM's flash memory)
2015-05-26 08:31:26 +02:00
pwpiwi
e61530408c add: hw ver: show FPGA versions for both HF and LF FPGA configs
add: hw ver: show used and free flash memory
chg: prepare fpgaloader for compressed FPGA configs
2015-05-26 08:31:19 +02:00