From 44206066d116badabaf3d807151ddf22f3b38967 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 13 Dec 2015 13:09:15 +0000 Subject: [PATCH] [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 --- src/bootloader/bootloader_with_flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootloader/bootloader_with_flash.c b/src/bootloader/bootloader_with_flash.c index 9e733ec..957d1be 100644 --- a/src/bootloader/bootloader_with_flash.c +++ b/src/bootloader/bootloader_with_flash.c @@ -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;