diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/as3525/app.lds | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/app.lds b/firmware/target/arm/as3525/app.lds index 56a4b20fa6..f9d070e60d 100644 --- a/firmware/target/arm/as3525/app.lds +++ b/firmware/target/arm/as3525/app.lds | |||
@@ -23,8 +23,10 @@ STARTUP(target/arm/crt0.o) | |||
23 | /* End of the audio buffer, where the codec buffer starts */ | 23 | /* End of the audio buffer, where the codec buffer starts */ |
24 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 24 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
25 | 25 | ||
26 | #define CODEC_BUFFER_FILLS_IRAM defined(AMS_LOWMEM) || (CONFIG_CPU == AS3525v2) | ||
26 | 27 | ||
27 | #ifdef AMS_LOWMEM | 28 | #if CODEC_BUFFER_FILLS_IRAM |
29 | /* Entire codec buffer in IRAM */ | ||
28 | #define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - TTB_SIZE) | 30 | #define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - TTB_SIZE) |
29 | #define CODECORIG (IRAMORIG + (IRAM_SIZE - CODEC_SIZE)) | 31 | #define CODECORIG (IRAMORIG + (IRAM_SIZE - CODEC_SIZE)) |
30 | #define IRAMSIZE (IRAM_SIZE - CODEC_SIZE) | 32 | #define IRAMSIZE (IRAM_SIZE - CODEC_SIZE) |
@@ -36,7 +38,7 @@ STARTUP(target/arm/crt0.o) | |||
36 | 38 | ||
37 | 39 | ||
38 | /* Where the codec buffer ends, and the plugin buffer starts */ | 40 | /* Where the codec buffer ends, and the plugin buffer starts */ |
39 | #ifdef AMS_LOWMEM | 41 | #if CODEC_BUFFER_FILLS_IRAM |
40 | #define ENDADDR (ENDAUDIOADDR) | 42 | #define ENDADDR (ENDAUDIOADDR) |
41 | #else | 43 | #else |
42 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | 44 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) |
@@ -44,7 +46,7 @@ STARTUP(target/arm/crt0.o) | |||
44 | 46 | ||
45 | MEMORY | 47 | MEMORY |
46 | { | 48 | { |
47 | #ifdef AMS_LOWMEM | 49 | #if CODEC_BUFFER_FILLS_IRAM |
48 | CODEC_IRAM : ORIGIN = CODECORIG, LENGTH = CODEC_SIZE | 50 | CODEC_IRAM : ORIGIN = CODECORIG, LENGTH = CODEC_SIZE |
49 | #endif | 51 | #endif |
50 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | 52 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE |
@@ -110,7 +112,7 @@ SECTIONS | |||
110 | _iend = .; | 112 | _iend = .; |
111 | } > IRAM | 113 | } > IRAM |
112 | 114 | ||
113 | .init CODECORIG : | 115 | .init ENDADDR : |
114 | { | 116 | { |
115 | . = ALIGN(4); | 117 | . = ALIGN(4); |
116 | _initstart = .; | 118 | _initstart = .; |
@@ -154,7 +156,7 @@ SECTIONS | |||
154 | { | 156 | { |
155 | codecbuf = .; | 157 | codecbuf = .; |
156 | _codecbuf = .; | 158 | _codecbuf = .; |
157 | #ifdef AMS_LOWMEM | 159 | #if CODEC_BUFFER_FILLS_IRAM |
158 | } > CODEC_IRAM | 160 | } > CODEC_IRAM |
159 | #else | 161 | #else |
160 | } > DRAM | 162 | } > DRAM |