summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-02-23 23:22:03 +0000
committerDave Chapman <dave@dchapman.com>2007-02-23 23:22:03 +0000
commitfda1498696258d91d950ca4260daa76e536dcce0 (patch)
tree4cc50527b5a79bd69427a8ba3e25dfc4587685f5 /apps/debug_menu.c
parent87865a52278d71333011794b09ad3791ca20a791 (diff)
downloadrockbox-fda1498696258d91d950ca4260daa76e536dcce0.zip
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.gz
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.bz2
rockbox-fda1498696258d91d950ca4260daa76e536dcce0.tar.xz
Remap flash ROM to 0x20000000 on the ipods and H10s, and implement dbg_save_roms() in the debug menu for those targets to dump the content to a file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12467 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index a27ea50..e25abca 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1983,6 +1983,24 @@ static bool dbg_save_roms(void)
return false;
}
+#elif defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB)
+static bool dbg_save_roms(void)
+{
+ int fd;
+
+#if defined(IPOD_ARCH)
+ fd = creat("/internal_rom_000000-0FFFFF.bin");
+#elif defined(IRIVER_H10)
+ fd = creat("/internal_rom_000000-3FFFFF.bin");
+#endif
+ if(fd >= 0)
+ {
+ write(fd, (void *)0x20000000, FLASH_SIZE);
+ close(fd);
+ }
+
+ return false;
+}
#endif /* CPU */
#ifndef SIMULATOR
@@ -2305,7 +2323,8 @@ bool debug_menu(void)
{ "Button Light modes", dbg_buttonlights },
#endif
-#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE)
+#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \
+ defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB)
{ "Dump ROM contents", dbg_save_roms },
#endif
#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP)