changeset 69:8387dcba945d

pirexplore: dieid command implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 26 Jul 2013 06:41:24 +0000
parents a323b4cc69e6
children e2698daf40d1
files target-utils/libcommon/Makefile target-utils/libcommon/cmd_dieid.c target-utils/pirexplore/cmdtab.c
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/libcommon/Makefile	Fri Jul 26 05:33:33 2013 +0000
+++ b/target-utils/libcommon/Makefile	Fri Jul 26 06:41:24 2013 +0000
@@ -5,8 +5,8 @@
 RANLIB=	arm-elf-ranlib
 
 OBJS=	cmdentry.o dispatch.o hexarg.o parseargs.o serio.o serflush.o uartsel.o\
-	cmd_baud_switch.o cmd_jump.o cmd_r8.o cmd_r16.o cmd_r32.o cmd_w8.o \
-	cmd_w16.o cmd_w32.o
+	cmd_baud_switch.o cmd_dieid.o cmd_jump.o cmd_r8.o cmd_r16.o cmd_r32.o \
+	cmd_w8.o cmd_w16.o cmd_w32.o
 
 all:	libcommon.a
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/target-utils/libcommon/cmd_dieid.c	Fri Jul 26 06:41:24 2013 +0000
@@ -0,0 +1,10 @@
+#include "types.h"
+
+void
+cmd_dieid()
+{
+	u32 addr;
+
+	for (addr = 0xFFFEF010; addr <= 0xFFFEF016; addr += 2)
+		printf("%08X: %04X\n", addr, *(volatile u16 *)addr);
+}
--- a/target-utils/pirexplore/cmdtab.c	Fri Jul 26 05:33:33 2013 +0000
+++ b/target-utils/pirexplore/cmdtab.c	Fri Jul 26 06:41:24 2013 +0000
@@ -1,6 +1,7 @@
 #include "cmdtab.h"
 
 extern void cmd_baud_switch();
+extern void cmd_dieid();
 extern void cmd_jump();
 extern void cmd_r8();
 extern void cmd_r16();
@@ -11,6 +12,7 @@
 
 const struct cmdtab cmdtab[] = {
 	{"baud", cmd_baud_switch},
+	{"dieid", cmd_dieid},
 	{"jump", cmd_jump},
 	{"r8", cmd_r8},
 	{"r16", cmd_r16},