summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorTorne Wuff <torne@wolfpuppy.org.uk>2009-10-16 16:08:11 +0000
committerTorne Wuff <torne@wolfpuppy.org.uk>2009-10-16 16:08:11 +0000
commit799246e22768a516e074ac1896adcac7e64763ad (patch)
tree1bb2e934ff4b599f4a00f07b582b6445b3f350ea /apps/debug_menu.c
parentd555de12453ee042b9f6aa0e4f9b3d26666a7b63 (diff)
downloadrockbox-799246e22768a516e074ac1896adcac7e64763ad.tar.gz
rockbox-799246e22768a516e074ac1896adcac7e64763ad.zip
Gigabeat S: Add support for dumping the flash from debug menu
Also, changed FLASH_SIZE for the S to 2MB rather than 4MB as all available evidence suggests it's right. Flyspray: FS#10410 (by me) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23203 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 1ea27b4f75..7aed5edd70 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2373,6 +2373,20 @@ static bool dbg_save_roms(void)
2373 2373
2374 return false; 2374 return false;
2375} 2375}
2376#elif CONFIG_CPU == IMX31L
2377static bool dbg_save_roms(void)
2378{
2379 int fd;
2380
2381 fd = creat("/flash_rom_A0000000-A01FFFFF.bin");
2382 if (fd >= 0)
2383 {
2384 write(fd, (void*)0xa0000000, FLASH_SIZE);
2385 close(fd);
2386 }
2387
2388 return false;
2389}
2376#endif /* CPU */ 2390#endif /* CPU */
2377 2391
2378#ifndef SIMULATOR 2392#ifndef SIMULATOR
@@ -2709,7 +2723,8 @@ struct the_menu_item {
2709}; 2723};
2710static const struct the_menu_item menuitems[] = { 2724static const struct the_menu_item menuitems[] = {
2711#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ 2725#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \
2712 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) 2726 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \
2727 CONFIG_CPU == IMX31L
2713 { "Dump ROM contents", dbg_save_roms }, 2728 { "Dump ROM contents", dbg_save_roms },
2714#endif 2729#endif
2715#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ 2730#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \