diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/codec.h | 9 | ||||
-rw-r--r-- | apps/codecs/libmad/synth.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/xxx2wav.h | 9 | ||||
-rw-r--r-- | apps/plugins/mpa2wav.c | 10 |
4 files changed, 24 insertions, 6 deletions
diff --git a/apps/codecs/codec.h b/apps/codecs/codec.h index c00d2bda95..3b6e7796ee 100644 --- a/apps/codecs/codec.h +++ b/apps/codecs/codec.h | |||
@@ -21,6 +21,15 @@ | |||
21 | 21 | ||
22 | #include "config.h" | 22 | #include "config.h" |
23 | 23 | ||
24 | #if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) | ||
25 | #define ICODE_ATTR __attribute__ ((section(".icode"))) | ||
26 | #define IDATA_ATTR __attribute__ ((section(".idata"))) | ||
27 | #define USE_IRAM 1 | ||
28 | #else | ||
29 | #define ICODE_ATTR | ||
30 | #define IDATA_ATTR | ||
31 | #endif | ||
32 | |||
24 | #include <sys/types.h> | 33 | #include <sys/types.h> |
25 | 34 | ||
26 | /* Get these functions 'out of the way' of the standard functions. Not doing | 35 | /* Get these functions 'out of the way' of the standard functions. Not doing |
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c index 2d212c091f..166e3d9f3a 100644 --- a/apps/codecs/libmad/synth.c +++ b/apps/codecs/libmad/synth.c | |||
@@ -542,7 +542,7 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
542 | # endif | 542 | # endif |
543 | 543 | ||
544 | static | 544 | static |
545 | mad_fixed_t const D[17][32] __attribute__ ((section(".idata"))) = { | 545 | mad_fixed_t const D[17][32] IDATA_ATTR = { |
546 | # include "D.dat" | 546 | # include "D.dat" |
547 | }; | 547 | }; |
548 | 548 | ||
diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h index 2806eabf27..7e3afceaba 100644 --- a/apps/plugins/lib/xxx2wav.h +++ b/apps/plugins/lib/xxx2wav.h | |||
@@ -19,6 +19,15 @@ | |||
19 | 19 | ||
20 | /* Various "helper functions" common to all the xxx2wav decoder plugins */ | 20 | /* Various "helper functions" common to all the xxx2wav decoder plugins */ |
21 | 21 | ||
22 | #if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) | ||
23 | #define ICODE_ATTR __attribute__ ((section(".icode"))) | ||
24 | #define IDATA_ATTR __attribute__ ((section(".idata"))) | ||
25 | #define USE_IRAM 1 | ||
26 | #else | ||
27 | #define ICODE_ATTR | ||
28 | #define IDATA_ATTR | ||
29 | #endif | ||
30 | |||
22 | /* the main data structure of the program */ | 31 | /* the main data structure of the program */ |
23 | typedef struct { | 32 | typedef struct { |
24 | int infile; | 33 | int infile; |
diff --git a/apps/plugins/mpa2wav.c b/apps/plugins/mpa2wav.c index 6c28100800..5ef6351a85 100644 --- a/apps/plugins/mpa2wav.c +++ b/apps/plugins/mpa2wav.c | |||
@@ -28,9 +28,9 @@ | |||
28 | 28 | ||
29 | static struct plugin_api* rb; | 29 | static struct plugin_api* rb; |
30 | 30 | ||
31 | struct mad_stream Stream __attribute__ ((section(".idata"))); | 31 | struct mad_stream Stream IDATA_ATTR; |
32 | struct mad_frame Frame __attribute__ ((section(".idata"))); | 32 | struct mad_frame Frame IDATA_ATTR; |
33 | struct mad_synth Synth __attribute__ ((section(".idata"))); | 33 | struct mad_synth Synth IDATA_ATTR; |
34 | mad_timer_t Timer; | 34 | mad_timer_t Timer; |
35 | struct dither d0, d1; | 35 | struct dither d0, d1; |
36 | 36 | ||
@@ -130,7 +130,7 @@ unsigned char *OutputPtr=OutputBuffer; | |||
130 | unsigned char *GuardPtr=NULL; | 130 | unsigned char *GuardPtr=NULL; |
131 | const unsigned char *OutputBufferEnd=OutputBuffer+OUTPUT_BUFFER_SIZE; | 131 | const unsigned char *OutputBufferEnd=OutputBuffer+OUTPUT_BUFFER_SIZE; |
132 | 132 | ||
133 | #ifndef SIMULATOR | 133 | #ifdef USE_IRAM |
134 | extern char iramcopy[]; | 134 | extern char iramcopy[]; |
135 | extern char iramstart[]; | 135 | extern char iramstart[]; |
136 | extern char iramend[]; | 136 | extern char iramend[]; |
@@ -151,7 +151,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
151 | TEST_PLUGIN_API(api); | 151 | TEST_PLUGIN_API(api); |
152 | rb = api; | 152 | rb = api; |
153 | 153 | ||
154 | #ifndef SIMULATOR | 154 | #ifdef USE_IRAM |
155 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | 155 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); |
156 | #endif | 156 | #endif |
157 | 157 | ||