diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-01-16 01:40:15 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-01-16 01:40:15 +0000 |
commit | 76083359e08c85f28874a7c07e5332fda2a5b503 (patch) | |
tree | 42391d30379f71a8636e9a4e357acd4166c034bd | |
parent | 5bf25bbd4fbf69e9424691fa4ba0383722a72ac4 (diff) | |
download | rockbox-76083359e08c85f28874a7c07e5332fda2a5b503.tar.gz rockbox-76083359e08c85f28874a7c07e5332fda2a5b503.zip |
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
-rw-r--r-- | firmware/export/config/sansae200.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/boot-pp502x-bl-usb.lds | 136 | ||||
-rw-r--r-- | firmware/target/arm/philips/boot.lds | 137 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/boot.lds | 6 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/button-e200.c | 4 |
5 files changed, 150 insertions, 136 deletions
diff --git a/firmware/export/config/sansae200.h b/firmware/export/config/sansae200.h index 94e9e5b690..a6f4e5416d 100644 --- a/firmware/export/config/sansae200.h +++ b/firmware/export/config/sansae200.h | |||
@@ -190,6 +190,9 @@ | |||
190 | #define USB_VENDOR_ID 0x0781 | 190 | #define USB_VENDOR_ID 0x0781 |
191 | #define USB_PRODUCT_ID 0x7421 | 191 | #define USB_PRODUCT_ID 0x7421 |
192 | #define HAVE_USB_HID_MOUSE | 192 | #define HAVE_USB_HID_MOUSE |
193 | #ifdef BOOTLOADER | ||
194 | #define HAVE_BOOTLOADER_USB_MODE | ||
195 | #endif | ||
193 | 196 | ||
194 | /* Define this if you have adjustable CPU frequency */ | 197 | /* Define this if you have adjustable CPU frequency */ |
195 | #define HAVE_ADJUSTABLE_CPU_FREQ | 198 | #define HAVE_ADJUSTABLE_CPU_FREQ |
diff --git a/firmware/target/arm/boot-pp502x-bl-usb.lds b/firmware/target/arm/boot-pp502x-bl-usb.lds new file mode 100644 index 0000000000..30a8c0e716 --- /dev/null +++ b/firmware/target/arm/boot-pp502x-bl-usb.lds | |||
@@ -0,0 +1,136 @@ | |||
1 | /* Will have been included from boot.lds */ | ||
2 | ENTRY(start) | ||
3 | OUTPUT_FORMAT(elf32-littlearm) | ||
4 | OUTPUT_ARCH(arm) | ||
5 | STARTUP(target/arm/crt0-pp502x-bl-usb.o) | ||
6 | |||
7 | #define DRAMORIG 0x01000000 /* Load at 16 MB */ | ||
8 | #define DRAMSIZE 0x00100000 /* 1MB for bootloader */ | ||
9 | #define MEMEND (MEMORYSIZE*0x100000) /* From virtual mapping at 0 */ | ||
10 | #define NOCACHE_BASE 0x10000000 | ||
11 | #ifndef IRAMORIG | ||
12 | #define IRAMORIG 0x40000000 | ||
13 | #endif | ||
14 | #define IRAMSIZE 0x20000 | ||
15 | #define FLASHORIG 0x001f0000 | ||
16 | #define FLASHSIZE 2M | ||
17 | |||
18 | #define CACHEALIGN_SIZE 16 | ||
19 | |||
20 | MEMORY | ||
21 | { | ||
22 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
23 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
24 | } | ||
25 | |||
26 | SECTIONS | ||
27 | { | ||
28 | . = DRAMORIG; | ||
29 | _loadaddress = . + NOCACHE_BASE; | ||
30 | |||
31 | .text : | ||
32 | { | ||
33 | *(.init.text) | ||
34 | *(.text*) | ||
35 | *(.glue_7) | ||
36 | *(.glue_7t) | ||
37 | . = ALIGN(0x4); | ||
38 | } > DRAM | ||
39 | |||
40 | .rodata : | ||
41 | { | ||
42 | *(.rodata) /* problems without this, dunno why */ | ||
43 | *(.rodata*) | ||
44 | *(.rodata.str1.1) | ||
45 | *(.rodata.str1.4) | ||
46 | . = ALIGN(0x4); | ||
47 | } > DRAM | ||
48 | |||
49 | .data : | ||
50 | { | ||
51 | *(.data*) | ||
52 | . = ALIGN(0x4); | ||
53 | } > DRAM | ||
54 | |||
55 | /* .ncdata section is placed at uncached physical alias address and is | ||
56 | * loaded at the proper cached virtual address - no copying is | ||
57 | * performed in the init code */ | ||
58 | .ncdata . + NOCACHE_BASE : | ||
59 | { | ||
60 | . = ALIGN(CACHEALIGN_SIZE); | ||
61 | *(.ncdata*) | ||
62 | . = ALIGN(CACHEALIGN_SIZE); | ||
63 | } AT> DRAM | ||
64 | |||
65 | /DISCARD/ . - NOCACHE_BASE : | ||
66 | { | ||
67 | *(.eh_frame) | ||
68 | } > DRAM | ||
69 | |||
70 | _noloaddram = .; | ||
71 | |||
72 | .ibss IRAMORIG (NOLOAD) : | ||
73 | { | ||
74 | _iedata = .; | ||
75 | *(.qharray) | ||
76 | *(.ibss) | ||
77 | . = ALIGN(0x4); | ||
78 | _iend = .; | ||
79 | } > IRAM | ||
80 | |||
81 | .iram _iend : | ||
82 | { | ||
83 | _iramstart = .; | ||
84 | *(.icode) | ||
85 | *(.irodata) | ||
86 | *(.idata) | ||
87 | _iramend = .; | ||
88 | } > IRAM AT> DRAM | ||
89 | |||
90 | _iramcopy = LOADADDR(.iram); | ||
91 | |||
92 | .loadaddressend : | ||
93 | { | ||
94 | _loadaddressend = . + NOCACHE_BASE; | ||
95 | } AT> DRAM | ||
96 | |||
97 | .stack (NOLOAD) : | ||
98 | { | ||
99 | . = ALIGN(8); | ||
100 | *(.stack) | ||
101 | stackbegin = .; | ||
102 | . += 0x2000; | ||
103 | stackend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | /* .bss and .ncbss are treated as a single section to use one init loop | ||
107 | * to zero them - note "_edata" and "_end" */ | ||
108 | .bss _noloaddram (NOLOAD) : | ||
109 | { | ||
110 | _edata = .; | ||
111 | *(.bss*) | ||
112 | *(COMMON) | ||
113 | } > DRAM | ||
114 | |||
115 | .ncbss . + NOCACHE_BASE (NOLOAD) : | ||
116 | { | ||
117 | . = ALIGN(CACHEALIGN_SIZE); | ||
118 | *(.ncbss*) | ||
119 | . = ALIGN(CACHEALIGN_SIZE); | ||
120 | } AT> DRAM | ||
121 | |||
122 | /* This will be aligned by preceding alignments */ | ||
123 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
124 | { | ||
125 | _end = .; | ||
126 | } > DRAM | ||
127 | |||
128 | /* Reference to all DRAM after loaded bootloader image */ | ||
129 | .freebuffer _end (NOLOAD) : | ||
130 | { | ||
131 | . = ALIGN(4); | ||
132 | freebuffer = .; | ||
133 | . = MEMEND-1; | ||
134 | freebufferend = .; | ||
135 | } | ||
136 | } | ||
diff --git a/firmware/target/arm/philips/boot.lds b/firmware/target/arm/philips/boot.lds index 411d7b1df2..5d63caddb0 100644 --- a/firmware/target/arm/philips/boot.lds +++ b/firmware/target/arm/philips/boot.lds | |||
@@ -2,142 +2,7 @@ | |||
2 | 2 | ||
3 | /* Can't link all Philips ARM devices the same way at this time */ | 3 | /* Can't link all Philips ARM devices the same way at this time */ |
4 | #ifdef HAVE_BOOTLOADER_USB_MODE | 4 | #ifdef HAVE_BOOTLOADER_USB_MODE |
5 | ENTRY(start) | 5 | #include "../boot-pp502x-bl-usb.lds" |
6 | OUTPUT_FORMAT(elf32-littlearm) | ||
7 | OUTPUT_ARCH(arm) | ||
8 | STARTUP(target/arm/crt0-pp502x-bl-usb.o) | ||
9 | |||
10 | #define DRAMORIG 0x01000000 /* Load at 16 MB */ | ||
11 | #define DRAMSIZE 0x00100000 /* 1MB for bootloader */ | ||
12 | #define MEMEND (MEMORYSIZE*0x100000) /* From virtual mapping at 0 */ | ||
13 | #define NOCACHE_BASE 0x10000000 | ||
14 | #ifndef IRAMORIG | ||
15 | #define IRAMORIG 0x40000000 | ||
16 | #endif | ||
17 | #define IRAMSIZE 0x20000 | ||
18 | #define FLASHORIG 0x001f0000 | ||
19 | #define FLASHSIZE 2M | ||
20 | |||
21 | #define CACHEALIGN_SIZE 16 | ||
22 | |||
23 | MEMORY | ||
24 | { | ||
25 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
26 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
27 | } | ||
28 | |||
29 | SECTIONS | ||
30 | { | ||
31 | . = DRAMORIG; | ||
32 | _loadaddress = . + NOCACHE_BASE; | ||
33 | |||
34 | .text : | ||
35 | { | ||
36 | *(.init.text) | ||
37 | *(.text*) | ||
38 | *(.glue_7) | ||
39 | *(.glue_7t) | ||
40 | . = ALIGN(0x4); | ||
41 | } > DRAM | ||
42 | |||
43 | .rodata : | ||
44 | { | ||
45 | *(.rodata) /* problems without this, dunno why */ | ||
46 | *(.rodata*) | ||
47 | *(.rodata.str1.1) | ||
48 | *(.rodata.str1.4) | ||
49 | . = ALIGN(0x4); | ||
50 | } > DRAM | ||
51 | |||
52 | .data : | ||
53 | { | ||
54 | *(.data*) | ||
55 | . = ALIGN(0x4); | ||
56 | } > DRAM | ||
57 | |||
58 | /* .ncdata section is placed at uncached physical alias address and is | ||
59 | * loaded at the proper cached virtual address - no copying is | ||
60 | * performed in the init code */ | ||
61 | .ncdata . + NOCACHE_BASE : | ||
62 | { | ||
63 | . = ALIGN(CACHEALIGN_SIZE); | ||
64 | *(.ncdata*) | ||
65 | . = ALIGN(CACHEALIGN_SIZE); | ||
66 | } AT> DRAM | ||
67 | |||
68 | /DISCARD/ . - NOCACHE_BASE : | ||
69 | { | ||
70 | *(.eh_frame) | ||
71 | } > DRAM | ||
72 | |||
73 | _noloaddram = .; | ||
74 | |||
75 | .ibss IRAMORIG (NOLOAD) : | ||
76 | { | ||
77 | _iedata = .; | ||
78 | *(.qharray) | ||
79 | *(.ibss) | ||
80 | . = ALIGN(0x4); | ||
81 | _iend = .; | ||
82 | } > IRAM | ||
83 | |||
84 | .iram _iend : | ||
85 | { | ||
86 | _iramstart = .; | ||
87 | *(.icode) | ||
88 | *(.irodata) | ||
89 | *(.idata) | ||
90 | _iramend = .; | ||
91 | } > IRAM AT> DRAM | ||
92 | |||
93 | _iramcopy = LOADADDR(.iram); | ||
94 | |||
95 | .loadaddressend : | ||
96 | { | ||
97 | _loadaddressend = . + NOCACHE_BASE; | ||
98 | } AT> DRAM | ||
99 | |||
100 | .stack (NOLOAD) : | ||
101 | { | ||
102 | . = ALIGN(8); | ||
103 | *(.stack) | ||
104 | stackbegin = .; | ||
105 | . += 0x2000; | ||
106 | stackend = .; | ||
107 | } > IRAM | ||
108 | |||
109 | /* .bss and .ncbss are treated as a single section to use one init loop | ||
110 | * to zero them - note "_edata" and "_end" */ | ||
111 | .bss _noloaddram (NOLOAD) : | ||
112 | { | ||
113 | _edata = .; | ||
114 | *(.bss*) | ||
115 | *(COMMON) | ||
116 | } > DRAM | ||
117 | |||
118 | .ncbss . + NOCACHE_BASE (NOLOAD) : | ||
119 | { | ||
120 | . = ALIGN(CACHEALIGN_SIZE); | ||
121 | *(.ncbss*) | ||
122 | . = ALIGN(CACHEALIGN_SIZE); | ||
123 | } AT> DRAM | ||
124 | |||
125 | /* This will be aligned by preceding alignments */ | ||
126 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
127 | { | ||
128 | _end = .; | ||
129 | } > DRAM | ||
130 | |||
131 | /* Reference to all DRAM after loaded bootloader image */ | ||
132 | .freebuffer _end (NOLOAD) : | ||
133 | { | ||
134 | . = ALIGN(4); | ||
135 | freebuffer = .; | ||
136 | . = MEMEND-1; | ||
137 | freebufferend = .; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | #else /* !HAVE_BOOTLOADER_USB_MODE */ | 6 | #else /* !HAVE_BOOTLOADER_USB_MODE */ |
142 | ENTRY(start) | 7 | ENTRY(start) |
143 | OUTPUT_FORMAT(elf32-littlearm) | 8 | OUTPUT_FORMAT(elf32-littlearm) |
diff --git a/firmware/target/arm/sandisk/boot.lds b/firmware/target/arm/sandisk/boot.lds index c0621b8abf..4b8adc8991 100644 --- a/firmware/target/arm/sandisk/boot.lds +++ b/firmware/target/arm/sandisk/boot.lds | |||
@@ -1,5 +1,10 @@ | |||
1 | #include "config.h" | 1 | #include "config.h" |
2 | 2 | ||
3 | /* Can't link all Sansa PP devices the same way at this time */ | ||
4 | #ifdef HAVE_BOOTLOADER_USB_MODE | ||
5 | #include "../boot-pp502x-bl-usb.lds" | ||
6 | #else /* !HAVE_BOOTLOADER_USB_MODE */ | ||
7 | |||
3 | ENTRY(start) | 8 | ENTRY(start) |
4 | OUTPUT_FORMAT(elf32-littlearm) | 9 | OUTPUT_FORMAT(elf32-littlearm) |
5 | OUTPUT_ARCH(arm) | 10 | OUTPUT_ARCH(arm) |
@@ -73,3 +78,4 @@ SECTIONS | |||
73 | _end = .; | 78 | _end = .; |
74 | } > DRAM | 79 | } > DRAM |
75 | } | 80 | } |
81 | #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 52b8949396..1e952b3882 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) | |||
272 | delta = 0x7ful << 24; | 272 | delta = 0x7ful << 24; |
273 | } | 273 | } |
274 | } | 274 | } |
275 | #else | ||
276 | void clickwheel_int(void) | ||
277 | { | ||
278 | } | ||
275 | #endif /* BOOTLOADER */ | 279 | #endif /* BOOTLOADER */ |
276 | 280 | ||
277 | /* device buttons */ | 281 | /* device buttons */ |