#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
Flash support functions
#define INTEL_VID_8BIT 0x89 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_VID_2x8BIT 0x8989 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_VID_16BIT 0x0089 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_VID_2x16BIT 0x00890089 |
#define INTEL_CID_8BIT_28F004B3_T 0xD4 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_8BIT_28F008B3_T 0xD2 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_8BIT_28F016B3_T 0xD0 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_8BIT_28F004B3_B 0xD5 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_8BIT_28F008B3_B 0xD3 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_8BIT_28F016B3_B 0xD1 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_2x8BIT_28F004B3_T 0xD4D4 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x8BIT_28F008B3_T 0xD2D2 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x8BIT_28F016B3_T 0xD0D0 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x8BIT_28F004B3_B 0xD5D5 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x8BIT_28F008B3_B 0xD3D3 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x8BIT_28F016B3_B 0xD1D1 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F400B3_T 0x8894 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F800B3_T 0x8892 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F160B3_T 0x8890 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F320B3_T 0x8896 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F640B3_T 0x8898 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F400B3_B 0x8895 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F800B3_B 0x8893 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F160B3_B 0x8891 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F320B3_B 0x8897 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_16Bit_28F640B3_B 0x8899 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_8BIT_28F320J3 0x16 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_2x8BIT_28F320J3 0x1616 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_4x8BIT_28F320J3 0x16161616 |
#define INTEL_CID_16BIT_28F320J3 0x0016 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x16BIT_28F320J3 0x00160016 |
#define INTEL_CID_8BIT_28F640J3 0x17 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_2x8BIT_28F640J3 0x1717 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_4x8BIT_28F640J3 0x17171717 |
#define INTEL_CID_16BIT_28F640J3 0x0017 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x16BIT_28F640J3 0x00170017 |
#define INTEL_CID_8BIT_28F128J3 0x18 |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_2x8BIT_28F128J3 0x1818 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_4x8BIT_28F128J3 0x18181818 |
#define INTEL_CID_16BIT_28F128J3 0x0018 |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x16BIT_28F128J3 0x00180018 |
#define INTEL_CID_8BIT_28F256J3 0x1D |
Referenced by jt_intelflashGetInfoByte().
#define INTEL_CID_2x8BIT_28F256J3 0x1D1D |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_4x8BIT_28F256J3 0x1D1D1D1D |
#define INTEL_CID_16BIT_28F256J3 0x001D |
Referenced by jt_intelflashGetInfoHalfword().
#define INTEL_CID_2x16BIT_28F256J3 0x001D001D |
static void INTEL_28F004B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_28F004B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_28F008B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_28F008B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_28F016B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_28F016B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte().
static void INTEL_2x_28F004B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F004B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F008B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F008B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F016B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F016B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F400B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F800B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F160B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F320B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F640B3_T | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F400B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F800B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F160B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F320B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F640B3_B | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_28F320J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte(), and jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F320J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_4x_28F320J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
static void INTEL_28F640J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte(), and jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F640J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_4x_28F640J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
static void INTEL_28F128J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte(), and jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F128J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_4x_28F128J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
static void INTEL_28F256J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoByte(), and jt_intelflashGetInfoHalfword().
static void INTEL_2x_28F256J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
Referenced by jt_intelflashGetInfoHalfword().
static void INTEL_4x_28F256J3 | ( | void | ) | [inline, static] |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), and MAX_FLASH_INFO_STRING_LEN.
int jt_intelflashGetInfoByte | ( | uint32_t | base_address, | |
struct sector ** | sector_info | |||
) |
Try to get the Flash info and create a new sector_info if possible. (8-Bit access)
(external std. flash using Intel programming algorithm)
base_address | flash base address | |
sector_info | pointer to target for new sector_info |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), INTEL_28F004B3_B(), INTEL_28F004B3_T(), INTEL_28F008B3_B(), INTEL_28F008B3_T(), INTEL_28F016B3_B(), INTEL_28F016B3_T(), INTEL_28F128J3(), INTEL_28F256J3(), INTEL_28F320J3(), INTEL_28F640J3(), INTEL_CID_8BIT_28F004B3_B, INTEL_CID_8BIT_28F004B3_T, INTEL_CID_8BIT_28F008B3_B, INTEL_CID_8BIT_28F008B3_T, INTEL_CID_8BIT_28F016B3_B, INTEL_CID_8BIT_28F016B3_T, INTEL_CID_8BIT_28F128J3, INTEL_CID_8BIT_28F256J3, INTEL_CID_8BIT_28F320J3, INTEL_CID_8BIT_28F640J3, INTEL_VID_8BIT, jt_flash_create_sector_info(), jtag_arm_ReadByte(), jtag_arm_WriteByte(), and sector::lock.
Referenced by detectFlash().
int jt_intelflashGetInfoHalfword | ( | uint32_t | base_address, | |
struct sector ** | sector_info | |||
) |
Try to get the Flash info and create a new sector_info if possible. (16-Bit access)
(external std. flash using Intel programming algorithm)
base_address | flash base address | |
sector_info | pointer to target for new sector_info |
References DBG_LEVEL_JTAG_ARM, dbgPrintf(), INTEL_28F128J3(), INTEL_28F160B3_B(), INTEL_28F160B3_T(), INTEL_28F256J3(), INTEL_28F320B3_B(), INTEL_28F320B3_T(), INTEL_28F320J3(), INTEL_28F400B3_B(), INTEL_28F400B3_T(), INTEL_28F640B3_B(), INTEL_28F640B3_T(), INTEL_28F640J3(), INTEL_28F800B3_B(), INTEL_28F800B3_T(), INTEL_2x_28F004B3_B(), INTEL_2x_28F004B3_T(), INTEL_2x_28F008B3_B(), INTEL_2x_28F008B3_T(), INTEL_2x_28F016B3_B(), INTEL_2x_28F016B3_T(), INTEL_2x_28F128J3(), INTEL_2x_28F256J3(), INTEL_2x_28F320J3(), INTEL_2x_28F640J3(), INTEL_CID_16BIT_28F128J3, INTEL_CID_16Bit_28F160B3_B, INTEL_CID_16Bit_28F160B3_T, INTEL_CID_16BIT_28F256J3, INTEL_CID_16Bit_28F320B3_B, INTEL_CID_16Bit_28F320B3_T, INTEL_CID_16BIT_28F320J3, INTEL_CID_16Bit_28F400B3_B, INTEL_CID_16Bit_28F400B3_T, INTEL_CID_16Bit_28F640B3_B, INTEL_CID_16Bit_28F640B3_T, INTEL_CID_16BIT_28F640J3, INTEL_CID_16Bit_28F800B3_B, INTEL_CID_16Bit_28F800B3_T, INTEL_CID_2x8BIT_28F004B3_B, INTEL_CID_2x8BIT_28F004B3_T, INTEL_CID_2x8BIT_28F008B3_B, INTEL_CID_2x8BIT_28F008B3_T, INTEL_CID_2x8BIT_28F016B3_B, INTEL_CID_2x8BIT_28F016B3_T, INTEL_CID_2x8BIT_28F128J3, INTEL_CID_2x8BIT_28F256J3, INTEL_CID_2x8BIT_28F320J3, INTEL_CID_2x8BIT_28F640J3, INTEL_VID_16BIT, INTEL_VID_2x8BIT, jt_flash_create_sector_info(), jtag_arm_ReadHalfword(), jtag_arm_WriteHalfword(), sector::lock, MAX_FLASH_INFO_STRING_LEN, and STM_VID_16BIT.
Referenced by detectFlash(), and jtag_test().