summaryrefslogtreecommitdiff
path: root/apps/plugins/plugin.lds
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/plugin.lds')
-rw-r--r--apps/plugins/plugin.lds19
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 9a65fd5..456e6b4 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -1,4 +1,5 @@
#include "config.h"
+#include "cpu.h"
/* These output formats should be in the config-files */
@@ -47,10 +48,11 @@ OUTPUT_FORMAT(elf32-littlemips)
#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_BUFFER_SIZE - TTB_SIZE
#elif CONFIG_CPU==AS3525
-#if MEMORYSIZE <= 2
-#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET
+#define DRAMORIG DRAM_ORIG
+#ifdef AMS_LOWMEM
+#define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - STUBOFFSET - TTB_SIZE)
#else
-#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE
+#define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE - TTB_SIZE)
#endif
#endif
@@ -110,15 +112,14 @@ OUTPUT_FORMAT(elf32-littlemips)
#define IRAMSIZE 0
#elif CONFIG_CPU==AS3525
-#if MEMORYSIZE <= 2
+#ifdef AMS_LOWMEM
#define IRAMSIZE 0 /* simulates no IRAM since codec is already entirely in IRAM */
-#define CODEC_ORIGIN (0x50000 - CODEC_SIZE)
-#define PLUGIN_ORIGIN (DRAMORIG + DRAMSIZE)
+#define CODEC_ORIGIN (IRAM_ORIG + IRAM_SIZE - CODEC_SIZE)
+#define PLUGIN_ORIGIN (DRAM_ORIG + DRAMSIZE)
#else
-#define IRAMORIG 0x20000
-#define IRAMSIZE 0x30000
+#define IRAMORIG (IRAM_ORIG + 0x20000)
+#define IRAMSIZE (IRAM_ORIG + IRAM_SIZE - IRAMORIG)
#endif
-#define DRAMORIG 0x30000000
#elif CONFIG_CPU == JZ4732
#define DRAMORIG 0x80004000 + STUBOFFSET