diff options
author | Torne Wuff <torne@wolfpuppy.org.uk> | 2009-10-16 16:08:11 +0000 |
---|---|---|
committer | Torne Wuff <torne@wolfpuppy.org.uk> | 2009-10-16 16:08:11 +0000 |
commit | 799246e22768a516e074ac1896adcac7e64763ad (patch) | |
tree | 1bb2e934ff4b599f4a00f07b582b6445b3f350ea /apps/debug_menu.c | |
parent | d555de12453ee042b9f6aa0e4f9b3d26666a7b63 (diff) |
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.c | 17 |
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) return false; } +#elif CONFIG_CPU == IMX31L +static bool dbg_save_roms(void) +{ + int fd; + + fd = creat("/flash_rom_A0000000-A01FFFFF.bin"); + if (fd >= 0) + { + write(fd, (void*)0xa0000000, FLASH_SIZE); + close(fd); + } + + return false; +} #endif /* CPU */ #ifndef SIMULATOR @@ -2709,7 +2723,8 @@ struct the_menu_item { }; static const struct the_menu_item menuitems[] = { #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ - (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) + (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \ + CONFIG_CPU == IMX31L { "Dump ROM contents", dbg_save_roms }, #endif #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ |