[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5808 - gnuradio/branches/developers/matt/u2f/firmware
From: |
matt |
Subject: |
[Commit-gnuradio] r5808 - gnuradio/branches/developers/matt/u2f/firmware |
Date: |
Thu, 21 Jun 2007 14:38:57 -0600 (MDT) |
Author: matt
Date: 2007-06-21 14:38:57 -0600 (Thu, 21 Jun 2007)
New Revision: 5808
Modified:
gnuradio/branches/developers/matt/u2f/firmware/Makefile
gnuradio/branches/developers/matt/u2f/firmware/memory_map.h
gnuradio/branches/developers/matt/u2f/firmware/sim_io.h
gnuradio/branches/developers/matt/u2f/firmware/test1_main.c
Log:
moved printout addresses, added buffer code
Modified: gnuradio/branches/developers/matt/u2f/firmware/Makefile
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/Makefile 2007-06-21
17:28:55 UTC (rev 5807)
+++ gnuradio/branches/developers/matt/u2f/firmware/Makefile 2007-06-21
20:38:57 UTC (rev 5808)
@@ -8,11 +8,15 @@
%.rom : %.bin
hexdump -v -e'1/1 "%.2X\n"' $< > $@
+%.dump : %.exe
+ mb-objdump -DSCs $< > $@
+
.PRECIOUS : %.bin
ROMS = oldflash.rom test1.rom
+DUMPS = test1.dump
-all: $(ROMS)
+all: $(ROMS) $(DUMPS)
oldflash.exe: oldbootstrap.o spi.o sim_io.o
$(CC) $^ -o $@
@@ -21,7 +25,7 @@
$(CC) $^ -o $@
clean:
- rm -f *.o *.bin *.rom *.exe
+ rm -f *.o *.bin *.rom *.exe *.dump
install-sim: all
cp -a *.rom ../top/u2_sim
Modified: gnuradio/branches/developers/matt/u2f/firmware/memory_map.h
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/memory_map.h 2007-06-21
17:28:55 UTC (rev 5807)
+++ gnuradio/branches/developers/matt/u2f/firmware/memory_map.h 2007-06-21
20:38:57 UTC (rev 5808)
@@ -11,7 +11,17 @@
/////////////////////////////////////////////////////
// Buffer RAM, Slave 1
#define BUFFER_BASE 0x4000
+#define BUFFER_SIZE 0x0200 // Buffer size in 32-bit lines
+#define BUFFER_0 0x0000
+#define BUFFER_1 0x0800
+#define BUFFER_2 0x1000
+#define BUFFER_3 0x1800
+#define BUFFER_4 0x2000
+#define BUFFER_5 0x2800
+#define BUFFER_6 0x3000
+#define BUFFER_7 0x3800
+
/////////////////////////////////////////////////////
// SPI Core, Slave 2. See core docs for more info
#define SPI_BASE 0x8000 // Base address (16-bit)
Modified: gnuradio/branches/developers/matt/u2f/firmware/sim_io.h
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/sim_io.h 2007-06-21
17:28:55 UTC (rev 5807)
+++ gnuradio/branches/developers/matt/u2f/firmware/sim_io.h 2007-06-21
20:38:57 UTC (rev 5808)
@@ -26,7 +26,7 @@
static inline void
sim_puthex(unsigned long x)
{
- volatile unsigned long *p = (unsigned long *) 0xE000;
+ volatile unsigned long *p = (unsigned long *) 0xC000;
*p = x;
}
@@ -34,7 +34,7 @@
static inline void
sim_puthex_nl(unsigned long x)
{
- volatile unsigned long *p = (unsigned long *) 0xE100;
+ volatile unsigned long *p = (unsigned long *) 0xC100;
*p = x;
}
@@ -42,7 +42,7 @@
static inline void
sim_putc(unsigned char s)
{
- volatile unsigned long *p = (unsigned long *) 0xE004;
+ volatile unsigned long *p = (unsigned long *) 0xC004;
*p = s;
}
@@ -50,7 +50,7 @@
static inline void
sim_putc_nl(unsigned char s)
{
- volatile unsigned long *p = (unsigned long *) 0xE104;
+ volatile unsigned long *p = (unsigned long *) 0xC104;
*p = s;
}
@@ -58,7 +58,7 @@
static inline void
sim_newline(void)
{
- volatile unsigned long *p = (unsigned long *) 0xE008;
+ volatile unsigned long *p = (unsigned long *) 0xC008;
*p = 0;
}
Modified: gnuradio/branches/developers/matt/u2f/firmware/test1_main.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/test1_main.c 2007-06-21
17:28:55 UTC (rev 5807)
+++ gnuradio/branches/developers/matt/u2f/firmware/test1_main.c 2007-06-21
20:38:57 UTC (rev 5808)
@@ -16,7 +16,23 @@
i++;
}
#endif
+
+ int i;
+ // Write to buffer 0
+ int *buf = (int *)(BUFFER_BASE + BUFFER_0);
+ for(i=0;i<BUFFER_SIZE;i++)
+ buf[i] = i;
+
+ sim_puts("Filled buffer 0\n");
+
+ // Write to buffer 1
+ int *buffer = (int *)(BUFFER_BASE + BUFFER_1);
+ for(i=0;i<BUFFER_SIZE;i++)
+ buf[i] = i + ((i^0xFFFF) << 16);
+
+ sim_puts("Filled buffer 1\n");
+
// Control LEDs
while(1) {
output_regs->leds = 0x00;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5808 - gnuradio/branches/developers/matt/u2f/firmware,
matt <=