diff options
author | Tomasz Moń <desowin@gmail.com> | 2016-05-19 20:57:20 +0300 |
---|---|---|
committer | Gerrit Rockbox <gerrit@rockbox.org> | 2016-05-25 17:03:19 +0200 |
commit | 94b23da3c4a9a96af8ae4a4b2308037acb8d58dd (patch) | |
tree | 7d4849766bddf4bcc00ae57073f2803cbc152a52 /firmware/target/arm/tms320dm320/boot.lds | |
parent | 9327885d141d9cdf8a476640b3e3ce572bd37790 (diff) | |
download | rockbox-94b23da3c4a9a96af8ae4a4b2308037acb8d58dd.tar.gz rockbox-94b23da3c4a9a96af8ae4a4b2308037acb8d58dd.zip |
Sansa Connect: change bootloader linker file
This change ensures that Sansa Connect bootloader.bin will fit in its flash
partition.
Fix _flash_sizem calculation, division was not working properly because
FLASHSIZE included subtraction and defined value was not in parenthesis.
Prior to this change _flash_sizem was 0x00800000, now it is correctly set
to 4 in case of Sansa Connect and 8 in case of other TMS320DM320 players.
This significantly improves boot time as cache is now enabled only for
real flash memory region.
Change-Id: If3e50a3075c840dcb69dfafe5bba608a0acd2bf8
Diffstat (limited to 'firmware/target/arm/tms320dm320/boot.lds')
-rw-r--r-- | firmware/target/arm/tms320dm320/boot.lds | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/firmware/target/arm/tms320dm320/boot.lds b/firmware/target/arm/tms320dm320/boot.lds index 43ed6486e9..c59cc7f514 100644 --- a/firmware/target/arm/tms320dm320/boot.lds +++ b/firmware/target/arm/tms320dm320/boot.lds | |||
@@ -34,6 +34,8 @@ STARTUP(target/arm/tms320dm320/crt0.o) | |||
34 | #define IRAMORIG 0x00000000 | 34 | #define IRAMORIG 0x00000000 |
35 | #define IRAMSIZE 0x4000 | 35 | #define IRAMSIZE 0x4000 |
36 | 36 | ||
37 | #define FLASHORIG 0x00100000 | ||
38 | |||
37 | #ifdef SANSA_CONNECT | 39 | #ifdef SANSA_CONNECT |
38 | /* Offset in flash from beginning, we don't want overwrite OF bootloader | 40 | /* Offset in flash from beginning, we don't want overwrite OF bootloader |
39 | due to recovery mode and more importantly - hardware block protection. | 41 | due to recovery mode and more importantly - hardware block protection. |
@@ -41,15 +43,18 @@ STARTUP(target/arm/tms320dm320/crt0.o) | |||
41 | In .srr file header add any valid memory address from following | 43 | In .srr file header add any valid memory address from following |
42 | <0x1000000; 0x1300180) u (0x131EAF4; 0x1420000) u (0x1440000; 0x5000000> | 44 | <0x1000000; 0x1300180) u (0x131EAF4; 0x1420000) u (0x1440000; 0x5000000> |
43 | ensuring that complete bootloader fits in. | 45 | ensuring that complete bootloader fits in. |
44 | Entry point in .srr file should be 0x120010. */ | 46 | Entry point in .srr file should be equal to _loadaddress. */ |
45 | #define FLASHOFFSET 0x20010 | 47 | #define FLASHSIZE 0x00400000 |
48 | #define FLASHMEMORIG 0x00120010 | ||
49 | /* Kernel partition is 2 M, srr header is 16 bytes, sig is 2048 bytes */ | ||
50 | #define FLASHMEMSIZE 0x001FF7F0 | ||
46 | #else | 51 | #else |
47 | #define FLASHOFFSET 0 | 52 | /* On targets other than Sansa Connect use whole flash for bootloader */ |
53 | #define FLASHSIZE 0x00800000 | ||
54 | #define FLASHMEMORIG FLASHORIG | ||
55 | #define FLASHMEMSIZE FLASHSIZE | ||
48 | #endif | 56 | #endif |
49 | 57 | ||
50 | #define FLASHORIG 0x00100000 | ||
51 | #define FLASHSIZE 0x00800000-FLASHOFFSET | ||
52 | |||
53 | PRO_STACK_SIZE = 0x2000; | 58 | PRO_STACK_SIZE = 0x2000; |
54 | IRQ_STACK_SIZE = 0x400; | 59 | IRQ_STACK_SIZE = 0x400; |
55 | FIQ_STACK_SIZE = 0x400; | 60 | FIQ_STACK_SIZE = 0x400; |
@@ -61,7 +66,7 @@ MEMORY | |||
61 | { | 66 | { |
62 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | 67 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE |
63 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | 68 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE |
64 | FLASH : ORIGIN = FLASHORIG+FLASHOFFSET, LENGTH = FLASHSIZE | 69 | FLASH : ORIGIN = FLASHMEMORIG, LENGTH = FLASHMEMSIZE |
65 | } | 70 | } |
66 | 71 | ||
67 | SECTIONS | 72 | SECTIONS |