projects
/
my-code
/
arm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50d38dd
)
parsinf 05 records now too, still strabge bootloader returns to the go cmd!
author
hackbard
<hackbard@staubsauger.localdomain>
Thu, 30 Aug 2007 15:12:18 +0000
(17:12 +0200)
committer
hackbard
<hackbard@staubsauger.localdomain>
Thu, 30 Aug 2007 15:12:18 +0000
(17:12 +0200)
betty/lpcload.c
patch
|
blob
|
history
diff --git
a/betty/lpcload.c
b/betty/lpcload.c
index
6c167e2
..
30a808e
100644
(file)
--- a/
betty/lpcload.c
+++ b/
betty/lpcload.c
@@
-60,6
+60,7
@@
typedef struct s_lpc {
u8 info; /* info/mode */
char freq[8]; /* frequency */
u32 roff; /* ram offset of uc */
u8 info; /* info/mode */
char freq[8]; /* frequency */
u32 roff; /* ram offset of uc */
+ u32 jaddr; /* addr for the jump */
} t_lpc;
void usage(void) {
} t_lpc;
void usage(void) {
@@
-311,7
+312,7
@@
int go(t_lpc *lpc) {
char buf[BUFSIZE];
int ret,len;
char buf[BUFSIZE];
int ret,len;
- snprintf(buf,BUFSIZE,"G %d A\r\n",lpc->
roff
);
+ snprintf(buf,BUFSIZE,"G %d A\r\n",lpc->
jaddr
);
len=strlen(buf);
ret=txrx(lpc,buf,len,TXRX_TYPE_GO);
len=strlen(buf);
ret=txrx(lpc,buf,len,TXRX_TYPE_GO);
@@
-476,6
+477,10
@@
int firmware_to_ram(t_lpc *lpc) {
case 0x04:
lpc->roff=((buf[0]<<24)|(buf[1]<<16));
break;
case 0x04:
lpc->roff=((buf[0]<<24)|(buf[1]<<16));
break;
+ case 0x05:
+ lpc->jaddr=((buf[0]<<24)|(buf[1]<<16));
+ lpc->jaddr|=((buf[2]<<8)|buf[3]);
+ break;
default:
printf("fw to ram: unknown type %02x\n",type);
return -1;
default:
printf("fw to ram: unknown type %02x\n",type);
return -1;
@@
-498,6
+503,7
@@
int main(int argc,char **argv) {
memset(&lpc,0,sizeof(t_lpc));
strncpy(lpc.freq,CRYSTFREQ,7);
lpc.roff=RAMOFFSET;
memset(&lpc,0,sizeof(t_lpc));
strncpy(lpc.freq,CRYSTFREQ,7);
lpc.roff=RAMOFFSET;
+ lpc.jaddr=RAMOFFSET;
/* parse argv */
/* parse argv */