summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile2
-rw-r--r--firmware/Makefile.dfu8
-rw-r--r--firmware/src/simtrace.h20
-rw-r--r--firmware/src/start/Cstartup.S3
4 files changed, 32 insertions, 1 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 9b75b3a..57c983e 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -113,6 +113,8 @@ SRCARM += src/picc/$(TARGET).c
endif
ifeq ($(BOARD), SIMTRACE)
+SUBMDL = AT91SAM7S256
+TARGET := main_simtrace
SRCARM += src/simtrace/iso7816_uart.c src/simtrace/tc_etu.c
SRCARM += src/simtrace/$(TARGET).c
endif
diff --git a/firmware/Makefile.dfu b/firmware/Makefile.dfu
index 45a042e..dbe9b35 100644
--- a/firmware/Makefile.dfu
+++ b/firmware/Makefile.dfu
@@ -174,6 +174,14 @@ ADEFS += -DPCD
CINCS = -Isrc/pcd
endif
+ifeq ($(BOARD),SIMTRACE)
+SUBMDL = AT91SAM7S256
+CDEFS += -DSIMTRACE
+ADEFS += -DSIMTRACE
+CINCS = -Isrc/simtrace
+endif
+
+
# Place -I options here
CINCS += -Iinclude -Isrc
diff --git a/firmware/src/simtrace.h b/firmware/src/simtrace.h
index e787dff..d7faa96 100644
--- a/firmware/src/simtrace.h
+++ b/firmware/src/simtrace.h
@@ -4,13 +4,31 @@
#ifdef SIMTRACE
#define OPENPCD_PIO_LED2 AT91C_PIO_PA17
#define OPENPCD_PIO_LED1 AT91C_PIO_PA18
-#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA24
+#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA29
#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA16
#define USB_PRODUCT_ID SIMTRACE_PRODUCT_ID
#else
#error "unknown PCB"
#endif
+/* 7816 UART for SIM-card side */
#define SIMTRACE_PIO_CLK AT91C_PA2_SCK0
#define SIMTRACE_PIO_IO AT91C_PA6_TXD0
#define SIMTRACE_PIO_nRST AT91C_PIO_PA7
+#define SIMTRACE_PIO_SW_SIM AT91C_PIO_PA8
+
+/* 7816 UART for phone side */
+#define SIMTRACE_PIO_nRST_PH AT91C_PIO_PA24
+#define SIMTRACE_PIO_CLK_PH AT91C_PIO_PA23
+#define SIMTRACE_PIO_IO_PH AT91C_PIO_PA22
+
+/* bus switch for SIM card connection */
+#define SIMTRACE_PIO_SC_SW AT91C_PIO_PA20
+#define SIMTRACE_PIO_IO_SW AT91C_PIO_PA19
+
+/* SPI flash */
+#define PIO_SPIF_nWP AT91C_PIO_PA15
+#define PIO_SPIF_SCK AT91C_PIO_PA14
+#define PIO_SPIF_MOSI AT91C_PIO_PA13
+#define PIO_SPIF_MISO AT91C_PIO_PA12
+#define PIO_SPIF_nCS AT91C_PIO_PA11
diff --git a/firmware/src/start/Cstartup.S b/firmware/src/start/Cstartup.S
index a28b400..e262b8f 100644
--- a/firmware/src/start/Cstartup.S
+++ b/firmware/src/start/Cstartup.S
@@ -98,6 +98,9 @@
/* Olimex SAM7-Pxxx boards have a button B1 on PA19 that is low-active */
.equ PIO_BOOTLDR, (1 << 19)
#define CONFIG_DFU_SWITCH_INV
+#elif defined(SIMTRACE)
+ .equ PIO_BOOTLDR, (1 << 31)
+#define CONFIG_DFU_SWITCH_INV
#else
#error please define PIO_BOOTLDR for your board
#endif
personal git repositories of Harald Welte. Your mileage may vary