# HG changeset patch # User Michael Spacefalcon # Date 1374861109 0 # Node ID e2698daf40d1a7e12263c49a54f9e594a699cd71 # Parent 8387dcba945d74150b9ad2af90ac139956089639 dieid implemented in fc-loadtool as well diff -r 8387dcba945d -r e2698daf40d1 loadtools/Makefile --- a/loadtools/Makefile Fri Jul 26 06:41:24 2013 +0000 +++ b/loadtools/Makefile Fri Jul 26 17:51:49 2013 +0000 @@ -11,7 +11,7 @@ LOADTOOL_OBJS= crc32tab.o defpath.o flerase.o flprogbin.o flutil.o hexdecode.o\ hwparam.o labaud.o ltdispatch.o ltdump.o ltexit.o ltflash.o \ - ltmain.o ltpassthru.o ltscript.o romload.o sercomm.o \ + ltmain.o ltmisc.o ltpassthru.o ltscript.o romload.o sercomm.o \ srecreader.o tpinterf.o tpinterf2.o tpinterf3.o XRAM_OBJS= chainload.o clmain.o defpath.o hexdecode.o hwparam.o \ diff -r 8387dcba945d -r e2698daf40d1 loadtools/ltdispatch.c --- a/loadtools/ltdispatch.c Fri Jul 26 06:41:24 2013 +0000 +++ b/loadtools/ltdispatch.c Fri Jul 26 17:51:49 2013 +0000 @@ -10,6 +10,7 @@ extern int cmd_baud(); extern int cmd_crc32(); +extern int cmd_dieid(); extern int cmd_dump2bin(); extern int cmd_dump2srec(); extern int cmd_exec(); @@ -25,6 +26,7 @@ } cmdtab[] = { {"baud", 0, 1, cmd_baud}, {"crc32", 2, 2, cmd_crc32}, + {"dieid", 0, 0, cmd_dieid}, {"dump", 2, 2, loadtool_cmd_passthru}, {"dump2bin", 3, 3, cmd_dump2bin}, {"dump2srec", 3, 3, cmd_dump2srec}, diff -r 8387dcba945d -r e2698daf40d1 loadtools/ltmisc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/loadtools/ltmisc.c Fri Jul 26 17:51:49 2013 +0000 @@ -0,0 +1,23 @@ +/* + * This module is a place to implement little miscellaneous fc-loadtool + * commands which don't belong anywhere else. + */ + +#include +#include +#include + +cmd_dieid() +{ + uint32_t addr; + uint16_t data; + int stat; + + for (addr = 0xFFFEF010; addr <= 0xFFFEF016; addr += 2) { + stat = do_r16(addr, &data); + if (stat) + return(stat); + printf("%08lX: %04X\n", (u_long)addr, (int)data); + } + return(0); +}