summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-03 14:05:12 +0000
commitd2456b44f73e6a1310d8dc2c98db92364b70e793 (patch)
tree5f6a7ff48924ebb9b35dd57775c4538d3388d136
parentd50ed1248de6f347e928bae349c3393696a0383f (diff)
downloadrockbox-d2456b44f73e6a1310d8dc2c98db92364b70e793.tar.gz
rockbox-d2456b44f73e6a1310d8dc2c98db92364b70e793.zip
Centralised the ICODE_ATTR and IDATA_ATTR #defines. Renamed some musepack and rockboy headers to avoid clashes with rockbox headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6991 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/codec.h9
-rw-r--r--apps/codecs/lib/codeclib.h9
-rw-r--r--apps/codecs/lib/xxx2wav.h9
-rw-r--r--apps/codecs/libmusepack/Makefile2
-rw-r--r--apps/codecs/libmusepack/config-mpc.h (renamed from apps/codecs/libmusepack/config.h)0
-rw-r--r--apps/plugins/rockboy/cpu-gb.h (renamed from apps/plugins/rockboy/cpu.h)4
-rw-r--r--apps/plugins/rockboy/cpu.c2
-rw-r--r--apps/plugins/rockboy/cpuregs.h2
-rw-r--r--apps/plugins/rockboy/debug.c2
-rw-r--r--apps/plugins/rockboy/dynarec.c2
-rw-r--r--apps/plugins/rockboy/emu.c6
-rw-r--r--apps/plugins/rockboy/hw.c4
-rw-r--r--apps/plugins/rockboy/lcd-gb.h (renamed from apps/plugins/rockboy/lcd.h)16
-rw-r--r--apps/plugins/rockboy/lcd.c3
-rw-r--r--apps/plugins/rockboy/lcdc.c4
-rw-r--r--apps/plugins/rockboy/loader.c3
-rw-r--r--apps/plugins/rockboy/mem.c4
-rw-r--r--apps/plugins/rockboy/rockmacros.h20
-rw-r--r--apps/plugins/rockboy/rtc-gb.h (renamed from apps/plugins/rockboy/rtc.h)4
-rw-r--r--apps/plugins/rockboy/rtc.c2
-rw-r--r--apps/plugins/rockboy/save.c6
-rw-r--r--apps/plugins/rockboy/sound.c2
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c2
-rw-r--r--firmware/export/config.h12
24 files changed, 47 insertions, 82 deletions
diff --git a/apps/codecs/codec.h b/apps/codecs/codec.h
index 3b6e7796ee..c00d2bda95 100644
--- a/apps/codecs/codec.h
+++ b/apps/codecs/codec.h
@@ -21,15 +21,6 @@
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
33#include <sys/types.h> 24#include <sys/types.h>
34 25
35/* Get these functions 'out of the way' of the standard functions. Not doing 26/* Get these functions 'out of the way' of the standard functions. Not doing
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index 116f210c5f..762b68dd95 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -22,15 +22,6 @@
22 22
23/* Various codec "helper functions" */ 23/* Various codec "helper functions" */
24 24
25#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR)
26#define ICODE_ATTR __attribute__ ((section(".icode")))
27#define IDATA_ATTR __attribute__ ((section(".idata")))
28#define USE_IRAM 1
29#else
30#define ICODE_ATTR
31#define IDATA_ATTR
32#endif
33
34extern int mem_ptr; 25extern int mem_ptr;
35extern int bufsize; 26extern int bufsize;
36extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer 27extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer
diff --git a/apps/codecs/lib/xxx2wav.h b/apps/codecs/lib/xxx2wav.h
index 1fa7dc9413..1cdbc99878 100644
--- a/apps/codecs/lib/xxx2wav.h
+++ b/apps/codecs/lib/xxx2wav.h
@@ -19,14 +19,7 @@
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) 22#include "config.h"
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 23
31/* the main data structure of the program */ 24/* the main data structure of the program */
32typedef struct { 25typedef struct {
diff --git a/apps/codecs/libmusepack/Makefile b/apps/codecs/libmusepack/Makefile
index 1e3eaf6232..79ebffe9b8 100644
--- a/apps/codecs/libmusepack/Makefile
+++ b/apps/codecs/libmusepack/Makefile
@@ -8,7 +8,7 @@
8# 8#
9 9
10INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 10INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers 11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
12 12
13ifdef APPEXTRA 13ifdef APPEXTRA
14INCLUDES += -I$(APPSDIR)/$(APPEXTRA) 14INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
diff --git a/apps/codecs/libmusepack/config.h b/apps/codecs/libmusepack/config-mpc.h
index 8d764c4031..8d764c4031 100644
--- a/apps/codecs/libmusepack/config.h
+++ b/apps/codecs/libmusepack/config-mpc.h
diff --git a/apps/plugins/rockboy/cpu.h b/apps/plugins/rockboy/cpu-gb.h
index c7ec36ccf8..937b477b53 100644
--- a/apps/plugins/rockboy/cpu.h
+++ b/apps/plugins/rockboy/cpu-gb.h
@@ -1,7 +1,7 @@
1 1
2 2
3#ifndef __CPU_H__ 3#ifndef __CPU_GB_H__
4#define __CPU_H__ 4#define __CPU_GB_H__
5 5
6 6
7 7
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c
index 60c76a1302..6118633899 100644
--- a/apps/plugins/rockboy/cpu.c
+++ b/apps/plugins/rockboy/cpu.c
@@ -5,7 +5,7 @@
5#include "defs.h" 5#include "defs.h"
6#include "regs.h" 6#include "regs.h"
7#include "hw.h" 7#include "hw.h"
8#include "cpu.h" 8#include "cpu-gb.h"
9#include "lcdc.h" 9#include "lcdc.h"
10#include "mem.h" 10#include "mem.h"
11#include "fastmem.h" 11#include "fastmem.h"
diff --git a/apps/plugins/rockboy/cpuregs.h b/apps/plugins/rockboy/cpuregs.h
index e4b1426a3e..3b7d5eda27 100644
--- a/apps/plugins/rockboy/cpuregs.h
+++ b/apps/plugins/rockboy/cpuregs.h
@@ -7,7 +7,7 @@
7 7
8 8
9#include "defs.h" 9#include "defs.h"
10#include "cpu.h" 10#include "cpu-gb.h"
11 11
12#define LB(r) ((r).b[LO][LO]) 12#define LB(r) ((r).b[LO][LO])
13#define HB(r) ((r).b[LO][HI]) 13#define HB(r) ((r).b[LO][HI])
diff --git a/apps/plugins/rockboy/debug.c b/apps/plugins/rockboy/debug.c
index d0e106ba94..8459ad3d5b 100644
--- a/apps/plugins/rockboy/debug.c
+++ b/apps/plugins/rockboy/debug.c
@@ -4,7 +4,7 @@
4 4
5#include "rockmacros.h" 5#include "rockmacros.h"
6#include "defs.h" 6#include "defs.h"
7#include "cpu.h" 7#include "cpu-gb.h"
8#include "mem.h" 8#include "mem.h"
9#include "fastmem.h" 9#include "fastmem.h"
10#include "regs.h" 10#include "regs.h"
diff --git a/apps/plugins/rockboy/dynarec.c b/apps/plugins/rockboy/dynarec.c
index 14ec7a5ca9..6d424a047f 100644
--- a/apps/plugins/rockboy/dynarec.c
+++ b/apps/plugins/rockboy/dynarec.c
@@ -4,7 +4,7 @@
4#include "defs.h" 4#include "defs.h"
5#include "regs.h" 5#include "regs.h"
6#include "hw.h" 6#include "hw.h"
7#include "cpu.h" 7#include "cpu-gb.h"
8#include "lcdc.h" 8#include "lcdc.h"
9#include "mem.h" 9#include "mem.h"
10#include "fastmem.h" 10#include "fastmem.h"
diff --git a/apps/plugins/rockboy/emu.c b/apps/plugins/rockboy/emu.c
index 18a9edb324..57385f8e5f 100644
--- a/apps/plugins/rockboy/emu.c
+++ b/apps/plugins/rockboy/emu.c
@@ -5,12 +5,12 @@
5#include "defs.h" 5#include "defs.h"
6#include "regs.h" 6#include "regs.h"
7#include "hw.h" 7#include "hw.h"
8#include "cpu.h" 8#include "cpu-gb.h"
9#include "mem.h" 9#include "mem.h"
10#include "lcd.h" 10#include "lcd-gb.h"
11#include "rc.h" 11#include "rc.h"
12#include "sound.h" 12#include "sound.h"
13#include "rtc.h" 13#include "rtc-gb.h"
14 14
15static int framelen = 16743; 15static int framelen = 16743;
16static int framecount; 16static int framecount;
diff --git a/apps/plugins/rockboy/hw.c b/apps/plugins/rockboy/hw.c
index c287e24f8a..794e4e4516 100644
--- a/apps/plugins/rockboy/hw.c
+++ b/apps/plugins/rockboy/hw.c
@@ -3,10 +3,10 @@
3 3
4#include "rockmacros.h" 4#include "rockmacros.h"
5#include "defs.h" 5#include "defs.h"
6#include "cpu.h" 6#include "cpu-gb.h"
7#include "hw.h" 7#include "hw.h"
8#include "regs.h" 8#include "regs.h"
9#include "lcd.h" 9#include "lcd-gb.h"
10#include "mem.h" 10#include "mem.h"
11#include "fastmem.h" 11#include "fastmem.h"
12 12
diff --git a/apps/plugins/rockboy/lcd.h b/apps/plugins/rockboy/lcd-gb.h
index 776c8592f4..3a612887e5 100644
--- a/apps/plugins/rockboy/lcd.h
+++ b/apps/plugins/rockboy/lcd-gb.h
@@ -1,7 +1,7 @@
1 1
2 2
3#ifndef __LCD_H__ 3#ifndef __LCD_GB_H__
4#define __LCD_H__ 4#define __LCD_GB_H__
5 5
6#include "defs.h" 6#include "defs.h"
7 7
@@ -52,13 +52,6 @@ extern struct lcd lcd;
52extern struct scan scan; 52extern struct scan scan;
53 53
54 54
55
56
57
58#endif
59
60
61
62void updatepatpix(void) ICODE_ATTR; 55void updatepatpix(void) ICODE_ATTR;
63void tilebuf(void); 56void tilebuf(void);
64void bg_scan(void); 57void bg_scan(void);
@@ -76,3 +69,8 @@ void vram_write(int a, byte b);
76void vram_dirty(void); 69void vram_dirty(void);
77void pal_dirty(void); 70void pal_dirty(void);
78void lcd_reset(void); 71void lcd_reset(void);
72
73#endif
74
75
76
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index 04ca06e958..651c82286f 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -1,12 +1,11 @@
1 1
2 2
3#include "config.h"
4#include "rockmacros.h" 3#include "rockmacros.h"
5#include "defs.h" 4#include "defs.h"
6#include "regs.h" 5#include "regs.h"
7#include "hw.h" 6#include "hw.h"
8#include "mem.h" 7#include "mem.h"
9#include "lcd.h" 8#include "lcd-gb.h"
10#include "rc.h" 9#include "rc.h"
11#include "fb.h" 10#include "fb.h"
12#include "palette.h" 11#include "palette.h"
diff --git a/apps/plugins/rockboy/lcdc.c b/apps/plugins/rockboy/lcdc.c
index c82b828354..3c1cf9196d 100644
--- a/apps/plugins/rockboy/lcdc.c
+++ b/apps/plugins/rockboy/lcdc.c
@@ -4,9 +4,9 @@
4 4
5#include "defs.h" 5#include "defs.h"
6#include "hw.h" 6#include "hw.h"
7#include "cpu.h" 7#include "cpu-gb.h"
8#include "regs.h" 8#include "regs.h"
9#include "lcd.h" 9#include "lcd-gb.h"
10 10
11 11
12#define C (cpu.lcdc) 12#define C (cpu.lcdc)
diff --git a/apps/plugins/rockboy/loader.c b/apps/plugins/rockboy/loader.c
index dc89cddf8b..53839d6150 100644
--- a/apps/plugins/rockboy/loader.c
+++ b/apps/plugins/rockboy/loader.c
@@ -8,7 +8,8 @@
8#include "regs.h" 8#include "regs.h"
9#include "mem.h" 9#include "mem.h"
10#include "hw.h" 10#include "hw.h"
11#include "rtc.h" 11#include "lcd-gb.h"
12#include "rtc-gb.h"
12#include "rc.h" 13#include "rc.h"
13#include "save.h" 14#include "save.h"
14#include "sound.h" 15#include "sound.h"
diff --git a/apps/plugins/rockboy/mem.c b/apps/plugins/rockboy/mem.c
index 2e1e0e7154..6bfedcb6c8 100644
--- a/apps/plugins/rockboy/mem.c
+++ b/apps/plugins/rockboy/mem.c
@@ -6,8 +6,8 @@
6#include "hw.h" 6#include "hw.h"
7#include "regs.h" 7#include "regs.h"
8#include "mem.h" 8#include "mem.h"
9#include "rtc.h" 9#include "rtc-gb.h"
10#include "lcd.h" 10#include "lcd-gb.h"
11#include "lcdc.h" 11#include "lcdc.h"
12#include "sound.h" 12#include "sound.h"
13 13
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index e246086f05..71acfdbbcc 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -51,16 +51,6 @@ void savestate(int fd);
51#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z'))) 51#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z')))
52#define isalnum(c) (isdigit(c) || (isalpha(c))) 52#define isalnum(c) (isdigit(c) || (isalpha(c)))
53 53
54/* FIXME: This is a q&d fix for these #defines not being available from
55 * rockbox' lcd.h because rockboy has its own lcd.h. Renaming the file and
56 * adapting the other files produced weird errors I couldn't figure out
57 * -- amiconn 20050624 -- */
58#define DRMODE_COMPLEMENT 0
59#define DRMODE_BG 1
60#define DRMODE_FG 2
61#define DRMODE_SOLID 3
62#define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
63
64#ifdef SIMULATOR 54#ifdef SIMULATOR
65#undef opendir 55#undef opendir
66#define opendir(a) rb->sim_opendir((a)) 56#define opendir(a) rb->sim_opendir((a))
@@ -72,22 +62,12 @@ void savestate(int fd);
72#define open(a,b) rb->sim_open((a),(b)) 62#define open(a,b) rb->sim_open((a),(b))
73#undef lseek 63#undef lseek
74#define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) 64#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
75#define ICODE_ATTR
76#define IDATA_ATTR
77#else /* !SIMULATOR */ 65#else /* !SIMULATOR */
78#define opendir(a) rb->opendir((a)) 66#define opendir(a) rb->opendir((a))
79#define closedir(a) rb->closedir((a)) 67#define closedir(a) rb->closedir((a))
80#define mkdir(a,b) rb->mkdir((a),(b)) 68#define mkdir(a,b) rb->mkdir((a),(b))
81#define open(a,b) rb->open((a),(b)) 69#define open(a,b) rb->open((a),(b))
82#define lseek(a,b,c) rb->lseek((a),(b),(c)) 70#define lseek(a,b,c) rb->lseek((a),(b),(c))
83#if CONFIG_CPU == MCF5249
84#define ICODE_ATTR __attribute__ ((section(".icode")))
85#define IDATA_ATTR __attribute__ ((section(".idata")))
86#define USE_IRAM 1
87#else
88#define ICODE_ATTR
89#define IDATA_ATTR
90#endif
91#endif /* !SIMULATOR */ 71#endif /* !SIMULATOR */
92 72
93#define strcat(a,b) rb->strcat((a),(b)) 73#define strcat(a,b) rb->strcat((a),(b))
diff --git a/apps/plugins/rockboy/rtc.h b/apps/plugins/rockboy/rtc-gb.h
index 2665cd81c3..39c6145161 100644
--- a/apps/plugins/rockboy/rtc.h
+++ b/apps/plugins/rockboy/rtc-gb.h
@@ -1,7 +1,7 @@
1 1
2 2
3#ifndef __RTC_H__ 3#ifndef __RTC_GB_H__
4#define __RTC_H__ 4#define __RTC_GB_H__
5 5
6 6
7struct rtc 7struct rtc
diff --git a/apps/plugins/rockboy/rtc.c b/apps/plugins/rockboy/rtc.c
index 99e71dcfae..51c641cdce 100644
--- a/apps/plugins/rockboy/rtc.c
+++ b/apps/plugins/rockboy/rtc.c
@@ -6,7 +6,7 @@
6 6
7#include "defs.h" 7#include "defs.h"
8#include "mem.h" 8#include "mem.h"
9#include "rtc.h" 9#include "rtc-gb.h"
10#include "rc.h" 10#include "rc.h"
11 11
12struct rtc rtc; 12struct rtc rtc;
diff --git a/apps/plugins/rockboy/save.c b/apps/plugins/rockboy/save.c
index f14a7191c1..0277eb53d1 100644
--- a/apps/plugins/rockboy/save.c
+++ b/apps/plugins/rockboy/save.c
@@ -4,12 +4,12 @@
4#include <stdio.h> 4#include <stdio.h>
5 5
6#include "defs.h" 6#include "defs.h"
7#include "cpu.h" 7#include "cpu-gb.h"
8#include "cpuregs.h" 8#include "cpuregs.h"
9#include "hw.h" 9#include "hw.h"
10#include "regs.h" 10#include "regs.h"
11#include "lcd.h" 11#include "lcd-gb.h"
12#include "rtc.h" 12#include "rtc-gb.h"
13#include "mem.h" 13#include "mem.h"
14#include "sound.h" 14#include "sound.h"
15 15
diff --git a/apps/plugins/rockboy/sound.c b/apps/plugins/rockboy/sound.c
index 10fc504063..accfda2540 100644
--- a/apps/plugins/rockboy/sound.c
+++ b/apps/plugins/rockboy/sound.c
@@ -5,7 +5,7 @@
5#include "defs.h" 5#include "defs.h"
6#include "pcm.h" 6#include "pcm.h"
7#include "sound.h" 7#include "sound.h"
8#include "cpu.h" 8#include "cpu-gb.h"
9#include "hw.h" 9#include "hw.h"
10#include "regs.h" 10#include "regs.h"
11#include "rc.h" 11#include "rc.h"
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 0d4426987a..45608b9f36 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -21,7 +21,7 @@
21#include "fb.h" 21#include "fb.h"
22#include "input.h" 22#include "input.h"
23#include "rc.h" 23#include "rc.h"
24#include "lcd.h" 24#include "lcd-gb.h"
25#include "hw.h" 25#include "hw.h"
26#include "config.h" 26#include "config.h"
27 27
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 61c9899762..7de52c6e66 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -112,4 +112,16 @@
112#define CODEC_SIZE 0 112#define CODEC_SIZE 0
113#endif 113#endif
114 114
115/* IRAM usage */
116#if !defined(SIMULATOR) && /* Not for simulators */ \
117 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
118 (CONFIG_CPU == MCF5249)) /* Coldfire: core, plugins, codecs */
119#define ICODE_ATTR __attribute__ ((section(".icode")))
120#define IDATA_ATTR __attribute__ ((section(".idata")))
121#define USE_IRAM
122#else
123#define ICODE_ATTR
124#define IDATA_ATTR
125#endif
126
115#endif 127#endif