diff options
-rw-r--r-- | apps/buffering.c | 6 | ||||
-rw-r--r-- | apps/codecs.h | 4 | ||||
-rw-r--r-- | apps/main.c | 2 | ||||
-rw-r--r-- | apps/mpeg.c | 4 | ||||
-rw-r--r-- | apps/plugin.h | 4 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 2 | ||||
-rw-r--r-- | apps/plugins/wavplay.c | 2 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 8 | ||||
-rw-r--r-- | apps/settings_list.c | 4 | ||||
-rw-r--r-- | apps/talk.c | 2 | ||||
-rw-r--r-- | firmware/buffer.c | 2 | ||||
-rw-r--r-- | firmware/common/dir_uncached.c | 2 | ||||
-rw-r--r-- | firmware/common/dircache.c | 2 | ||||
-rw-r--r-- | firmware/drivers/ata.c | 2 | ||||
-rw-r--r-- | firmware/export/config/archosrecorder.h | 2 | ||||
-rw-r--r-- | firmware/export/imx31l.h | 2 | ||||
-rw-r--r-- | firmware/font.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/system-target.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/crt0-pp.S | 4 | ||||
-rw-r--r-- | firmware/target/arm/crt0-pp502x-bl-usb.S | 2 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/crt0.S | 2 | ||||
-rw-r--r-- | firmware/target/arm/thread-pp.c | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/crt0.S | 4 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/system-iriver.c | 2 | ||||
-rw-r--r-- | firmware/target/mips/mmu-mips.c | 2 | ||||
-rw-r--r-- | tools/root.make | 2 |
26 files changed, 33 insertions, 41 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index 46b6455178..8d41324190 100644 --- a/apps/buffering.c +++ b/apps/buffering.c | |||
@@ -119,7 +119,7 @@ static volatile size_t buf_ridx; /* current reading position */ | |||
119 | 119 | ||
120 | /* Configuration */ | 120 | /* Configuration */ |
121 | static size_t conf_watermark = 0; /* Level to trigger filebuf fill */ | 121 | static size_t conf_watermark = 0; /* Level to trigger filebuf fill */ |
122 | #if MEM > 8 | 122 | #if MEMORYSIZE > 8 |
123 | static size_t high_watermark = 0; /* High watermark for rebuffer */ | 123 | static size_t high_watermark = 0; /* High watermark for rebuffer */ |
124 | #endif | 124 | #endif |
125 | 125 | ||
@@ -1509,7 +1509,7 @@ void buffering_thread(void) | |||
1509 | #if 0 | 1509 | #if 0 |
1510 | /* TODO: This needs to be fixed to use the idle callback, disable it | 1510 | /* TODO: This needs to be fixed to use the idle callback, disable it |
1511 | * for simplicity until its done right */ | 1511 | * for simplicity until its done right */ |
1512 | #if MEM > 8 | 1512 | #if MEMORYSIZE > 8 |
1513 | /* If the disk is spinning, take advantage by filling the buffer */ | 1513 | /* If the disk is spinning, take advantage by filling the buffer */ |
1514 | else if (storage_disk_is_active() && queue_empty(&buffering_queue)) | 1514 | else if (storage_disk_is_active() && queue_empty(&buffering_queue)) |
1515 | { | 1515 | { |
@@ -1589,7 +1589,7 @@ bool buffering_reset(char *buf, size_t buflen) | |||
1589 | base_handle_id = -1; | 1589 | base_handle_id = -1; |
1590 | 1590 | ||
1591 | /* Set the high watermark as 75% full...or 25% empty :) */ | 1591 | /* Set the high watermark as 75% full...or 25% empty :) */ |
1592 | #if MEM > 8 | 1592 | #if MEMORYSIZE > 8 |
1593 | high_watermark = 3*buflen / 4; | 1593 | high_watermark = 3*buflen / 4; |
1594 | #endif | 1594 | #endif |
1595 | 1595 | ||
diff --git a/apps/codecs.h b/apps/codecs.h index 1c0b9da6ba..c3ef7c154e 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -27,10 +27,6 @@ | |||
27 | #define NO_REDEFINES_PLEASE | 27 | #define NO_REDEFINES_PLEASE |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifndef MEM | ||
31 | #define MEM 2 | ||
32 | #endif | ||
33 | |||
34 | #include <stdbool.h> | 30 | #include <stdbool.h> |
35 | #include <stdlib.h> | 31 | #include <stdlib.h> |
36 | #include "strlcpy.h" | 32 | #include "strlcpy.h" |
diff --git a/apps/main.c b/apps/main.c index a7d6dc395c..6378833973 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -430,7 +430,7 @@ static void init(void) | |||
430 | system_init(); | 430 | system_init(); |
431 | #if defined(IPOD_VIDEO) | 431 | #if defined(IPOD_VIDEO) |
432 | audiobufend=(unsigned char *)audiobufend_lds; | 432 | audiobufend=(unsigned char *)audiobufend_lds; |
433 | if(MEM==64 && probed_ramsize!=64) | 433 | if(MEMORYSIZE==64 && probed_ramsize!=64) |
434 | { | 434 | { |
435 | audiobufend -= (32<<20); | 435 | audiobufend -= (32<<20); |
436 | } | 436 | } |
diff --git a/apps/mpeg.c b/apps/mpeg.c index 583e4e2122..bdca92048f 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c | |||
@@ -1623,7 +1623,7 @@ static void mpeg_thread(void) | |||
1623 | #if (CONFIG_STORAGE & STORAGE_MMC) | 1623 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1624 | /* MMC is slow, so don't read too large chunks */ | 1624 | /* MMC is slow, so don't read too large chunks */ |
1625 | amount_to_read = MIN(0x40000, amount_to_read); | 1625 | amount_to_read = MIN(0x40000, amount_to_read); |
1626 | #elif MEM == 8 | 1626 | #elif MEMORYSIZE == 8 |
1627 | amount_to_read = MIN(0x100000, amount_to_read); | 1627 | amount_to_read = MIN(0x100000, amount_to_read); |
1628 | #endif | 1628 | #endif |
1629 | 1629 | ||
@@ -1933,7 +1933,7 @@ static void mpeg_thread(void) | |||
1933 | #if (CONFIG_STORAGE & STORAGE_MMC) | 1933 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1934 | /* MMC is slow, so don't save too large chunks at once */ | 1934 | /* MMC is slow, so don't save too large chunks at once */ |
1935 | amount_to_save = MIN(0x40000, amount_to_save); | 1935 | amount_to_save = MIN(0x40000, amount_to_save); |
1936 | #elif MEM == 8 | 1936 | #elif MEMORYSIZE == 8 |
1937 | amount_to_save = MIN(0x100000, amount_to_save); | 1937 | amount_to_save = MIN(0x100000, amount_to_save); |
1938 | #endif | 1938 | #endif |
1939 | rc = write(mpeg_file, audiobuf + audiobuf_read, | 1939 | rc = write(mpeg_file, audiobuf + audiobuf_read, |
diff --git a/apps/plugin.h b/apps/plugin.h index 4b11ac31e9..77dedc539a 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -27,10 +27,6 @@ | |||
27 | #define NO_REDEFINES_PLEASE | 27 | #define NO_REDEFINES_PLEASE |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifndef MEM | ||
31 | #define MEM 2 | ||
32 | #endif | ||
33 | |||
34 | #include <stdbool.h> | 30 | #include <stdbool.h> |
35 | #include <inttypes.h> | 31 | #include <inttypes.h> |
36 | #include <sys/types.h> | 32 | #include <sys/types.h> |
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 01a706be45..4dc88fdf5a 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -430,7 +430,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
430 | = rb->plugin_get_audio_buffer(&audio_buffer_free); | 430 | = rb->plugin_get_audio_buffer(&audio_buffer_free); |
431 | plugbuf=false; | 431 | plugbuf=false; |
432 | } | 432 | } |
433 | #if MEM <= 8 && (CONFIG_PLATFORM & PLATFORM_NATIVE) | 433 | #if MEMORYSIZE <= 8 && (CONFIG_PLATFORM & PLATFORM_NATIVE) |
434 | /* loaded as an overlay plugin, protect from overwriting ourselves */ | 434 | /* loaded as an overlay plugin, protect from overwriting ourselves */ |
435 | if ((unsigned)(plugin_start_addr - (unsigned char *)audio_bufferbase) | 435 | if ((unsigned)(plugin_start_addr - (unsigned char *)audio_bufferbase) |
436 | < audio_buffer_free) | 436 | < audio_buffer_free) |
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 887c5cdd55..073af31280 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c | |||
@@ -3600,7 +3600,7 @@ int play_file(char* filename) | |||
3600 | wanted = MIN(free_space, aud_size - aud_write); | 3600 | wanted = MIN(free_space, aud_size - aud_write); |
3601 | #if (CONFIG_STORAGE & STORAGE_MMC) | 3601 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3602 | wanted = MIN(wanted, 256*1024); | 3602 | wanted = MIN(wanted, 256*1024); |
3603 | #elif MEM == 8 | 3603 | #elif MEMORYSIZE == 8 |
3604 | wanted = MIN(wanted, 1024*1024); | 3604 | wanted = MIN(wanted, 1024*1024); |
3605 | #endif | 3605 | #endif |
3606 | if (available() < low_water) | 3606 | if (available() < low_water) |
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 0221963b2b..6ecb75f608 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -131,7 +131,7 @@ static unsigned long pre_record_ticks; /* pre-record time in ticks */ | |||
131 | ****************************************************************************/ | 131 | ****************************************************************************/ |
132 | 132 | ||
133 | /** buffer parameters where incoming PCM data is placed **/ | 133 | /** buffer parameters where incoming PCM data is placed **/ |
134 | #if MEM <= 2 | 134 | #if MEMORYSIZE <= 2 |
135 | #define PCM_NUM_CHUNKS 16 /* Power of 2 */ | 135 | #define PCM_NUM_CHUNKS 16 /* Power of 2 */ |
136 | #else | 136 | #else |
137 | #define PCM_NUM_CHUNKS 256 /* Power of 2 */ | 137 | #define PCM_NUM_CHUNKS 256 /* Power of 2 */ |
@@ -180,13 +180,13 @@ static int flood_watermark; /* boost thread priority when here */ | |||
180 | #ifdef HAVE_PRIORITY_SCHEDULING | 180 | #ifdef HAVE_PRIORITY_SCHEDULING |
181 | #define PRIO_SECONDS 10 /* max flush time before priority boost */ | 181 | #define PRIO_SECONDS 10 /* max flush time before priority boost */ |
182 | #endif | 182 | #endif |
183 | #if MEM <= 2 | 183 | #if MEMORYSIZE <= 2 |
184 | /* fractions must be integer fractions of 4 because they are evaluated with | 184 | /* fractions must be integer fractions of 4 because they are evaluated with |
185 | * X*4*XXX_SECONDS, that way we avoid float calculation */ | 185 | * X*4*XXX_SECONDS, that way we avoid float calculation */ |
186 | #define LOW_SECONDS 1/4 /* low watermark time till empty */ | 186 | #define LOW_SECONDS 1/4 /* low watermark time till empty */ |
187 | #define PANIC_SECONDS 1/2 /* flood watermark time until full */ | 187 | #define PANIC_SECONDS 1/2 /* flood watermark time until full */ |
188 | #define FLUSH_SECONDS 1 /* flush watermark time until full */ | 188 | #define FLUSH_SECONDS 1 /* flush watermark time until full */ |
189 | #elif MEM <= 16 | 189 | #elif MEMORYSIZE <= 16 |
190 | #define LOW_SECONDS 1 /* low watermark time till empty */ | 190 | #define LOW_SECONDS 1 /* low watermark time till empty */ |
191 | #define PANIC_SECONDS 5 /* flood watermark time until full */ | 191 | #define PANIC_SECONDS 5 /* flood watermark time until full */ |
192 | #define FLUSH_SECONDS 7 /* flush watermark time until full */ | 192 | #define FLUSH_SECONDS 7 /* flush watermark time until full */ |
@@ -194,7 +194,7 @@ static int flood_watermark; /* boost thread priority when here */ | |||
194 | #define LOW_SECONDS 1 /* low watermark time till empty */ | 194 | #define LOW_SECONDS 1 /* low watermark time till empty */ |
195 | #define PANIC_SECONDS 8 | 195 | #define PANIC_SECONDS 8 |
196 | #define FLUSH_SECONDS 10 | 196 | #define FLUSH_SECONDS 10 |
197 | #endif /* MEM */ | 197 | #endif /* MEMORYSIZE */ |
198 | 198 | ||
199 | /** encoder events **/ | 199 | /** encoder events **/ |
200 | static void (*enc_events_callback)(enum enc_events event, void *data); | 200 | static void (*enc_events_callback)(enum enc_events event, void *data); |
diff --git a/apps/settings_list.c b/apps/settings_list.c index c6f5e677eb..94910c0818 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -760,7 +760,7 @@ const struct settings_list settings[] = { | |||
760 | SYSTEM_SETTING(NVRAM(4), topruntime, 0), | 760 | SYSTEM_SETTING(NVRAM(4), topruntime, 0), |
761 | INT_SETTING(F_BANFROMQS, max_files_in_playlist, | 761 | INT_SETTING(F_BANFROMQS, max_files_in_playlist, |
762 | LANG_MAX_FILES_IN_PLAYLIST, | 762 | LANG_MAX_FILES_IN_PLAYLIST, |
763 | #if MEM > 1 | 763 | #if MEMORYSIZE > 1 |
764 | 10000, | 764 | 10000, |
765 | #else | 765 | #else |
766 | 400, | 766 | 400, |
@@ -768,7 +768,7 @@ const struct settings_list settings[] = { | |||
768 | "max files in playlist", UNIT_INT, 1000, 32000, 1000, | 768 | "max files in playlist", UNIT_INT, 1000, 32000, 1000, |
769 | NULL, NULL, NULL), | 769 | NULL, NULL, NULL), |
770 | INT_SETTING(F_BANFROMQS, max_files_in_dir, LANG_MAX_FILES_IN_DIR, | 770 | INT_SETTING(F_BANFROMQS, max_files_in_dir, LANG_MAX_FILES_IN_DIR, |
771 | #if MEM > 1 | 771 | #if MEMORYSIZE > 1 |
772 | 1000, | 772 | 1000, |
773 | #else | 773 | #else |
774 | 200, | 774 | 200, |
diff --git a/apps/talk.c b/apps/talk.c index 7dbfb2ef77..ad34437b0f 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -112,7 +112,7 @@ struct queue_entry /* one entry of the internal queue */ | |||
112 | /* The MMC storage on the Ondios is slow enough that we want to buffer the | 112 | /* The MMC storage on the Ondios is slow enough that we want to buffer the |
113 | * talk clips only when they are needed */ | 113 | * talk clips only when they are needed */ |
114 | # define TALK_PROGRESSIVE_LOAD | 114 | # define TALK_PROGRESSIVE_LOAD |
115 | #elif CONFIG_CODEC == SWCODEC && MEM <= 2 | 115 | #elif CONFIG_CODEC == SWCODEC && MEMORYSIZE <= 2 |
116 | /* The entire voice file wouldn't fit in memory together with codecs, so we | 116 | /* The entire voice file wouldn't fit in memory together with codecs, so we |
117 | * load clips each time they are accessed */ | 117 | * load clips each time they are accessed */ |
118 | # define TALK_PARTIAL_LOAD | 118 | # define TALK_PARTIAL_LOAD |
diff --git a/firmware/buffer.c b/firmware/buffer.c index 4ede24df21..a1a9b0556b 100644 --- a/firmware/buffer.c +++ b/firmware/buffer.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "logf.h" | 24 | #include "logf.h" |
25 | 25 | ||
26 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 26 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
27 | unsigned char audiobuffer[(MEM*1024-256)*1024]; | 27 | unsigned char audiobuffer[(MEMORYSIZE*1024-256)*1024]; |
28 | unsigned char *audiobufend = audiobuffer + sizeof(audiobuffer); | 28 | unsigned char *audiobufend = audiobuffer + sizeof(audiobuffer); |
29 | #else | 29 | #else |
30 | /* defined in linker script */ | 30 | /* defined in linker script */ |
diff --git a/firmware/common/dir_uncached.c b/firmware/common/dir_uncached.c index 00123c1b07..14c8522822 100644 --- a/firmware/common/dir_uncached.c +++ b/firmware/common/dir_uncached.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "debug.h" | 28 | #include "debug.h" |
29 | #include "filefuncs.h" | 29 | #include "filefuncs.h" |
30 | 30 | ||
31 | #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) | 31 | #if (MEMORYSIZE > 8) |
32 | #define MAX_OPEN_DIRS 12 | 32 | #define MAX_OPEN_DIRS 12 |
33 | #else | 33 | #else |
34 | #define MAX_OPEN_DIRS 8 | 34 | #define MAX_OPEN_DIRS 8 |
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index e8a5e7cbb1..1e0e0223af 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #define DIRCACHE_BUILD 1 | 51 | #define DIRCACHE_BUILD 1 |
52 | #define DIRCACHE_STOP 2 | 52 | #define DIRCACHE_STOP 2 |
53 | 53 | ||
54 | #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) | 54 | #if (MEMORYSIZE > 8) |
55 | #define MAX_OPEN_DIRS 12 | 55 | #define MAX_OPEN_DIRS 12 |
56 | #else | 56 | #else |
57 | #define MAX_OPEN_DIRS 8 | 57 | #define MAX_OPEN_DIRS 8 |
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 2cdd67482a..a16a6cc15e 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -79,7 +79,7 @@ | |||
79 | static unsigned int ata_thread_id = 0; | 79 | static unsigned int ata_thread_id = 0; |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #if defined(MAX_PHYS_SECTOR_SIZE) && MEM == 64 | 82 | #if defined(MAX_PHYS_SECTOR_SIZE) && MEMORYSIZE == 64 |
83 | /* Hack - what's the deal with 5g? */ | 83 | /* Hack - what's the deal with 5g? */ |
84 | struct ata_lock | 84 | struct ata_lock |
85 | { | 85 | { |
diff --git a/firmware/export/config/archosrecorder.h b/firmware/export/config/archosrecorder.h index f64dd3cf8d..be7c872b0e 100644 --- a/firmware/export/config/archosrecorder.h +++ b/firmware/export/config/archosrecorder.h | |||
@@ -80,7 +80,7 @@ | |||
80 | #define BATTERY_CAPACITY_INC 50 /* capacity increment */ | 80 | #define BATTERY_CAPACITY_INC 50 /* capacity increment */ |
81 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | 81 | #define BATTERY_TYPES_COUNT 1 /* only one type */ |
82 | 82 | ||
83 | #if MEM < 8 | 83 | #if MEMORYSIZE < 8 |
84 | #define CURRENT_NORMAL 145 /* usual current in mA */ | 84 | #define CURRENT_NORMAL 145 /* usual current in mA */ |
85 | #else | 85 | #else |
86 | #define CURRENT_NORMAL 145 *100 / 122 /* assuming 192 kbps, the running time is 22% longer with 8MB */ | 86 | #define CURRENT_NORMAL 145 *100 / 122 /* assuming 192 kbps, the running time is 22% longer with 8MB */ |
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h index 7cb452d3cb..ca4ab0c019 100644 --- a/firmware/export/imx31l.h +++ b/firmware/export/imx31l.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define REG32_PTR_T volatile unsigned long * | 28 | #define REG32_PTR_T volatile unsigned long * |
29 | 29 | ||
30 | /* Place in the section with the framebuffer */ | 30 | /* Place in the section with the framebuffer */ |
31 | #define TTB_BASE_ADDR (CSD0_BASE_ADDR + (MEM*0x100000) - TTB_SIZE) | 31 | #define TTB_BASE_ADDR (CSD0_BASE_ADDR + (MEMORYSIZE*0x100000) - TTB_SIZE) |
32 | #define TTB_SIZE (0x4000) | 32 | #define TTB_SIZE (0x4000) |
33 | #define IRAM_SIZE (0x4000) | 33 | #define IRAM_SIZE (0x4000) |
34 | #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR) | 34 | #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR) |
diff --git a/firmware/font.c b/firmware/font.c index cd74459b1e..8538ef9490 100644 --- a/firmware/font.c +++ b/firmware/font.c | |||
@@ -44,7 +44,7 @@ | |||
44 | /* max static loadable font buffer size */ | 44 | /* max static loadable font buffer size */ |
45 | #ifndef MAX_FONT_SIZE | 45 | #ifndef MAX_FONT_SIZE |
46 | #if LCD_HEIGHT > 64 | 46 | #if LCD_HEIGHT > 64 |
47 | #if MEM > 2 | 47 | #if MEMORYSIZE > 2 |
48 | #define MAX_FONT_SIZE 60000 | 48 | #define MAX_FONT_SIZE 60000 |
49 | #else | 49 | #else |
50 | #define MAX_FONT_SIZE 10000 | 50 | #define MAX_FONT_SIZE 10000 |
diff --git a/firmware/target/arm/as3525/system-target.h b/firmware/target/arm/as3525/system-target.h index 6db16af040..7c9dcccc0c 100644 --- a/firmware/target/arm/as3525/system-target.h +++ b/firmware/target/arm/as3525/system-target.h | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define AS3525_UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000)) | 43 | #define AS3525_UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000)) |
44 | #define AS3525_PHYSICAL_ADDR(a) \ | 44 | #define AS3525_PHYSICAL_ADDR(a) \ |
45 | ((typeof(a)) ((((uintptr_t)(a)) & (MEM*0x100000)) \ | 45 | ((typeof(a)) ((((uintptr_t)(a)) & (MEMORYSIZE*0x100000)) \ |
46 | ? (((uintptr_t)(a)) - IRAM_ORIG) \ | 46 | ? (((uintptr_t)(a)) - IRAM_ORIG) \ |
47 | : ((uintptr_t)(a)))) | 47 | : ((uintptr_t)(a)))) |
48 | 48 | ||
diff --git a/firmware/target/arm/crt0-pp.S b/firmware/target/arm/crt0-pp.S index 585455f821..12c885068d 100644 --- a/firmware/target/arm/crt0-pp.S +++ b/firmware/target/arm/crt0-pp.S | |||
@@ -48,7 +48,7 @@ start: | |||
48 | .equ CACHE_CTRL, 0xcf004024 | 48 | .equ CACHE_CTRL, 0xcf004024 |
49 | .equ MMAP_LOG, 0xf000f000 /* MMAP0 */ | 49 | .equ MMAP_LOG, 0xf000f000 /* MMAP0 */ |
50 | .equ MMAP_PHYS, 0xf000f004 | 50 | .equ MMAP_PHYS, 0xf000f004 |
51 | #if MEM > 32 | 51 | #if MEMORYSIZE > 32 |
52 | .equ MMAP_MASK, 0x00003c00 | 52 | .equ MMAP_MASK, 0x00003c00 |
53 | #else | 53 | #else |
54 | .equ MMAP_MASK, 0x00003e00 | 54 | .equ MMAP_MASK, 0x00003e00 |
@@ -69,7 +69,7 @@ start: | |||
69 | .equ CACHE_CTRL, 0x6000c000 | 69 | .equ CACHE_CTRL, 0x6000c000 |
70 | .equ MMAP_LOG, 0xf000f000 /* MMAP0 */ | 70 | .equ MMAP_LOG, 0xf000f000 /* MMAP0 */ |
71 | .equ MMAP_PHYS, 0xf000f004 | 71 | .equ MMAP_PHYS, 0xf000f004 |
72 | #if MEM > 32 | 72 | #if MEMORYSIZE > 32 |
73 | .equ MMAP_MASK, 0x00003c00 | 73 | .equ MMAP_MASK, 0x00003c00 |
74 | #else | 74 | #else |
75 | .equ MMAP_MASK, 0x00003e00 | 75 | .equ MMAP_MASK, 0x00003e00 |
diff --git a/firmware/target/arm/crt0-pp502x-bl-usb.S b/firmware/target/arm/crt0-pp502x-bl-usb.S index c360596001..c8b7fb4ee8 100644 --- a/firmware/target/arm/crt0-pp502x-bl-usb.S +++ b/firmware/target/arm/crt0-pp502x-bl-usb.S | |||
@@ -47,7 +47,7 @@ | |||
47 | .equ CACHE_ENAB, 0x1 | 47 | .equ CACHE_ENAB, 0x1 |
48 | .equ CACHE_OP_COMMIT_DISCARD, 0x1 | 48 | .equ CACHE_OP_COMMIT_DISCARD, 0x1 |
49 | .equ CACHE_OP_COMMIT , 0x0 | 49 | .equ CACHE_OP_COMMIT , 0x0 |
50 | #if MEM > 32 | 50 | #if MEMORYSIZE > 32 |
51 | .equ MMAP_MASK, 0x00003c00 | 51 | .equ MMAP_MASK, 0x00003c00 |
52 | #else | 52 | #else |
53 | .equ MMAP_MASK, 0x00003e00 | 53 | .equ MMAP_MASK, 0x00003e00 |
diff --git a/firmware/target/arm/tcc77x/crt0.S b/firmware/target/arm/tcc77x/crt0.S index 7c900212db..251fd0c903 100644 --- a/firmware/target/arm/tcc77x/crt0.S +++ b/firmware/target/arm/tcc77x/crt0.S | |||
@@ -109,7 +109,7 @@ start_loc: | |||
109 | mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */ | 109 | mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */ |
110 | #endif | 110 | #endif |
111 | mov r1, #0x20000000 /* Destination: 1MB from end of DRAM */ | 111 | mov r1, #0x20000000 /* Destination: 1MB from end of DRAM */ |
112 | add r1, r1, #((MEM - 1) * 0x100000) | 112 | add r1, r1, #((MEMORYSIZE - 1) * 0x100000) |
113 | 113 | ||
114 | ldr r2, =_dataend | 114 | ldr r2, =_dataend |
115 | 1: | 115 | 1: |
diff --git a/firmware/target/arm/thread-pp.c b/firmware/target/arm/thread-pp.c index 0c077779e5..3eb7238a25 100644 --- a/firmware/target/arm/thread-pp.c +++ b/firmware/target/arm/thread-pp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | #if defined(MAX_PHYS_SECTOR_SIZE) && MEM == 64 | 24 | #if defined(MAX_PHYS_SECTOR_SIZE) && MEMORYSIZE == 64 |
25 | /* Support a special workaround object for large-sector disks */ | 25 | /* Support a special workaround object for large-sector disks */ |
26 | #define IF_NO_SKIP_YIELD(...) __VA_ARGS__ | 26 | #define IF_NO_SKIP_YIELD(...) __VA_ARGS__ |
27 | #endif | 27 | #endif |
diff --git a/firmware/target/coldfire/crt0.S b/firmware/target/coldfire/crt0.S index 7734970ff0..e6717710b1 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S | |||
@@ -138,7 +138,7 @@ start: | |||
138 | 138 | ||
139 | /* Set up the DRAM controller. The refresh is based on the 11.2896MHz | 139 | /* Set up the DRAM controller. The refresh is based on the 11.2896MHz |
140 | clock (5.6448MHz bus frequency). We haven't yet started the PLL */ | 140 | clock (5.6448MHz bus frequency). We haven't yet started the PLL */ |
141 | #if MEM < 32 | 141 | #if MEMORYSIZE < 32 |
142 | move.w #0x8004,%d0 /* DCR - Synchronous, 80 cycle refresh */ | 142 | move.w #0x8004,%d0 /* DCR - Synchronous, 80 cycle refresh */ |
143 | #else | 143 | #else |
144 | move.w #0x8001,%d0 /* DCR - Synchronous, 32 cycle refresh */ | 144 | move.w #0x8001,%d0 /* DCR - Synchronous, 32 cycle refresh */ |
@@ -153,7 +153,7 @@ start: | |||
153 | In our case this means that we set the base address 16M ahead and | 153 | In our case this means that we set the base address 16M ahead and |
154 | use a 64M mask. | 154 | use a 64M mask. |
155 | */ | 155 | */ |
156 | #if MEM < 32 | 156 | #if MEMORYSIZE < 32 |
157 | move.l #0x31002324,%d0 /* DACR0 - Base 0x31000000, Banks on 21 and up, | 157 | move.l #0x31002324,%d0 /* DACR0 - Base 0x31000000, Banks on 21 and up, |
158 | CAS latency 2, Page mode, No refresh yet */ | 158 | CAS latency 2, Page mode, No refresh yet */ |
159 | move.l %d0,(0x108,%a0) | 159 | move.l %d0,(0x108,%a0) |
diff --git a/firmware/target/coldfire/iriver/system-iriver.c b/firmware/target/coldfire/iriver/system-iriver.c index 1916eec0cd..1ceb89bd16 100644 --- a/firmware/target/coldfire/iriver/system-iriver.c +++ b/firmware/target/coldfire/iriver/system-iriver.c | |||
@@ -49,7 +49,7 @@ | |||
49 | * 124185600 11 0x018ae025 59 29 0x1180 0x1580 0x2180 3 1 1 | 49 | * 124185600 11 0x018ae025 59 29 0x1180 0x1580 0x2180 3 1 1 |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #if MEM < 32 | 52 | #if MEMORYSIZE < 32 |
53 | #define MAX_REFRESH_TIMER 59 | 53 | #define MAX_REFRESH_TIMER 59 |
54 | #define NORMAL_REFRESH_TIMER 21 | 54 | #define NORMAL_REFRESH_TIMER 21 |
55 | #define DEFAULT_REFRESH_TIMER 4 | 55 | #define DEFAULT_REFRESH_TIMER 4 |
diff --git a/firmware/target/mips/mmu-mips.c b/firmware/target/mips/mmu-mips.c index 5ea1015acf..31b07409d5 100644 --- a/firmware/target/mips/mmu-mips.c +++ b/firmware/target/mips/mmu-mips.c | |||
@@ -121,7 +121,7 @@ void mmu_init(void) | |||
121 | local_flush_tlb_all(); | 121 | local_flush_tlb_all(); |
122 | /* | 122 | /* |
123 | map_address(0x80000000, 0x80000000, 0x4000, K_CacheAttrC); | 123 | map_address(0x80000000, 0x80000000, 0x4000, K_CacheAttrC); |
124 | map_address(0x80004000, 0x80004000, MEM * 0x100000, K_CacheAttrC); | 124 | map_address(0x80004000, 0x80004000, MEMORYSIZE * 0x100000, K_CacheAttrC); |
125 | */ | 125 | */ |
126 | } | 126 | } |
127 | 127 | ||
diff --git a/tools/root.make b/tools/root.make index 907d3928d4..73ccf3ac8d 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | include $(TOOLSDIR)/functions.make | 10 | include $(TOOLSDIR)/functions.make |
11 | 11 | ||
12 | DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \ | 12 | DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) $(TARGET) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \ | 13 | -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \ |
14 | $(EXTRA_DEFINES) # <-- -DSIMULATOR or not | 14 | $(EXTRA_DEFINES) # <-- -DSIMULATOR or not |
15 | INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) | 15 | INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) |