summaryrefslogtreecommitdiffstats
path: root/bootloader/ondavx747.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-30 10:24:39 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-30 10:24:39 +0000
commit06efd071a9be5158f527828975fbd78eac5e642f (patch)
treefefe2e92ef987561276b2302f2e6962dbd19c241 /bootloader/ondavx747.c
parent0a35976a61d42c1d85178418ebdca42b811c9b61 (diff)
downloadrockbox-06efd071a9be5158f527828975fbd78eac5e642f.tar.gz
rockbox-06efd071a9be5158f527828975fbd78eac5e642f.tar.bz2
rockbox-06efd071a9be5158f527828975fbd78eac5e642f.zip
Updated bootloader containing more debug information
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18151 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ondavx747.c')
-rw-r--r--bootloader/ondavx747.c38
1 files changed, 28 insertions, 10 deletions
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index 6400ccd9cd..dd1852a162 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -148,27 +148,41 @@ int main(void)
printf("REG_EMC_SACR4: 0x%x", REG_EMC_SACR4 >> EMC_SACR_BASE_BIT);
printf("REG_EMC_DMAR0: 0x%x", REG_EMC_DMAR0 >> EMC_DMAR_BASE_BIT);
unsigned int cpu_id = read_c0_prid();
- printf("CPU_ID: (0x%x)", cpu_id);
+ printf("CPU_ID: 0x%x", cpu_id);
printf(" * Company ID: 0x%x", (cpu_id >> 16) & 7);
printf(" * Processor ID: 0x%x", (cpu_id >> 8) & 7);
printf(" * Revision ID: 0x%x", cpu_id & 7);
+ unsigned int config_data = read_c0_config();
+ printf("C0_CONFIG: 0x%x", config_data);
+ printf(" * Architecture type: 0x%x", (config_data >> 13) & 3);
+ printf(" * Architecture revision: 0x%x", (config_data >> 10) & 7);
+ printf(" * MMU type: 0x%x", (config_data >> 7) & 7);
+ printf("C0_CONFIG1: 0x%x", read_c0_config1());
+ if(read_c0_config1() & (1 << 0)) printf(" * FP available");
+ if(read_c0_config1() & (1 << 1)) printf(" * EJTAG available");
+ if(read_c0_config1() & (1 << 2)) printf(" * MIPS-16 available");
+ if(read_c0_config1() & (1 << 4)) printf(" * Performace counters available");
+ if(read_c0_config1() & (1 << 5)) printf(" * MDMX available");
+ if(read_c0_config1() & (1 << 6)) printf(" * CP2 available");
+ printf("C0_STATUS: 0x%x", read_c0_status());
while(1)
{
btn = button_read_device(&touch);
- if(btn & BUTTON_VOL_DOWN)
- printf("BUTTON_VOL_DOWN");
- if(btn & BUTTON_MENU)
- printf("BUTTON_MENU");
- if(btn & BUTTON_VOL_UP)
- printf("BUTTON_VOL_UP");
- if(btn & BUTTON_POWER)
- printf("BUTTON_POWER");
+#define KNOP(x,y) lcd_set_foreground(LCD_BLACK); \
+ if(btn & x) \
+ lcd_set_foreground(LCD_WHITE); \
+ lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*strlen(#x), LCD_HEIGHT-SYSFONT_HEIGHT*y, #x);
+ KNOP(BUTTON_VOL_UP, 5);
+ KNOP(BUTTON_VOL_DOWN, 6);
+ KNOP(BUTTON_MENU, 7);
+ KNOP(BUTTON_POWER, 8);
+ lcd_set_foreground(LCD_WHITE);
if(button_hold())
{
printf("BUTTON_HOLD");
asm("break 7");
}
- if(touch != 0)
+ if(btn & BUTTON_TOUCH)
{
lcd_set_foreground(LCD_RGBPACK(touch & 0xFF, (touch >> 8)&0xFF, (touch >> 16)&0xFF));
lcd_fillrect((touch>>16)-5, (touch&0xFFFF)-5, 10, 10);
@@ -180,6 +194,10 @@ int main(void)
lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*strlen(datetime), LCD_HEIGHT-SYSFONT_HEIGHT, datetime);
snprintf(datetime, 30, "%d", REG_TCU_TCNT0);
lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*strlen(datetime), LCD_HEIGHT-SYSFONT_HEIGHT*2, datetime);
+ snprintf(datetime, 30, "X: %d Y: %d", touch>>16, touch & 0xFFFF);
+ lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*strlen(datetime), LCD_HEIGHT-SYSFONT_HEIGHT*3, datetime);
+ snprintf(datetime, 30, "%d", read_c0_count());
+ lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*strlen(datetime), LCD_HEIGHT-SYSFONT_HEIGHT*4, datetime);
lcd_update();
}