[Bootloader]
- fixed buffer size - added more SREC types for better debugging git-svn-id: http://moon:8086/svn/mips@62 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -32,7 +32,7 @@ typedef struct _sflash_img_hdr_t
|
||||
|
||||
enum srec_type
|
||||
{
|
||||
srec_err, srec_sob, srec_data, srec_rec, srec_eob
|
||||
srec_err, srec_err_chksum, srec_sob, srec_data, srec_rec, srec_eob
|
||||
};
|
||||
|
||||
uint8_t h2i(uint8_t *c)
|
||||
@@ -102,7 +102,7 @@ int decode_srec(srec_t *pRec, uint8_t *pBuf, int buflen)
|
||||
chksum = ~chksum;
|
||||
byte = h2i(&pRec->data[2*i]);
|
||||
if (chksum != byte)
|
||||
return 0;
|
||||
return srec_err_chksum;
|
||||
|
||||
return pRec->type;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void Exec_RE_at(void *pEntry)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
uint8_t buf[256];
|
||||
uint8_t buf[1024];
|
||||
srec_t srec;
|
||||
int srec_state, i;
|
||||
uint32_t haddr, result;
|
||||
|
||||
Reference in New Issue
Block a user