arm_flash_check.c File Reference

#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_instr.h"
#include "jt_arm.h"
#include "jt_cortex.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_memory_mmap.h"
#include "arm_memory_workspace.h"
#include "convert.h"

Defines

Functions


Detailed Description


Define Documentation

#define CRC32_POLY   0x04C10DB7
 The CRC 32 polynomial is
   32   26   23   22  16   12   11   10   8   7   5   4   2   1   0
  X  + X  + X  + X  +X  + X  + X  + X  + X + X + X + X + X + X + X
  3  3322 2222  2222 1111  1111 11
  2  1098 7654  3210 9876  5432 1098  7654 3210
  1  0000 0100  1100 0001  0000 1101  1011 0111
 

0x104C10DB7

Referenced by arm_checksum_crc32().

#define CRC16_POLY   0x1021
 The CRC 16 polynominal is
   16   12   5   0
  x  + x  + x + x
  1 1111 11
  6 5432 1098 7654 3210
  1 0001 0000 0010 0001
 

0x11021

Referenced by arm_checksum_crc16().


Function Documentation

uint32_t arm_checksum_crc32 ( uint32_t *  block,
int  bit_len 
)

calculate a crc checksum using CRC32_POLY

Parameters:
block Pointer to data block
bit_len 
Returns:
crc value

References CRC32_POLY.

Referenced by gdb_check_memory_block().

uint32_t arm_checksum_crc16 ( uint16_t *  block,
int  bit_len 
)

calculate a crc checksum using CRC16_POLY

Parameters:
block Pointer to data block
bit_len 
Returns:
crc value

References CRC16_POLY.

Referenced by gdb_check_memory_block().

int gdb_check_memory_block ( uint32_t  addr,
uint32_t  word_len,
uint32_t *  buf 
)

This file is part of the documentation for JTAG-GDB Server for ARM .

Generated on Mon Feb 15 21:23:21 2010 by doxygen 1.6.2.