aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/test/Makefile
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-11-09 00:50:54 +0100
committerHarald Welte <laforge@gnumonks.org>2015-11-09 00:50:54 +0100
commit9d3e38242cfd3aa9a6f665851ad0bf43d3f57e75 (patch)
treef053a734ccb0db944f9fb003732649b055905c5b /firmware/test/Makefile
parentf64f68871ef4bc81236bdbc326098cb3f323f99a (diff)
initial commit of more code towards card emulation
I couldn't help but to spend my sunday on working towards card emulation, including * various state machines in the target about ISO7816 states * tc_etu timer import from simtrace1 * req_ctx import from simtrace1 (needs renaming and simplifiation) * USB protocol description as cardemu_prot.h * some host-based testing code to test the state machines The code seems to work fine throughout card reset, sending ATR and receiving the TPDU header of the first APDU, up to the point where it marks the TPDU header as to-be-transmitted over th bulk-in endpoint. Sending the ATR must be done inside the firmware for timing requirements. From that point onwards, the host needs to respond at the very least with a procedure byte, and some indication whether or not the card emulator should continue to transmit data (card->reader), or receive data (reader->card). The code is intentionally not hooked up yet with the USB logic nor with the UART. I want host-based testing completed before doing that.
Diffstat (limited to 'firmware/test/Makefile')
-rw-r--r--firmware/test/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/test/Makefile b/firmware/test/Makefile
new file mode 100644
index 0000000..eb6d61f
--- /dev/null
+++ b/firmware/test/Makefile
@@ -0,0 +1,13 @@
+CFLAGS=-g -Wall -I../src_simtrace -I.
+
+VPATH=../src_simtrace
+
+card_emu_test: card_emu_tests.hobj card_emu.hobj req_ctx.hobj iso7816_fidi.hobj
+ $(CC) $(LDFLAGS) -o $@ $^
+
+%.hobj: %.c
+ $(CC) $(CFLAGS) -o $@ -c $^
+
+clean:
+ @rm -f *.hobj
+ @rm -f card_emu_test