From b0a0c85b4ff1865fe7082dbef5fcd9105efaaaf2 Mon Sep 17 00:00:00 2001 From: jethead71 Date: Sun, 16 Jan 2011 01:40:15 +0000 Subject: [PATCH] e200v1 seems to be ok using USB-enabled bootloader. Also, include the bootloader USB .lds into the boot.lds instead of pasting into every one to keep things sane for now-- commented upon inside. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29062 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config/sansae200.h | 3 + .../{philips/boot.lds => boot-pp502x-bl-usb.lds} | 72 +--------------------- firmware/target/arm/{sandisk => philips}/boot.lds | 14 ++--- firmware/target/arm/sandisk/boot.lds | 6 ++ .../target/arm/sandisk/sansa-e200/button-e200.c | 4 ++ 5 files changed, 19 insertions(+), 80 deletions(-) rename firmware/target/arm/{philips/boot.lds => boot-pp502x-bl-usb.lds} (69%) copy firmware/target/arm/{sandisk => philips}/boot.lds (83%) diff --git a/firmware/export/config/sansae200.h b/firmware/export/config/sansae200.h index 94e9e5b69..a6f4e5416 100644 --- a/firmware/export/config/sansae200.h +++ b/firmware/export/config/sansae200.h @@ -190,6 +190,9 @@ #define USB_VENDOR_ID 0x0781 #define USB_PRODUCT_ID 0x7421 #define HAVE_USB_HID_MOUSE +#ifdef BOOTLOADER +#define HAVE_BOOTLOADER_USB_MODE +#endif /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/target/arm/philips/boot.lds b/firmware/target/arm/boot-pp502x-bl-usb.lds similarity index 69% rename from firmware/target/arm/philips/boot.lds rename to firmware/target/arm/boot-pp502x-bl-usb.lds index 411d7b1df..30a8c0e71 100644 --- a/firmware/target/arm/philips/boot.lds +++ b/firmware/target/arm/boot-pp502x-bl-usb.lds @@ -1,7 +1,4 @@ -#include "config.h" - -/* Can't link all Philips ARM devices the same way at this time */ -#ifdef HAVE_BOOTLOADER_USB_MODE +/* Will have been included from boot.lds */ ENTRY(start) OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) @@ -137,70 +134,3 @@ SECTIONS freebufferend = .; } } - -#else /* !HAVE_BOOTLOADER_USB_MODE */ -ENTRY(start) -OUTPUT_FORMAT(elf32-littlearm) -OUTPUT_ARCH(arm) -STARTUP(target/arm/crt0-pp-bl.o) - -#define DRAMSIZE (MEMORYSIZE * 0x100000) - -#define DRAMORIG 0x10000000 -#ifndef IRAMORIG -#define IRAMORIG 0x40000000 -#endif -#define IRAMSIZE 0x20000 -#define FLASHORIG 0x001f0000 -#define FLASHSIZE 2M - -MEMORY -{ - DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE - IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE -} - -SECTIONS -{ - . = IRAMORIG; - - .text : { - *(.init.text) - *(.text*) - *(.glue_7) - *(.glue_7t) - } > IRAM - - .data : { - *(.icode) - *(.irodata) - *(.idata) - *(.data*) - *(.ncdata*) - *(.rodata*) - _dataend = . ; - } > IRAM - - .stack (NOLOAD) : { - *(.stack) - _stackbegin = .; - stackbegin = .; - . += 0x2000; - _stackend = .; - stackend = .; - } > IRAM - - /* The bss section is too large for IRAM - we just move it 16MB into the - DRAM */ - - . = DRAMORIG; - .bss . + (16*1024*1024) (NOLOAD) : { - _edata = .; - *(.bss*); - *(.ibss); - *(COMMON) - *(.ncbss*); - _end = .; - } > DRAM -} -#endif /* HAVE_BOOTLOADER_USB_MODE */ diff --git a/firmware/target/arm/sandisk/boot.lds b/firmware/target/arm/philips/boot.lds similarity index 83% copy from firmware/target/arm/sandisk/boot.lds copy to firmware/target/arm/philips/boot.lds index c0621b8ab..5d63caddb 100644 --- a/firmware/target/arm/sandisk/boot.lds +++ b/firmware/target/arm/philips/boot.lds @@ -1,5 +1,9 @@ #include "config.h" +/* Can't link all Philips ARM devices the same way at this time */ +#ifdef HAVE_BOOTLOADER_USB_MODE +#include "../boot-pp502x-bl-usb.lds" +#else /* !HAVE_BOOTLOADER_USB_MODE */ ENTRY(start) OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) @@ -7,12 +11,7 @@ STARTUP(target/arm/crt0-pp-bl.o) #define DRAMSIZE (MEMORYSIZE * 0x100000) -#ifdef SANSA_VIEW -#define DRAMORIG 0x10f00000 -#else #define DRAMORIG 0x10000000 -#endif - #ifndef IRAMORIG #define IRAMORIG 0x40000000 #endif @@ -28,11 +27,7 @@ MEMORY SECTIONS { -#ifdef C200_ERASE - . = IRAMORIG+0x4000; -#else . = IRAMORIG; -#endif .text : { *(.init.text) @@ -73,3 +68,4 @@ SECTIONS _end = .; } > DRAM } +#endif /* HAVE_BOOTLOADER_USB_MODE */ diff --git a/firmware/target/arm/sandisk/boot.lds b/firmware/target/arm/sandisk/boot.lds index c0621b8ab..4b8adc899 100644 --- a/firmware/target/arm/sandisk/boot.lds +++ b/firmware/target/arm/sandisk/boot.lds @@ -1,5 +1,10 @@ #include "config.h" +/* Can't link all Sansa PP devices the same way at this time */ +#ifdef HAVE_BOOTLOADER_USB_MODE +#include "../boot-pp502x-bl-usb.lds" +#else /* !HAVE_BOOTLOADER_USB_MODE */ + ENTRY(start) OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) @@ -73,3 +78,4 @@ SECTIONS _end = .; } > DRAM } +#endif /* HAVE_BOOTLOADER_USB_MODE */ diff --git a/firmware/target/arm/sandisk/sansa-e200/button-e200.c b/firmware/target/arm/sandisk/sansa-e200/button-e200.c index 52b894939..1e952b388 100644 --- a/firmware/target/arm/sandisk/sansa-e200/button-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/button-e200.c @@ -272,6 +272,10 @@ void clickwheel_int(void) delta = 0x7ful << 24; } } +#else +void clickwheel_int(void) +{ +} #endif /* BOOTLOADER */ /* device buttons */ -- 2.11.4.GIT