From: hackbard Date: Tue, 28 Aug 2007 18:44:59 +0000 (+0200) Subject: Makefile: fixed; fwbc: mem, bl init; fwflash: 1 bit shift in addresses X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78aa7185d5db2062e66e84ace1212f427f13c260;p=my-code%2Farm.git Makefile: fixed; fwbc: mem, bl init; fwflash: 1 bit shift in addresses --- diff --git a/betty/Makefile b/betty/Makefile index 8925b22..b5b6a5f 100644 --- a/betty/Makefile +++ b/betty/Makefile @@ -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 diff --git a/betty/fwbc.c b/betty/fwbc.c index c9e603b..1874819 100644 --- a/betty/fwbc.c +++ b/betty/fwbc.c @@ -57,8 +57,8 @@ int main(void) { /* variables */ - u16 *mem; - u32 *bl; + u16 *mem=0; + u32 *bl=0; u32 i,len; u8 start; diff --git a/betty/fwflash.c b/betty/fwflash.c index e2f78d9..508b09c 100644 --- a/betty/fwflash.c +++ b/betty/fwflash.c @@ -21,11 +21,11 @@ #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'