Commit graph

20 commits

Author SHA1 Message Date
marcansoft c062856a74 But let people override CROSS if they reall want to ;) 2010-02-20 21:32:09 +00:00
marcansoft 272e55ca64 Switch compiler to arm-eabi instead of arm-elf
Non-EABI has been deprecated for a while and in fact won't build
with interworking support these days. Configuring the latest
gcc/binutils for arm-eabi works out of the box, so use that.
2010-02-20 21:28:29 +00:00
izsh.f0f 7fe9b0b742 Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.

The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P

The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.

Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)

client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.

client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.

client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.

client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.

include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.

common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.

armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.

common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 01:27:07 +00:00
roel@libnfc.org 6c5ad03860 mifare usb update 2009-12-30 00:18:35 +00:00
henryk@ploetzli.ch a665f74081 Use the interworking version of libgcc.a 2009-12-22 16:40:03 +00:00
bushing d5be6f7cd4 fix OS detection, libgcc detection 2009-12-22 12:50:34 +00:00
d18c7db 6949aca9fa Pushed standard AT91 defines into main code 2009-09-29 12:13:41 +00:00
henryk@ploetzli.ch d4086fe2b7 Re-enable -Wall 2009-09-06 19:19:38 +00:00
henryk@ploetzli.ch 64b8119836 Add make targets for flashing (Windows version untested) 2009-09-05 22:45:53 +00:00
henryk@ploetzli.ch 83288efc7d Remove unused code from hitag2.c
Mark intermittently used code in iso15693.c as attribute unused
Change CFLAGS to -Werror to enforce warning free code
2009-09-05 22:17:18 +00:00
henryk@ploetzli.ch 4f3bd9738f Fix mkversion.pl for the case where the global svn revision is different from the last changed revision 2009-09-01 22:56:07 +00:00
henryk@ploetzli.ch 8fcbf652da New bootrom
+ Add common area at end of RAM to communicate between main os and bootrom
+ Lower stack end to make room for common area
+ Implement CMD_DEVICE_INFO in both OS and bootrom to give information about the current state and supported features
+ Allow hands-free firmware update: When CMD_START_FLASH is received over USB in OS mode, the device will reset and enter the bootrom
  Pressing the button in hands-free update mode takes precedence: releasing the button will immediately abort firmware update and 
  perform a reset. Do not press the button.
+ Require each flash sequence to be preceded by a CMD_START_FLASH to set up the boundaries for the following flash sequence
  Not compatible with linux flasher before SVN revision 200
  Currently no compatible flasher for Windows. WINDOWS USERS: DO NOT UPDATE YOUR BOOTROM YET
+ Protect bootrom flash area unless magic unlock sequence is given in CMD_START_FLASH
2009-09-01 14:44:38 +00:00
henryk@ploetzli.ch db335b3de0 Make objcopy call less verbose
Add master Makefile
2009-08-30 22:35:12 +00:00
henryk@ploetzli.ch 4271e82d56 Only re-compile version.c as often as necessary
Make bootrom version information pointer a proper symbol (with hacky ld strangeness workaround)
2009-08-29 06:14:28 +00:00
henryk@ploetzli.ch 8a6aec16d8 Implement version information storage and retrieval for the bootrom and the osimage.
Use perl to create the version information (thereby re-creating the perl dependency and adding an svn dependency) but fall back in case of missing perl or svn
2009-08-28 06:40:44 +00:00
henryk@ploetzli.ch e73e717239 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
2009-08-27 23:29:49 +00:00
henryk@ploetzli.ch 2bfed17db2 Add a common linker script with the memory map for the complete project
Use the correct physical addresses in the memory map, and instead translate the addresses during postprocessing with objcopy
2009-08-27 16:07:35 +00:00
henryk@ploetzli.ch 8652988d62 Merge linker scripts in bootrom to have a single linker script for the bootloader proper (previously known as bootrom-merged.s19)
Remove the now unnecessary files (merge-srec.pl, ldscript-ram-jtag)
Note that this drops the dependency on perl for bootrom build, so end-users who don't touch the FPGA bitstream will not need perl anymore
2009-08-27 04:25:34 +00:00
henryk@ploetzli.ch 0fc0fca583 Move most rules to Makefile.common
Add automatic dependency generation
Compile ISO14443 files in ARM mode, as was the case with the Linux Makefile before
2009-08-26 17:34:19 +00:00
henryk@ploetzli.ch 7e931bbd32 Consolidate Linux/Windows Makefiles into one, see http://www.proxmark.org/forum/topic/312/consolidating-makefile/
+ Needs GNU make for Windows, a new release of the Windows development environment will follow
 + Is based on the Windows Makefile, so will build everything in Thumb mode, doesn't have flash commands (yet)
2009-08-26 11:17:05 +00:00