summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-10-19 19:35:24 +0000
committerJens Arnold <amiconn@rockbox.org>2005-10-19 19:35:24 +0000
commitabd9f83e92fae22dcb9806deae665b7b303f430d (patch)
tree8d0d1d65c6aaa596e171cda2d78706739046d0bd /apps
parent266f173b72967bae96119e5428fabe692edd8c30 (diff)
downloadrockbox-abd9f83e92fae22dcb9806deae665b7b303f430d.tar.gz
rockbox-abd9f83e92fae22dcb9806deae665b7b303f430d.tar.bz2
rockbox-abd9f83e92fae22dcb9806deae665b7b303f430d.zip
Two new sections for IRAM usage: .irodata (selectable with the ICONST_ATTR attribute macro), allowing to put 'const' data into IRAM without causing a section type conflict, and .ibss (selectable with the IBSS_ATTR attribute macro) for uninitialised data. * Rockbox core: Adjusted the linker scripts and init code to not include the .ibss section in the binary, it is cleared instead. Saves ~500 bytes on archos and ~30KB on iriver. Codecs and plugins don't handle .ibss in a special way yet. * The init code properly handles empty sections now (except .stack, which should never be empty). * Unified the init code for SH1 and coldfire a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7644 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/dsp.c10
-rw-r--r--apps/playback.c4
-rw-r--r--apps/plugins/plugin.lds2
3 files changed, 9 insertions, 7 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index 8ec36c3f33..ff4c840008 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -130,9 +130,9 @@ struct dither_data
long random;
};
-static struct dsp_config dsp_conf[2] IDATA_ATTR;
-static struct dither_data dither_data[2] IDATA_ATTR;
-static struct resample_data resample_data[2][2] IDATA_ATTR;
+static struct dsp_config dsp_conf[2] IBSS_ATTR;
+static struct dither_data dither_data[2] IBSS_ATTR;
+static struct resample_data resample_data[2][2] IBSS_ATTR;
extern int current_codec;
struct dsp_config *dsp;
@@ -142,8 +142,8 @@ struct dsp_config *dsp;
* of copying needed is minimized for that case.
*/
-static long sample_buf[SAMPLE_BUF_SIZE] IDATA_ATTR;
-static long resample_buf[RESAMPLE_BUF_SIZE] IDATA_ATTR;
+static long sample_buf[SAMPLE_BUF_SIZE] IBSS_ATTR;
+static long resample_buf[RESAMPLE_BUF_SIZE] IBSS_ATTR;
/* Convert at most count samples to the internal format, if needed. Returns
diff --git a/apps/playback.c b/apps/playback.c
index d38e1f4527..5b78ad53ba 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -112,13 +112,13 @@ static const char audio_thread_name[] = "audio";
/* Codec thread. */
static struct event_queue codec_queue;
-static long codec_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] IDATA_ATTR;
+static long codec_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] IBSS_ATTR;
static const char codec_thread_name[] = "codec";
/* Voice codec thread. */
static struct event_queue voice_codec_queue;
/* Not enough IRAM for this. */
-static long voice_codec_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] IDATA_ATTR;
+static long voice_codec_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] IBSS_ATTR;
static const char voice_codec_thread_name[] = "voice codec";
static struct mutex mutex_bufferfill;
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index bf400cf2e5..3e7261f024 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -80,7 +80,9 @@ SECTIONS
{
iramstart = .;
*(.icode)
+ *(.irodata)
*(.idata)
+ *(.ibss)
iramend = .;
} > PLUGIN_IRAM
#endif