#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sysexits.h>
#include <ctype.h>
#include <unistd.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_gdbstub_callback.h"
#include "arm_memory_mmap.h"
int checkFlashCB_read_sector | ( | int | currAddr, | |
int | cnt, | |||
struct context * | contextSrc | |||
) |
Callback to start generating a check value at the target and the host if both are equal the memory will be hopefully the same (but this is not always true) -- this function requires some workspace at the target side --
currAddr | ||
cnt | ||
contextSrc |
0 | OK | |
1 | WRONG (terminate with error message) | |
-1 | on failure (panic) |
References allocateCmdCallbackEntry(), allocateGdbSprintfBuf(), memMap::baseAddr, BUFMAX, memMap::MemBuffer::Byte, CB_ACTION_ERROR, CB_ACTION_NON, CB_ACTION_VERIFY_DIFF, CB_ACTION_VERIFY_EQUAL, flashCBContext::currentSectorId, DBG_LEVEL_ALL, DBG_LEVEL_GDB_ARM_ERROR, dbgPrintf(), memMap::MemBufferType::Flash, gdb_check_memory_block(), gdbPrintf(), IF_DBG, INFO_VERBOSE, inQueueCmdCallbackEntry(), inQueueGdbSprintfBuf(), flashCBContext::lastSectorId, memMap::memBuffer, memMap::memBufferType, MORE_VERBOSE, memMap::MemBufferType::Flash::numberOfSectors, flashCBContext::quiet_cnt, SECTOR_FLAG_DIRTY, SECTOR_FLAG_ERASED, SECTOR_FLAG_RW, SECTOR_INVALID, SECTOR_READ_ERASED_VALID, SECTOR_READ_VALID, SECTOR_WRITE, SECTOR_WRITE_DIRTY, SECTOR_WRITE_DIRTY_ERASED, memMap::MemBufferType::Flash::sectorList, sector::size, flashCBContext::verbose, and flashCBContext::whichMemMap.
Referenced by gdb_flash_auto_programming(), and gdb_monitor_Rcmd().