M:Robe - Fix compilation and remove some warnings

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15095 a1c6a512-1295-4272-9138-f99709370657
diff --git a/firmware/app.lds b/firmware/app.lds
index 67a7523..a95d871 100644
--- a/firmware/app.lds
+++ b/firmware/app.lds
@@ -165,7 +165,7 @@
         *(.dmabuf)
     } >IRAM0 AT> DRAM
 #elif CONFIG_CPU==DM320
-    } AT> IRAM
+    } > IRAM AT> DRAM
 #else
     } AT> DRAM
 #endif
diff --git a/firmware/boot.lds b/firmware/boot.lds
index dcc92de..a840413 100644
--- a/firmware/boot.lds
+++ b/firmware/boot.lds
@@ -104,7 +104,7 @@
     *(.text*)
   }
 
-  .data : { 
+  .data : {
     *(.icode)
     *(.irodata)
     *(.idata)
@@ -173,6 +173,8 @@
     . = DRAMORIG + 0x1000000;
 
     .text : {
+        loadaddress = .;
+        _loadaddress = .;
         *(.init.text)
         *(.text*)
         *(.glue_7)
@@ -199,7 +201,7 @@
         *(.data*)
         . = ALIGN(0x4);
         _dataend = . ;
-     } >DRAM
+    } > DRAM
 
     .stack :
     {
@@ -209,27 +211,26 @@
          . += 0x2000;
          _stackend = .;
          stackend = .;
-    } >DRAM
+    } > DRAM
 
-    .bss : {
+    .bss :
+    {
          _edata = .;
          *(.bss*);
          *(.ibss);
          *(COMMON)
          _end = .;
-     }>DRAM
+    } > DRAM
 
-    .vectors 0x0 :
+    .vectors IRAMORIG :
     {
-        loadaddress = .;
-        _loadaddress = .;
         _vectorsstart = .;
         KEEP(*(.resetvectors));
         *(.resetvectors);
         KEEP(*(.vectors));
         *(.vectors);
         _vectorsend = .;
-    } AT> DRAM
+    } AT > DRAM
     _vectorscopy = LOADADDR(.vectors);
 }
 #elif (CONFIG_CPU==IMX31L)
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h
index 328797c..cd83c5a 100644
--- a/firmware/export/config-mrobe500.h
+++ b/firmware/export/config-mrobe500.h
@@ -22,6 +22,8 @@
  */
 #define TARGET_TREE /* this target is using the target tree system */
 
+#define CPU_ARM
+
 #define CONFIG_SDRAM_START 0x00900000
 
 #define OLYMPUS_MROBE_500 1
@@ -132,7 +134,6 @@
 #define CONFIG_LCD LCD_MROBE500
 
 /* define this if the backlight can be set to a brightness */
-#define HAVE_BACKLIGHT_SET_FADING
 #define __BACKLIGHT_INIT
 
 /* Offset ( in the firmware file's header ) to the file CRC */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 7c55ee8..46d4336 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -307,8 +307,7 @@
 
 /* define for all cpus from ARM family */
 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
-    || (CONFIG_CPU == TMS320DSC25) || (CONFIG_CPU == DM320) \
-    || (CONFIG_CPU == IMX31L)
+    || (CONFIG_CPU == TMS320DSC25) || (CONFIG_CPU == IMX31L)
 #define CPU_ARM
 #endif
 
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 9f9af40..fa17483 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -183,7 +183,7 @@
 {
     int fd;
     long length;
-#if defined(CPU_COLDFIRE) || defined(CPU_PP)
+#if defined(CPU_COLDFIRE) || defined(CPU_ARM)
 #if !defined(MI4_FORMAT)
     int i;
 #endif
@@ -215,7 +215,7 @@
 
     length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA;
 
-#if defined(CPU_COLDFIRE) || defined(CPU_PP)
+#if defined(CPU_COLDFIRE) || defined(CPU_PP) || (CONFIG_CPU==DM320)
     /* Read and save checksum */
     lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET);
     if (read(fd, &file_checksum, 4) != 4) {
@@ -251,7 +251,7 @@
     checksum = chksum_crc32 (audiobuf, length);
 #else
     checksum = MODEL_NUMBER;
-    
+
     for(i = 0;i < length;i++) {
         checksum += audiobuf[i];
     }
@@ -282,7 +282,7 @@
         rolo_error("File length mismatch");
         return -1;
     }
