From 799246e22768a516e074ac1896adcac7e64763ad Mon Sep 17 00:00:00 2001 From: Torne Wuff Date: Fri, 16 Oct 2009 16:08:11 +0000 Subject: 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 --- apps/debug_menu.c | 17 ++++++++++++++++- firmware/export/config-gigabeat-s.h | 2 +- 2 files changed, 17 insertions(+), 2 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) \ diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h index ae57825388..2939ecb693 100644 --- a/firmware/export/config-gigabeat-s.h +++ b/firmware/export/config-gigabeat-s.h @@ -162,7 +162,7 @@ #define HAVE_POWEROFF_WHILE_CHARGING /* The size of the flash ROM */ -#define FLASH_SIZE 0x400000 +#define FLASH_SIZE 0x200000 /* Define this to the CPU frequency */ /* TODO */ -- cgit v1.2.3