arm_memory_write.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 <ctype.h>
#include <unistd.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_memory_mmap.h"
#include "arm_memory_workspace.h"

Functions


Detailed Description


Function Documentation

void gdb_writeback_memory_block ( uint32_t  addr,
uint32_t  word_len,
uint32_t *  buf 
)

Write-back the modified data block into the targets memory space.
If possible try to put a target WRITE program into our target workspace.
And transfer the Write-data via DCC.
If this is not possible write the memory via JTAG.

Parameters:
addr target address
word_len length of 32-Bit words to write
buf pointer to source buffer
Returns:
-

References memMap::baseAddr, DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), getWorkSpace(), ICERT_REG_DCC_CONTROL, ICERT_REG_DCC_DATA, jtag_arm_IceRT_RegRead(), jtag_arm_IceRT_RegRead_Once(), jtag_arm_IceRT_RegWrite(), jtag_arm_Mointor2DebugMode(), jtag_arm_PollDbgState(), jtag_arm_RunProgram(), jtag_arm_WriteMemoryBuf(), memMap::memBufferType, memMap::MemBufferType::Workspace::offset, useWorkspace(), memMap::MemBufferType::Workspace, and WORKSPACE_ALGO_WRITE.

Referenced by gdb_writeback_Ram().

int gdb_write_mem ( void *  mem_val,
int  addr,
int  length 
)
int gdb_invalidate_Ram_Buffer ( void   ) 

Mark all cached RAM - Data is being invalid now.
Also invalidate RereadROM and Appl.Flash since this might have been changed at next debug entry, too.
Oh. better do not invalidate workspace (we should write even the old/modified data back)

Parameters:
- 
Return values:
0 OK
-1 no active memMap or memMap without any entry

References memMapHead::firstMapEntry, memMap::MemBufferType::Flash, memMap::length, memMap::memBufferType, MMAP_T_APPLICATION_FLASH, MMAP_T_RAM, MMAP_T_REREAD_ROM, memMap::nextMap, memMapHead::numberOfEntrys, memMap::MemBufferType::Flash::numberOfSectors, memMap::MemBufferType::Ram, RAM_PAGE_SIZE, memMap::MemBufferType::Ram::readPageBitmap, SECTOR_INVALID, memMap::MemBufferType::Flash::sectorList, memMap::type, and memMap::MemBufferType::Ram::writeByteBitmap.

Referenced by gdb_action_continue(), gdb_action_step(), and gdb_monitor_Rcmd().

int gdb_invalidate_Rom_Buffer ( void   ) 

Mark all cached ROM - Data is being invalid now.
Also invalidate RereadROM and Appl.Flash since this might have changed at next debug entry, too.
(Don't inval Flash we still need it.)

Parameters:
- 
Return values:
0 OK
-1 no active memMap or memMap without any entry

References memMapHead::firstMapEntry, memMap::MemBufferType::Flash, memMap::length, memMap::memBufferType, MMAP_T_APPLICATION_FLASH, MMAP_T_REREAD_ROM, MMAP_T_ROM, memMap::nextMap, memMapHead::numberOfEntrys, memMap::MemBufferType::Flash::numberOfSectors, memMap::MemBufferType::Ram, RAM_PAGE_SIZE, memMap::MemBufferType::Ram::readPageBitmap, SECTOR_INVALID, memMap::MemBufferType::Flash::sectorList, and memMap::type.

Referenced by gdb_monitor_Rcmd(), and gdb_query_symbol().

int gdb_invalidate_Flash_Buffer ( void   ) 
int gdb_flush_Flash ( uint32_t  addr,
uint32_t  len 
)

Mark a range of cached Flash - Data as being invalid now.

Parameters:
addr start address
len length in bytes
Return values:
0 OK
-1 no active memMap or memMap without any entry

References memMap::baseAddr, memMapHead::firstMapEntry, memMap::MemBufferType::Flash, memMap::length, memMap::memBufferType, MMAP_T_APPLICATION_FLASH, MMAP_T_FLASH, memMap::nextMap, memMapHead::numberOfEntrys, memMap::MemBufferType::Flash::numberOfSectors, SECTOR_INVALID, memMap::MemBufferType::Flash::sectorList, and memMap::type.

Referenced by gdb_vquery().

int gdb_writeback_Ram ( void   ) 
void gdb_writeback_RamWorkspace ( void   ) 

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.