summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-10-29 20:12:28 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-10-29 20:12:28 +0000
commitff7931ebd43c829330c5985ab1d89e6d5cb5b595 (patch)
tree615765f1df0704b6d4e682f9f13a20d23261aac9 /apps/debug_menu.c
parentaca1d8b50b24d2f4e655edae48d7f9e0205b2ab7 (diff)
downloadrockbox-ff7931ebd43c829330c5985ab1d89e6d5cb5b595.tar.gz
rockbox-ff7931ebd43c829330c5985ab1d89e6d5cb5b595.zip
Implement dbg_save_roms for TCC780x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23408 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index a0b285ae79..a9c4435e9b 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -118,8 +118,8 @@
118#include "pmu-target.h" 118#include "pmu-target.h"
119#endif 119#endif
120 120
121#ifdef HAVE_USBSTACK 121#ifdef HAVE_USBSTACK
122#include "usb_core.h" 122#include "usb_core.h"
123#endif 123#endif
124 124
125/*---------------------------------------------------*/ 125/*---------------------------------------------------*/
@@ -1130,8 +1130,8 @@ bool dbg_ports(void)
1130#if defined(IPOD_ACCESSORY_PROTOCOL) 1130#if defined(IPOD_ACCESSORY_PROTOCOL)
1131extern unsigned char serbuf[]; 1131extern unsigned char serbuf[];
1132 lcd_putsf(0, line++, "IAP PACKET: %02x %02x %02x %02x %02x %02x %02x %02x", 1132 lcd_putsf(0, line++, "IAP PACKET: %02x %02x %02x %02x %02x %02x %02x %02x",
1133 serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5], 1133 serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5],
1134 serbuf[6], serbuf[7]); 1134 serbuf[6], serbuf[7]);
1135#endif 1135#endif
1136 1136
1137#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) 1137#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB)
@@ -2207,6 +2207,20 @@ static bool dbg_save_roms(void)
2207 2207
2208 return false; 2208 return false;
2209} 2209}
2210#elif defined(CPU_TCC780X)
2211static bool dbg_save_roms(void)
2212{
2213 int fd;
2214
2215 fd = creat("/eeprom_E0000000-E0001FFF.bin");
2216 if (fd >= 0)
2217 {
2218 write(fd, (void*)0xe0000000, 0x2000);
2219 close(fd);
2220 }
2221
2222 return false;
2223}
2210#endif /* CPU */ 2224#endif /* CPU */
2211 2225
2212#ifndef SIMULATOR 2226#ifndef SIMULATOR
@@ -2536,7 +2550,7 @@ struct the_menu_item {
2536static const struct the_menu_item menuitems[] = { 2550static const struct the_menu_item menuitems[] = {
2537#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ 2551#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \
2538 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \ 2552 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \
2539 CONFIG_CPU == IMX31L 2553 CONFIG_CPU == IMX31L || defined(CPU_TCC780X)
2540 { "Dump ROM contents", dbg_save_roms }, 2554 { "Dump ROM contents", dbg_save_roms },
2541#endif 2555#endif
2542#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ 2556#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \