crc checks working, simple uploads working
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "uart.h"
|
||||
#include "config.h"
|
||||
#include "sram.h"
|
||||
#include "debug.h"
|
||||
|
||||
extern FILE uart_stdout;
|
||||
|
||||
@@ -48,12 +49,13 @@ uint16_t crc_check_bulk_memory(uint32_t bottom_addr,uint32_t top_addr)
|
||||
uint32_t addr = 0;
|
||||
uint8_t req_bank = 0;
|
||||
sram_bulk_read_start(bottom_addr);
|
||||
printf("crc_check_bulk_memory: bottom_addr=0x%08lx top_addr=0x%08lx\n",
|
||||
bottom_addr, top_addr);
|
||||
|
||||
//debug(DEBUG_CRC,"crc_check_bulk_memory: bottom_addr=0x%08lx top_addr=0x%08lx\n",
|
||||
// bottom_addr, top_addr);
|
||||
|
||||
for (addr = bottom_addr; addr < top_addr; addr++) {
|
||||
if (addr && addr % 0x8000 == 0) {
|
||||
printf("crc_check_bulk_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
debug(DEBUG_CRC,"crc_check_bulk_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
req_bank,addr,crc);
|
||||
req_bank++;
|
||||
crc = 0;
|
||||
@@ -62,7 +64,7 @@ uint16_t crc_check_bulk_memory(uint32_t bottom_addr,uint32_t top_addr)
|
||||
sram_bulk_read_next();
|
||||
}
|
||||
if (addr % 0x8000 == 0)
|
||||
printf("crc_check_bulk_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
debug(DEBUG_CRC,"crc_check_bulk_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
req_bank,addr,crc);
|
||||
sram_bulk_read_end();
|
||||
return crc;
|
||||
@@ -77,7 +79,7 @@ void crc_check_memory(uint32_t bottom_addr,uint32_t top_addr,uint8_t *buffer)
|
||||
uint8_t req_bank = 0;
|
||||
for (addr = bottom_addr; addr < top_addr; addr += TRANSFER_BUFFER_SIZE) {
|
||||
if (addr && addr % 0x8000 == 0) {
|
||||
printf("crc_check_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
debug(DEBUG_CRC,"crc_check_memory: bank=0x%02x addr=0x%08lx crc=0x%04x\n",
|
||||
req_bank,addr,crc);
|
||||
req_bank++;
|
||||
crc = 0;
|
||||
|
||||
Reference in New Issue
Block a user