]> hackdaworld.org Git - my-code/arm.git/commitdiff
correct ext mem config (thnx colibri) + care for endianness
authorhackbard <hackbard@staubsauger.localdomain>
Tue, 14 Aug 2007 21:24:20 +0000 (23:24 +0200)
committerhackbard <hackbard@staubsauger.localdomain>
Tue, 14 Aug 2007 21:24:20 +0000 (23:24 +0200)
betty/Makefile
betty/fwbc.c

index d9f49e7ed4b0fbee28b1eaa5e40ed032cee51aec..8d1003012df31203f1785fbf0475c01e8e5f0efc 100644 (file)
@@ -2,7 +2,7 @@ CC = gcc
 CFLAGS = -Wall
 
 ARMCC = /scratch/arm-elf/bin/arm-elf-gcc
-ARMCFLAGS = -Wall -mcpu=arm7tdmi-s 
+ARMCFLAGS = -Wall -mcpu=arm7tdmi-s -nostartfiles -nostdlib
 ARMOBJCOPY = /scratch/arm-elf/bin/arm-elf-objcopy
 
 HOSTOBJECTS = lpcload fwdump
index 169405583079b29a4a41ed078b2bf9be522b0ce4..e8fea0da70495e3ff944fa98820a5ad0bc51cd93 100644 (file)
@@ -77,8 +77,8 @@ int main(void) {
 
        /* external memory init */
 
-       //BCFG0=;
-       //BCFG2=;
+       BCFG0=0x1000FBEF;               // no boot[1:0] influence? (thnx colibri)
+                                       // BCFG2 should be fine as is
        flash=(u16 *)BANK0;
 
        /* wait for fwdump to send transmit start character */
@@ -93,10 +93,10 @@ int main(void) {
        for(i=0;i<524288;i++) {
                while(!(UART0_LSR&(1<<5)))
                        continue;
-               UART0_THR=((*flash&0xff00)>>8);
+               UART0_THR=(*flash&0xff);                // care for endianness
                while(!(UART0_LSR&(1<<5)))
                        continue;
-               UART0_THR=(*flash&0xff);
+               UART0_THR=((*flash&0xff00)>>8);
                flash++;
        }