-    
+
     /* Read and save checksum */
     lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET);
     if (read(fd, &file_checksum, 2) != 2) {
@@ -306,7 +306,7 @@
     lcd_update();
 
     checksum = descramble(audiobuf + length, audiobuf, length);
-    
+
     /* Verify checksum against file header */
     if (checksum != file_checksum) {
         rolo_error("Checksum Error");
@@ -317,7 +317,7 @@
     lcd_update();
 
     set_irq_level(HIGHEST_IRQ_LEVEL);
-    
+
     /* Calling these 2 initialization routines was necessary to get the
        the origional Archos version of the firmware to load and execute. */
     system_init();           /* Initialize system for restart */
diff --git a/firmware/target/arm/tms320dm320/crt0.S b/firmware/target/arm/tms320dm320/crt0.S
index 7ff659d..68c0d9e 100755
--- a/firmware/target/arm/tms320dm320/crt0.S
+++ b/firmware/target/arm/tms320dm320/crt0.S
@@ -66,7 +66,6 @@
     bhi    1b
 #endif
 #if 1
-
     /* Copy the IRAM */
     ldr    r2, =_iramcopy
     ldr    r3, =_iramstart
@@ -112,15 +111,14 @@
     /* Switch to supervisor mode (no IRQ) */
     msr    cpsr_c, #0xd3
     ldr    sp, =stackend
-
+    
 #ifdef BOOTLOADER
     /* get the high part of our execute address */
     ldr    r2, =0xffffff00
     and    r4, pc, r2
 
     /* Copy bootloader to safe area - 0x01900000 */
-    mov    r5, #0x00900000
-    add    r5, r5, #0x01000000
+    mov    r5, #0x01900000
     ldr    r6, = _dataend
     sub    r0, r6, r5       /* length of loader */
     add    r0, r4, r0     /* r0 points to start of loader */
diff --git a/firmware/target/arm/tms320dm320/i2c-dm320.c b/firmware/target/arm/tms320dm320/i2c-dm320.c
index f1383fe..4ca5eb7 100755
--- a/firmware/target/arm/tms320dm320/i2c-dm320.c
+++ b/firmware/target/arm/tms320dm320/i2c-dm320.c
@@ -19,14 +19,15 @@
 #include "system.h"
 #include "i2c-dm320.h"
 
+#if 0
 static int i2c_getack(void)
 {
-
+    return 0;
 }
 
 static int i2c_start(void)
 {
-
+    return 0;
 }
 
 static void i2c_stop(void)
@@ -36,12 +37,16 @@
 
 static int i2c_outb(unsigned char byte)
 {
-
+    (void) byte;
+    return 0;
 }
+#endif
 
 void i2c_write(int addr, const unsigned char *buf, int count)
 {
-
+    (void) addr;
+    (void) buf;
+    (void) count;
 }
 
 void i2c_init(void)
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
index c30422f..21ef7f8 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
@@ -30,6 +30,7 @@
 #include "backlight-target.h"
 #include "uart-target.h"
 #include "tsc2100.h"
+#include "string.h"
 
 #define BUTTON_TIMEOUT 50
 
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c
index a41c233..eab0c0a 100755
--- a/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/dm320codec-mr500.c
@@ -37,3 +37,8 @@
 void audiohw_close(void)
 {
 }
+
+void audiohw_mute(bool mute)
+{
+    (void) mute;
+}
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
index aad7733..8660058 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
@@ -147,7 +147,7 @@
 {
     /* Caches for chroma data so it only need be recaculated every other
        line */
-    unsigned char chroma_buf[LCD_HEIGHT/2*3]; /* 480 bytes */
+/*    unsigned char chroma_buf[LCD_HEIGHT/2*3];*/ /* 480 bytes */
     unsigned char const * yuv_src[3];
     off_t z;
 
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
index 3bc9124..810fedc 100755
--- a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
@@ -16,7 +16,6 @@
  * KIND, either express or implied.
  *
  ****************************************************************************/
-#include <stdlib.h>
 #include "system.h"
 #include "kernel.h"
 #include "logf.h"
@@ -24,30 +23,36 @@
 #include "sound.h"
 #include "file.h"
 
-static void _pcm_apply_settings(void)
+void pcm_postinit(void)
 {
+
+}
+
+const void * pcm_play_dma_get_peak_buffer(int *count)
+{
+    (void) count;
+    return 0;
+}
+
+void pcm_play_dma_init(void)
+{
+
 }
 
 void pcm_apply_settings(void)
 {
+
 }
 
-void pcm_init(void)
+void pcm_set_frequency(unsigned int frequency)
 {
-}
-
-void pcm_postinit(void)
-{
+    (void) frequency;
 }
 
 void pcm_play_dma_start(const void *addr, size_t size)
 {
-
-}
-
-static void pcm_play_dma_stop_fiq(void)
-{
-
+    (void) addr;
+    (void) size;
 }
 
 void pcm_play_dma_stop(void)
@@ -55,31 +60,22 @@
 
 }
 
-void pcm_play_pause_pause(void)
+void pcm_play_lock(void)
 {
+
 }
 
-void pcm_play_pause_unpause(void)
+void pcm_play_unlock(void)
 {
+
 }
 
-void pcm_set_frequency(unsigned int frequency)
+void pcm_play_dma_pause(bool pause)
 {
+    (void) pause;
 }
 
 size_t pcm_get_bytes_waiting(void)
 {
+    return 0;
 }
-
-void pcm_mute(bool mute)
-{
-}
-
-/**
- * Return playback peaks - Peaks ahead in the DMA buffer based upon the
- *                         calling period to attempt to compensate for
- *                         delay.
- */
-void pcm_calculate_peaks(int *left, int *right)
-{
-} /* pcm_calculate_peaks */