]> hackdaworld.org Git - my-code/arm.git/commitdiff
Makefile: fixed; fwbc: mem, bl init; fwflash: 1 bit shift in addresses
authorhackbard <hackbard@staubsauger.localdomain>
Tue, 28 Aug 2007 18:44:59 +0000 (20:44 +0200)
committerhackbard <hackbard@staubsauger.localdomain>
Tue, 28 Aug 2007 18:44:59 +0000 (20:44 +0200)
betty/Makefile
betty/fwbc.c
betty/fwflash.c

index 8925b22d5ee24ce41bcc280f37d29e40669c581e..b5b6a5fb61f181224dc981a6fef36affec85e03c 100644 (file)
@@ -13,27 +13,27 @@ HOST_TARGET = lpcload fwdump
 CROSS_TARGET = fwbc.hex fwflash.hex
 
 # all projects
-all: $(HOSTOBJECTS) $(ARMOBJECTS)
+all: $(HOST_TARGET) $(CROSS_TARGET)
 
 # arm code
-arm: arm_clean $(ARMOBJECTS)
+arm: arm_clean $(CROSS_TARGET)
 
 # fwbc
 fwbc:
-       $(ARMCC) $(ARMCFLAGS) -c fwbc.c -o fwbc
+       $(CROSS_CC) $(CROSS_CFLAGS) -c fwbc.c -o fwbc
 
 fwbc.hex: fwbc
-       $(ARMOBJCOPY) -O ihex fwbc fwbc.hex
+       $(CROSS_OBJCOPY) -O ihex fwbc fwbc.hex
 
 # fwflash
 fwflash:
-       $(ARMCC) $(ARMCFLAGS) -c fwflash.c -o fwflash
+       $(CROSS_CC) $(CROSS_CFLAGS) -c fwflash.c -o fwflash
 
 fwflash.hex: fwflash
-       $(ARMOBJCOPY) -O ihex fwflash fwflash.hex
+       $(CROSS_OBJCOPY) -O ihex fwflash fwflash.hex
 
 clean:
        rm -f lpcload fwdump
 
 arm_clean:
-       rm -f $(ARMOBJECTS) fwbc fwflash
+       rm -f $(CROSS_TARGET) fwbc fwflash
index c9e603b6654445eff5c7a0a9d73422ef69f16d0f..187481916da4c8c127c5730dd7a883f08b319b18 100644 (file)
@@ -57,8 +57,8 @@ int main(void) {
 
        /* variables */
 
-       u16 *mem;
-       u32 *bl;
+       u16 *mem=0;
+       u32 *bl=0;
        u32 i,len;
        u8 start;
 
index e2f78d9895b6a039e1d3360ccfc6b6b23b85f68c..508b09c6a442990284eb1c8441ceb7ef18eb5f4d 100644 (file)
 #define BANK0                  0x80000000
 #define BANK2                  0x82000000
 
-/* flash cmd addresses */
-#define B0F555 (*((volatile unsigned long *)(BANK0|0x555)))
-#define B0F2AA (*((volatile unsigned long *)(BANK0|0x2aa)))
-#define B2F555 (*((volatile unsigned long *)(BANK2|0x555)))
-#define B2F2AA (*((volatile unsigned long *)(BANK2|0x2aa)))
+/* flash cmd addresses - flash[0-18] <--> arm[1-19]*/
+#define B0F555 (*((volatile unsigned long *)(BANK0|0xaaa)))    // 0x555
+#define B0F2AA (*((volatile unsigned long *)(BANK0|0x554)))    // 0x2aa
+#define B2F555 (*((volatile unsigned long *)(BANK2|0xaaa)))    // 0x555
+#define B2F2AA (*((volatile unsigned long *)(BANK2|0x554)))    // 0x2aa
 
 /* commands */
 #define CMD_READ               'R'