Commit f3dafc70 authored by Alessandro Rubini's avatar Alessandro Rubini

tools: initial wrpc-dump, still bugged

The tool is meant to print internal data structures of the wrpc,
by running either on a dump file or a live system.

The code is an edited copy of wr-switch-sw/userspace/tools/wrs_dump_shmem.c,
so the data-dumping mechanism is from there.

bugs at this point:
   - all endianness stuff is bad (in wrs it was local, here we cross-dump)
   - data sizes are wrong (see next commit)
   - we miss checks for consistency
   - we can't open /dev/mem (for spec for example) or a elf file
   - docs are missing too
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent c31bcc0b
......@@ -9,3 +9,4 @@ sdb-wrpc.bin
flash-read
flash-write
pfilter-builder
wrpc-dump
\ No newline at end of file
......@@ -6,6 +6,7 @@ LDFLAGS = -lutil
ALL = genraminit genramvhd genrammif wrpc-uart-sw
ALL += wrpc-w1-read wrpc-w1-write
ALL += pfilter-builder
ALL += wrpc-dump
ifneq ($(EB),no)
ALL += eb-w1-write
......@@ -41,5 +42,11 @@ eb-w1-write: eb-w1-write.c ../dev/w1.c ../dev/w1-eeprom.c eb-w1.c
sdb-wrpc.bin: sdbfs
$(SDBFS)/gensdbfs $< $@
wrpc-dump: wrpc-dump.c
$(CC) $(CFLAGS) -I../ppsi/include -I../ppsi/arch-wrpc/include \
-I ../sdb-lib \
$^ -o $@
clean:
rm -f $(ALL) *.o *~
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment