summaryrefslogtreecommitdiff
path: root/src/flash/flash.h
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-08-10 19:44:06 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-08-10 19:44:06 +0000
commit20e4e77cdf366dedac21ff5670c54291feadfc05 (patch)
tree95363c4dc5940d7e0e94be81ba76b73e92ff1cf3 /src/flash/flash.h
parent835e6440b8d1d26b4e041be7edab200ab2c572ee (diff)
downloadopenocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.gz
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.bz2
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.xz
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.zip
- renamed M5960 USB JTAG to "flyswatter"
- make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin) - various whitespace fixes - removed various warnings - add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann) - fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin) - switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed) - added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include semihosting, all ARM7/9 only for now) - added support for GDB vFlashXXX packets (thanks to Pavel Chromy) - added support for receiving data via ARM7/9 DCC - reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash write_image' (write image files (bin, hex, elf, s19) to a target). - added support for AMD/ST/SST 29F400B non-cfi flashes git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/flash.h')
-rw-r--r--src/flash/flash.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/flash/flash.h b/src/flash/flash.h
index a8cc1869..513ede81 100644
--- a/src/flash/flash.h
+++ b/src/flash/flash.h
@@ -21,6 +21,9 @@
#define FLASH_H
#include "target.h"
+#include "image.h"
+
+#define FLASH_MAX_ERROR_STR (128)
typedef struct flash_sector_s
{
@@ -48,6 +51,7 @@ typedef struct flash_driver_s
typedef struct flash_bank_s
{
+ target_t *target;
flash_driver_t *driver;
void *driver_priv;
u32 base;
@@ -62,7 +66,11 @@ typedef struct flash_bank_s
extern int flash_register_commands(struct command_context_s *cmd_ctx);
extern int flash_init(struct command_context_s *cmd_ctx);
+extern int flash_erase(target_t *target, u32 addr, u32 length);
+extern int flash_write(target_t *target, image_t *image, u32 *image_size, char **error, u32 *failed);
+
extern flash_bank_t *get_flash_bank_by_num(int num);
+extern flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr);
#define ERROR_FLASH_BANK_INVALID (-900)
#define ERROR_FLASH_SECTOR_INVALID (-901)