FreeCalypso > hg > freecalypso-sw
changeset 70:e2698daf40d1
dieid implemented in fc-loadtool as well
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 26 Jul 2013 17:51:49 +0000 |
parents | 8387dcba945d |
children | 0c1480317c18 |
files | loadtools/Makefile loadtools/ltdispatch.c loadtools/ltmisc.c |
diffstat | 3 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 \
--- 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},
--- /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 <sys/types.h> +#include <stdio.h> +#include <stdint.h> + +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); +}