aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/zpu/usrp2p/bootloader/icap_test.c
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-22 19:19:14 -0800
committerJosh Blum <josh@joshknows.com>2010-12-22 19:19:14 -0800
commit22ed61f97815856bf74cec25ae6bca88bfbe5f44 (patch)
tree7d87d49b46f9507ff10486097e6d79e4bee4cb81 /firmware/zpu/usrp2p/bootloader/icap_test.c
parent71fc99d006f2347a356c5339905593f64ff902ec (diff)
downloaduhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.tar.gz
uhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.tar.bz2
uhd-22ed61f97815856bf74cec25ae6bca88bfbe5f44.zip
zpu: renamed the directory for the usrp2 fw to zpu to reflect the cpu type
Diffstat (limited to 'firmware/zpu/usrp2p/bootloader/icap_test.c')
-rw-r--r--firmware/zpu/usrp2p/bootloader/icap_test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/firmware/zpu/usrp2p/bootloader/icap_test.c b/firmware/zpu/usrp2p/bootloader/icap_test.c
new file mode 100644
index 000000000..5feb9d014
--- /dev/null
+++ b/firmware/zpu/usrp2p/bootloader/icap_test.c
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ */
+
+#include <memory_map.h>
+#include <hal_io.h>
+#include <xilinx_s3_icap.h>
+#include <nonstdio.h>
+
+void delay(uint32_t t) {
+ while(t-- != 0) asm("NOP");
+}
+
+
+int main(int argc, char *argv[]) {
+ pic_init();
+ hal_uart_init();
+ puts("\nStarting delay...\n");
+
+ output_regs->leds = 0xFF;
+ delay(4000000);
+ output_regs->leds = 0x00;
+ delay(4000000);
+
+ puts("Rebooting FPGA to 0x00000000\n");
+ icap_reload_fpga((uint32_t)0x00000000);
+
+ return 0;
+}