From: d18c7db Date: Wed, 29 Jul 2009 13:37:09 +0000 (+0000) Subject: Reduced the size of BigBuf to make more room for stack/vars X-Git-Tag: v1.0.0~536 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/0422e2a47109a7845998c2130ae40c6d04e56d09?ds=inline Reduced the size of BigBuf to make more room for stack/vars --- diff --git a/armsrc/Makefile b/armsrc/Makefile index 1c73054a..8ad442f1 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -37,12 +37,12 @@ all: osimage.s19 $(OBJDIR)/fpgaimage.s19: $(OBJDIR)/fpgaimg.o @echo obj/fpgaimage.s19 - @$(LD) -g -Tldscript-fpga -o $(OBJDIR)\fpgaimage.elf $(OBJDIR)/fpgaimg.o + @$(LD) -g -Tldscript-fpga -o $(OBJDIR)\fpgaimage.elf -Map=obj/fpgaimage.map $(OBJDIR)/fpgaimg.o @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\fpgaimage.elf $(OBJDIR)\fpgaimage.s19 $(OBJDIR)/osimage.s19: $(OBJ) $(OBJCOMMON) @echo obj/osimage.s19 - @$(LD) -g -Tldscript -o $(OBJDIR)\osimage.elf $(OBJ) $(OBJCOMMON) $(LIB)\libgcc.a + @$(LD) -g -Tldscript -o $(OBJDIR)\osimage.elf $(OBJ) $(OBJCOMMON) -Map=obj/osimage.map $(LIB)\libgcc.a @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\osimage.elf $(OBJDIR)\osimage.s19 osimage.s19: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19 diff --git a/armsrc/apps.h b/armsrc/apps.h index 11084ad7..af6006e7 100644 --- a/armsrc/apps.h +++ b/armsrc/apps.h @@ -9,7 +9,7 @@ // The large multi-purpose buffer, typically used to hold A/D samples, // maybe processed in some way. -DWORD BigBuf[16000]; +DWORD BigBuf[10000]; /// appmain.h void ReadMem(int addr); diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 9fe60de8..6ac4e725 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -123,6 +123,7 @@ void AcquireTiType(void) int n = 1250; // clear buffer + DbpIntegers((DWORD)BigBuf, sizeof(BigBuf), 0x12345678); memset(BigBuf,0,sizeof(BigBuf)); // Set up the synchronous serial port @@ -218,17 +219,6 @@ void AcquireRawBitsTI(void) FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); } -// this is a dummy function to get around -// a possible flash bug in the bootloader -// delete once you've added more code. -void DummyDummyDummy(void) -{ - FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 88); //134.8Khz - FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_PASSTHRU); - AcquireTiType(); - FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); -} - // arguments: 64bit data split into 32bit idhi:idlo and optional 16bit crc // if crc provided, it will be written with the data verbatim (even if bogus) // if not provided a valid crc will be computed from the data and written. diff --git a/bootrom/Makefile b/bootrom/Makefile index e18737c3..7a61cadb 100644 --- a/bootrom/Makefile +++ b/bootrom/Makefile @@ -24,12 +24,12 @@ bootrom.s19: $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19 $(OBJDIR)/bootrom.s19: $(OBJFLASH) @echo obj/bootrom.s19 - @$(LD) -g -Tldscript-flash --oformat elf32-littlearm -o $(OBJDIR)/bootrom.elf $(OBJFLASH) + @$(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=obj/bootrom.map -o $(OBJDIR)/bootrom.elf $(OBJFLASH) @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/bootrom.elf $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19: $(OBJJTAG) @echo obj/bootrom-forjtag.s19 - @$(LD) -g -Tldscript-ram-jtag --oformat elf32-littlearm -o $(OBJDIR)/bootrom-forjtag.elf $(OBJJTAG) + @$(LD) -g -Tldscript-ram-jtag --oformat elf32-littlearm -Map=obj/bootrom-forjtag.map -o $(OBJDIR)/bootrom-forjtag.elf $(OBJJTAG) @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/bootrom-forjtag.elf $(OBJDIR)/bootrom-forjtag.s19 $(OBJDIR)/bootrom.o: bootrom.c $(INCLUDES) diff --git a/winsrc/prox.cpp b/winsrc/prox.cpp index e2c0a79c..bbc9adbd 100644 --- a/winsrc/prox.cpp +++ b/winsrc/prox.cpp @@ -194,6 +194,7 @@ void SendCommand(UsbCommand *c, BOOL wantAck) DWORD written; OVERLAPPED ov; + memset(&ov, 0, sizeof(ov)); WriteFile(UsbHandle, buf, 65, &written, &ov); if(GetLastError() != ERROR_IO_PENDING) { @@ -229,8 +230,6 @@ static void FlushPrevious(void) UsbCommand c; memset(&c, 0, sizeof(c)); - printf("expected = %08x flush, ", ExpectedAddr); - int i; for(i = 0; i < 240; i += 48) { c.cmd = CMD_SETUP_WRITE; @@ -241,7 +240,7 @@ static void FlushPrevious(void) c.cmd = CMD_FINISH_WRITE; c.ext1 = (ExpectedAddr-1) & (~255); - printf("c.ext1 = %08x\r", c.ext1); + printf("Flashing address: %08x\r", c.ext1); memcpy(c.d.asBytes, QueuedToSend+240, 16); SendCommand(&c, TRUE);