diff --git a/firmware/app.lds b/firmware/app.lds index d85faf1fa9..e3f6ef2e50 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -32,6 +32,16 @@ INPUT(target/sh/crt0.o) #define STUBOFFSET 0 #endif +#if CONFIG_CPU==S3C2440 +#include "s3c2440.h" +#define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE +#elif CONFIG_CPU==DM320 +#include "dm320.h" +#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE +#else +#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE +#endif + #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300) #define DRAMORIG 0x31000000 + STUBOFFSET #define IRAMORIG 0x10000000 @@ -52,9 +62,9 @@ INPUT(target/sh/crt0.o) #define IRAMSIZE 0x7000 #elif CONFIG_CPU==S3C2440 #define DRAMORIG 0x00000100 + STUBOFFSET +#define IRAMORIG DRAMORIG +#define IRAM DRAM #define IRAMSIZE 0x1000 -/* This is not really IRAM!! Should be 0x40000000, but it doesn't work */ -#define IRAMORIG (MEMORYSIZE * 0x100000) - IRAMSIZE - LCD_BUFFER_SIZE - TTB_SIZE + DRAMORIG #elif CONFIG_CPU==DM320 #define DRAMORIG 0x00900000 + STUBOFFSET #define IRAMORIG 0x00000000 @@ -69,16 +79,6 @@ INPUT(target/sh/crt0.o) #define IRAMSIZE 0x1000 #endif -#if CONFIG_CPU==S3C2440 -#include "s3c2440.h" -#define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE - IRAMSIZE -#elif CONFIG_CPU==DM320 -#include "dm320.h" -#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE -#else -#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE -#endif - /* End of the audio buffer, where the codec buffer starts */ #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) @@ -88,8 +88,9 @@ INPUT(target/sh/crt0.o) MEMORY { DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE +#if CONFIG_CPU != S3C2440 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE - +#endif #if CONFIG_CPU==PNX0101 IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE #endif @@ -233,14 +234,14 @@ SECTIONS _vectorscopy = LOADADDR(.vectors); - .iram IRAMORIG : + .iram : { _iramstart = .; *(.icode) *(.irodata) *(.idata) _iramend = .; - } >IRAM AT> DRAM + } > DRAM _iramcopy = LOADADDR(.iram); @@ -252,7 +253,7 @@ SECTIONS _iend = .; } > DRAM - .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors) : + .stack : { *(.stack) stackbegin = .; diff --git a/firmware/boot.lds b/firmware/boot.lds index a9900517a2..d2ea10a30d 100644 --- a/firmware/boot.lds +++ b/firmware/boot.lds @@ -9,10 +9,8 @@ OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) #ifdef CPU_PP INPUT(target/arm/crt0-pp-bl.o) -#elif CONFIG_CPU==DM320 +#elif defined(OLYMPUS_MROBE_500) INPUT(target/arm/tms320dm320/crt0.o) -#elif CONFIG_CPU==S3C2440 -INPUT(target/arm/s3c2440/crt0.o) #elif defined(CPU_TCC77X) INPUT(target/arm/tcc77x/crt0.o) #else