You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(58) |
Dec
|
|
From: <zw...@ma...> - 2009-05-29 06:00:57
|
Author: zwelch
Date: 2009-05-29 06:00:51 +0200 (Fri, 29 May 2009)
New Revision: 1942
Modified:
trunk/src/flash/flash.h
Log:
Add documentation to flash.h:
- provides low-level information about each flash API interface,
- gives driver authors some documentation about the driver interface,
- updated extensively from the original patch provided by Duane Ellis.
Modified: trunk/src/flash/flash.h
===================================================================
--- trunk/src/flash/flash.h 2009-05-29 01:33:04 UTC (rev 1941)
+++ trunk/src/flash/flash.h 2009-05-29 04:00:51 UTC (rev 1942)
@@ -33,65 +33,298 @@
#define FLASH_MAX_ERROR_STR (128)
+/**
+ * Describes the geometry and status of a single flash sector
+ * within a flash bank. A single bank typically consists of multiple
+ * sectors, each of which can be erased and protected independently.
+ */
typedef struct flash_sector_s
{
+ /// Bus offset from start of the flash chip (in bytes).
u32 offset;
+ /// Number of bytes in this flash sector.
u32 size;
+ /**
+ * Indication of erasure status: 0=not erased, 1=erased,
+ * other=unknown. Set by @c flash_driver_s::erase_check.
+ */
int is_erased;
+ /**
+ * Indication of protection status: 0=unprotected/unlocked,
+ * 1=protected/locked, other=unknown. Set by
+ * @c flash_driver_s::protect_check.
+ */
int is_protected;
} flash_sector_t;
struct flash_bank_s;
+/**
+ * @brief Provides the implementation-independent structure that defines
+ * all of the callbacks required by OpenOCD flash drivers.
+ *
+ * Driver authors must implement the routines defined here, providing an
+ * instance with the fields filled out. After that, the instance must
+ * be registered in flash.c, so it can be used by the driver lookup system.
+ *
+ * Specifically, the user can issue the command: @par
+ * @code
+ * flash bank DRIVERNAME ...parameters...
+ * @endcode
+ *
+ * OpenOCD will search for the driver with a @c flash_driver_s::name
+ * that matches @c DRIVERNAME.
+ *
+ * The flash subsystem calls some of the other drivers routines a using
+ * corresponding static <code>flash_driver_<i>callback</i>()</code>
+ * routine in flash.c.
+ */
typedef struct flash_driver_s
{
+ /**
+ * Gives a human-readable name of this flash driver,
+ * This field is used to select and initialize the driver.
+ */
char *name;
+
+ /**
+ * Registers driver-specific commands. When called (during the
+ * "flash bank" command), the driver may register addition
+ * commands to support new flash chip functions.
+ *
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*register_commands)(struct command_context_s *cmd_ctx);
+
+ /**
+ * Finish the "flash bank" command for @a bank. The
+ * @a bank parameter will have been filled in by the core flash
+ * layer when this routine is called, and the driver can store
+ * additional information in its flash_bank_t::driver_priv field.
+ *
+ * @param cmd_ctx - the command context
+ * @param cmd - the command, in this case 'flash'
+ * @param args - parameters, see below
+ * @param argc - number of parameters on command line
+ * @param bank - new filled in flash bank.
+ *
+ * The args are: @par
+ * @code
+ * args[0] = bank
+ * args[1] = drivername {name above}
+ * args[2] = baseaddress
+ * args[3] = lengthbytes
+ * args[4] = chip_width_in bytes
+ * args[5] = bus_width_bytes
+ * args[6] = driver-specific parameters
+ * @endcode
+ *
+ * For example, args[4] = 16 bit flash, args[5] = 32bit bus.
+ *
+ * If extra arguments are provided (@a argc > 6), they will
+ * start in @a args[6]. These can be used to implement
+ * driver-specific extensions.
+ *
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*flash_bank_command)(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
- /* use flash_driver_erase() wrapper to invoke */
+ /**
+ * Bank/sector erase routine (target-specific). When
+ * called, the flash driver should erase the specified sectors
+ * using whatever means are at its disposal.
+ *
+ * @param bank The bank of flash to be erased.
+ * @param first The number of the first sector to erase, typically 0.
+ * @param last The number of the last sector to erase, typically N-1.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*erase)(struct flash_bank_s *bank, int first, int last);
- /* use flash_driver_protect() wrapper to invoke */
+ /**
+ * Bank/sector protection routine (target-specific).
+ * When called, the driver should disable 'flash write' bits (or
+ * enable 'erase protection' bits) for the given @a bank and @a
+ * sectors.
+ *
+ * @param bank The bank to protect or unprotect.
+ * @param set If non-zero, enable protection; if 0, disable it.
+ * @param first The first sector to (un)protect, typicaly 0.
+ * @param last The last sector to (un)project, typically N-1.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*protect)(struct flash_bank_s *bank, int set, int first, int last);
- /* use the flash_driver_write() wrapper to invoke. */
+ /**
+ * Program data into the flash. Note CPU address will be
+ * "bank->base + offset", while the physical address is
+ * dependent upon current target MMU mappings.
+ *
+ * @param bank The bank to program
+ * @param buffer The data bytes to write.
+ * @param offset The offset into the chip to program.
+ * @param count The number of bytes to write.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*write)(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count);
+ /**
+ * Probe to determine what kind of flash is present.
+ * This is invoked by the "probe" script command.
+ *
+ * @param bank The bank to probe
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*probe)(struct flash_bank_s *bank);
+
+ /**
+ * Check the erasure status of a flash bank.
+ * When called, the driver routine must perform the required
+ * checks and then set the @c flash_sector_s::is_erased field
+ * for each of the flash banks's sectors.
+ *
+ * @param bank The bank to check
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*erase_check)(struct flash_bank_s *bank);
+
+ /**
+ * Determine if the specific bank is "protected" or not.
+ * When called, the driver routine must must perform the
+ * required protection check(s) and then set the @c
+ * flash_sector_s::is_protected field for each of the flash
+ * bank's sectors.
+ *
+ * @param bank - the bank to check
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*protect_check)(struct flash_bank_s *bank);
+
+ /**
+ * Display human-readable information about the flash
+ * bank into the given buffer. Drivers must be careful to avoid
+ * overflowing the buffer.
+ *
+ * @param bank - the bank to get info about
+ * @param char - where to put the text for the human to read
+ * @param buf_size - the size of the human buffer.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*info)(struct flash_bank_s *bank, char *buf, int buf_size);
+
+ /**
+ * A more gentle flavor of filash_driver_s::probe, performing
+ * setup with less noise. Generally, driver routines should test
+ * to seee if the bank has already been probed; if it has, the
+ * driver probably should not perform its probe a second time.
+ *
+ * This callback is often called from the inside of other
+ * routines (e.g. GDB flash downloads) to autoprobe the flash as
+ * it is programing the flash.
+ *
+ * @param bank - the bank to probe
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
int (*auto_probe)(struct flash_bank_s *bank);
} flash_driver_t;
+/**
+ * Provides details of a flash bank, available either on-chip or through
+ * a major interface.
+ *
+ * This structure will be passed as a parameter to the callbacks in the
+ * flash_driver_s structure, some of which may modify the contents of
+ * this structure of the area of flash that it defines. Driver writers
+ * may use the @c driver_priv member to store additional data on a
+ * per-bank basis, if required.
+ */
typedef struct flash_bank_s
{
- struct target_s *target;
- flash_driver_t *driver;
- void *driver_priv;
- int bank_number;
- u32 base;
- u32 size;
- int chip_width;
- int bus_width;
+ struct target_s *target; /**< Target to which this bank belongs. */
+
+ flash_driver_t *driver; /**< Driver for this bank. */
+ void *driver_priv; /**< Private driver storage pointer */
+
+ int bank_number; /**< The 'bank' (or chip number) of this instance. */
+ u32 base; /**< The base address of this bank */
+ u32 size; /**< The size of this chip bank, in bytes */
+
+ int chip_width; /**< Width of the chip in bytes (1,2,4 bytes) */
+ int bus_width; /**< Maximum bus width, in bytes (1,2,4 bytes) */
+
+ /**
+ * The number of sectors on this chip. This value will
+ * be set intially to 0, and the flash driver must set this to
+ * some non-zero value during "probe()" or "auto_probe()".
+ */
int num_sectors;
+ /// Array of sectors, allocated and initilized by the flash driver
flash_sector_t *sectors;
- struct flash_bank_s *next;
+
+ struct flash_bank_s *next; /**< The next flash bank on this chip */
} flash_bank_t;
+/// Registers the 'flash' subsystem commands
extern int flash_register_commands(struct command_context_s *cmd_ctx);
+/// Initializes the 'flash' subsystem drivers
extern int flash_init_drivers(struct command_context_s *cmd_ctx);
+/**
+ * Erases @a length bytes in the @a target flash, starting at @a addr.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
extern int flash_erase_address_range(struct target_s *target, u32 addr, u32 length);
+/**
+ * Writes @a image into the @a target flash. The @a written parameter
+ * will contain the
+ * @param target The target with the flash to be programmed.
+ * @param image The image that will be programmed to flash.
+ * @param written On return, contains the number of bytes written.
+ * @param erase If non-zero, indicates the flash driver should first
+ * erase the corresponding banks or sectors before programming.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
extern int flash_write(struct target_s *target, struct image_s *image, u32 *written, int erase);
+/**
+ * Forces targets to re-examine their erase/protection state.
+ * This routine must be called when the system may modify the status.
+ */
extern void flash_set_dirty(void);
+/// @returns The number of flash banks currently defined.
extern int flash_get_bank_count(void);
+/**
+ * Provides default erased-bank check handling. Checks to see if
+ * the flash driver knows they are erased; if things look uncertain,
+ * this routine will call default_flash_mem_blank_check() to confirm.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
extern int default_flash_blank_check(struct flash_bank_s *bank);
+/**
+ * Provides a default blank flash memory check. Ensures the contents
+ * of the given bank have truly been erased.
+ * @param bank The flash bank.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
extern int default_flash_mem_blank_check(struct flash_bank_s *bank);
+/**
+ * Returns a flash bank by the specified flash_bank_s bank_number, @a num.
+ * @param num The flash bank number.
+ * @returns A flash_bank_t for flash bank @a num, or NULL
+ */
extern flash_bank_t *get_flash_bank_by_num(int num);
+/**
+ * Returns the flash bank like get_flash_bank_by_num(), without probing.
+ * @param num The flash bank number.
+ * @returns A flash_bank_t for flash bank @a num, or NULL.
+ */
extern flash_bank_t *get_flash_bank_by_num_noprobe(int num);
+/**
+ * Returns the flash bank located at a specified address.
+ * @param target The target, presumed to contain one or more banks.
+ * @param addr An address that is within the range of the bank.
+ * @returns The flash_bank_t located at @a addr, or NULL.
+ */
extern flash_bank_t *get_flash_bank_by_addr(struct target_s *target, u32 addr);
#define ERROR_FLASH_BANK_INVALID (-900)
|
|
From: <zw...@ma...> - 2009-05-29 03:33:08
|
Author: zwelch
Date: 2009-05-29 03:33:04 +0200 (Fri, 29 May 2009)
New Revision: 1941
Modified:
trunk/doc/openocd.texi
Log:
David Brownell <da...@pa...>:
Provide basic documentation for some of the other flash drivers.
avr ... looks incomplete, may work with one AVR8 microcontroller
ecosflash ... can't find docs
lpc288x ... an NXP part, driver seems lpc2888-specific
ocl ... some arm7/arm9 thing, can't find docs
pic32mx ... looks incomplete, for PIC32MX (MIPS 4K) devices
tms470 ... for TI TMS470 parts
Still seems to be mostly arm7tdmi... several of these have no
users in the current tree.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-28 23:47:37 UTC (rev 1940)
+++ trunk/doc/openocd.texi 2009-05-29 01:33:04 UTC (rev 1941)
@@ -2625,6 +2625,19 @@
@end deffn
@end deffn
+@deffn {Flash Driver} avr
+The AVR 8-bit microcontrollers from Atmel integrate flash memory.
+@emph{The current implementation is incomplete.}
+@comment - defines mass_erase ... pointless given flash_erase_address
+@end deffn
+
+@deffn {Flash Driver} ecosflash
+@emph{No idea what this is...}
+The @var{ecosflash} driver defines one mandatory parameter,
+the name of a modules of target code which is downloaded
+and executed.
+@end deffn
+
@deffn {Flash Driver} lpc2000
Most members of the LPC2000 microcontroller family from NXP
include internal flash and use ARM7TDMI cores.
@@ -2649,6 +2662,46 @@
@end example
@end deffn
+@deffn {Flash Driver} lpc288x
+The LPC2888 microcontroller from NXP needs slightly different flash
+support from its lpc2000 siblings.
+The @var{lpc288x} driver defines one mandatory parameter,
+the programming clock rate in Hz.
+LPC flashes don't require the chip and bus width to be specified.
+
+@example
+flash bank lpc288x 0 0 0 0 $_TARGETNAME 12000000
+@end example
+@end deffn
+
+@deffn {Flash Driver} ocl
+@emph{No idea what this is, other than using some arm7/arm9 core.}
+
+@example
+flash bank ocl 0 0 0 0 $_TARGETNAME
+@end example
+@end deffn
+
+@deffn {Flash Driver} pic32mx
+The PIC32MX microcontrollers are based on the MIPS 4K cores,
+and integrate flash memory.
+@emph{The current implementation is incomplete.}
+
+@example
+flash bank pix32mx 0 0 0 0 $_TARGETNAME
+@end example
+
+@comment numerous *disabled* commands are defined:
+@comment - chip_erase ... pointless given flash_erase_address
+@comment - lock, unlock ... pointless given protect on/off (yes?)
+@comment - pgm_word ... shouldn't bank be deduced from address??
+Some pic32mx-specific commands are defined:
+@deffn Command {pic32mx pgm_word} address value bank
+Programs the specified 32-bit @var{value} at the given @var{address}
+in the specified chip @var{bank}.
+@end deffn
+@end deffn
+
@deffn {Flash Driver} stellaris
All members of the Stellaris LM3Sxxx microcontroller family from
Texas Instruments
@@ -2738,6 +2791,27 @@
@end deffn
+@deffn {Flash Driver} tms470
+Most members of the TMS470 microcontroller family from Texas Instruments
+include internal flash and use ARM7TDMI cores.
+This driver doesn't require the chip and bus width to be specified.
+
+Some tms470-specific commands are defined:
+
+@deffn Command {tms470 flash_keyset} key0 key1 key2 key3
+Saves programming keys in a register, to enable flash erase and write commands.
+@end deffn
+
+@deffn Command {tms470 osc_mhz} clock_mhz
+Reports the clock speed, which is used to calculate timings.
+@end deffn
+
+@deffn Command {tms470 plldis} (0|1)
+Disables (@var{1}) or enables (@var{0}) use of the PLL to speed up
+the flash clock.
+@end deffn
+@end deffn
+
@subsection str9xpec driver
@cindex str9xpec
|
|
From: <zw...@ma...> - 2009-05-29 01:47:44
|
Author: zwelch
Date: 2009-05-29 01:47:37 +0200 (Fri, 29 May 2009)
New Revision: 1940
Modified:
trunk/bootstrap
Log:
Remove redundant call to autoheader in bootstrap script.
Modified: trunk/bootstrap
===================================================================
--- trunk/bootstrap 2009-05-28 23:13:32 UTC (rev 1939)
+++ trunk/bootstrap 2009-05-28 23:47:37 UTC (rev 1940)
@@ -1,4 +1,5 @@
#!/bin/sh -e
+# Run the autotools bootstrap sequence to create the configure script
if libtoolize --version >/dev/null 2>&1; then
libtoolize="libtoolize"
@@ -13,7 +14,6 @@
(
set -x
aclocal
-autoheader
${libtoolize} --automake --copy
autoconf
autoheader
|
|
From: <zw...@ma...> - 2009-05-29 01:13:39
|
Author: zwelch
Date: 2009-05-29 01:13:32 +0200 (Fri, 29 May 2009)
New Revision: 1939
Modified:
trunk/doc/openocd.texi
Log:
David Brownell <da...@pa...>:
Start converting the architecture-specific commands to @deffn format,
reviewing against the code.
* armv4_5 disassemble ... now documented; although Jazelle code
is not handled
* It's "armv4_5 core_state" not "core_mode"; although Jazelle state
is not handled
* arm7/9 "debug" commands ... now with other arm7_9 commands, no
longer in a separate section
* arm926ejs cp15 ... previous description was broken, it matched
the code for arm920t instead
* Have separate subsections for ARMv4/ARMv5, ARMv6, and ARMv7; the
latter are new
* Move core-specific descriptions into sub-subsections under those
architectures; XScale and ARM11 descriptions are new
The new XScale and ARM11 command descriptions surely need elaboration
and review. ARM CP15 operation descriptions in general seem to be
confused and incomplete.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-28 01:18:47 UTC (rev 1938)
+++ trunk/doc/openocd.texi 2009-05-28 23:13:32 UTC (rev 1939)
@@ -2482,8 +2482,9 @@
A relocation @var{offset} may be specified, in which case it is added
to the base address for each section in the image.
The file [@var{type}] can be specified
-explicitly as @option{bin} (binary), @option{ihex} (Intel hex), @option{elf}
-(ELF file) or @option{s19} (Motorola s19).
+explicitly as @option{bin} (binary), @option{ihex} (Intel hex),
+@option{elf} (ELF file), @option{s19} (Motorola s19).
+@option{mem}, or @option{builder}.
The relevant flash sectors will be erased prior to programming
if the @option{erase} parameter is given.
The flash bank to use is inferred from the @var{address} of
@@ -3463,189 +3464,404 @@
@end itemize
-@section Target Specific Commands
-@cindex Target Specific Commands
+@section Architecture and Core Specific Commands
+@cindex Architecture Specific Commands
+@cindex Core Specific Commands
+Most CPUs have specialized JTAG operations to support debugging.
+OpenOCD packages most such operations in its standard command framework.
+Some of those operations don't fit well in that framework, so they are
+exposed here using architecture or implementation specific commands.
-@section Architecture Specific Commands
-@cindex Architecture Specific Commands
+@subsection ARMv4 and ARMv5 Architecture
+@cindex ARMv4 specific commands
+@cindex ARMv5 specific commands
-@subsection ARMV4/5 specific commands
-@cindex ARMV4/5 specific commands
+These commands are specific to ARM architecture v4 and v5,
+including all ARM7 or ARM9 systems and Intel XScale.
+They are available in addition to other core-specific
+commands that may be available.
-These commands are specific to ARM architecture v4 and v5, like all ARM7/9 systems
-or Intel XScale (XScale isn't supported yet).
-@itemize @bullet
-@item @b{armv4_5 reg}
-@cindex armv4_5 reg
-@*Display a list of all banked core registers, fetching the current value from every
+@deffn Command {armv4_5 core_state} [arm|thumb]
+Displays the core_state, optionally changing it to process
+either @option{arm} or @option{thumb} instructions.
+The target may later be resumed in the currently set core_state.
+(Processors may also support the Jazelle state, but
+that is not currently supported in OpenOCD.)
+@end deffn
+
+@deffn Command {armv4_5 disassemble} address count [thumb]
+@cindex disassemble
+Disassembles @var{count} instructions starting at @var{address}.
+If @option{thumb} is specified, Thumb (16-bit) instructions are used;
+else ARM (32-bit) instructions are used.
+(Processors may also support the Jazelle state, but
+those instructions are not currently understood by OpenOCD.)
+@end deffn
+
+@deffn Command {armv4_5 reg}
+Display a list of all banked core registers, fetching the current value from every
core mode if necessary. OpenOCD versions before rev. 60 didn't fetch the current
register value.
-@item @b{armv4_5 core_mode} [@var{arm}|@var{thumb}]
-@cindex armv4_5 core_mode
-@*Displays the core_mode, optionally changing it to either ARM or Thumb mode.
-The target is resumed in the currently set @option{core_mode}.
-@end itemize
+@end deffn
-@subsection ARM7/9 specific commands
-@cindex ARM7/9 specific commands
+@subsubsection ARM7 and ARM9 specific commands
+@cindex ARM7 specific commands
+@cindex ARM9 specific commands
-These commands are specific to ARM7 and ARM9 targets, like ARM7TDMI, ARM720t,
-ARM920T or ARM926EJ-S.
-@itemize @bullet
-@item @b{arm7_9 dbgrq} <@var{enable}|@var{disable}>
-@cindex arm7_9 dbgrq
-@*Enable use of the DBGRQ bit to force entry into debug mode. This should be
+These commands are specific to ARM7 and ARM9 cores, like ARM7TDMI, ARM720T,
+ARM9TDMI, ARM920T or ARM926EJ-S.
+They are available in addition to the ARMv4/5 commands,
+and any other core-specific commands that may be available.
+
+@deffn Command {arm7_9 dbgrq} (enable|disable)
+Control use of the EmbeddedIce DBGRQ signal to force entry into debug mode,
+instead of breakpoints. This should be
safe for all but ARM7TDMI--S cores (like Philips LPC).
-@item @b{arm7_9 fast_memory_access} <@var{enable}|@var{disable}>
-@cindex arm7_9 fast_memory_access
+@end deffn
+
+@deffn Command {arm7_9 dcc_downloads} (enable|disable)
+@cindex DCC
+Control the use of the debug communications channel (DCC) to write larger (>128 byte)
+amounts of memory. DCC downloads offer a huge speed increase, but might be
+unsafe, especially with targets running at very low speeds. This command was introduced
+with OpenOCD rev. 60, and requires a few bytes of working area.
+@end deffn
+
@anchor{arm7_9 fast_memory_access}
-@*Allow OpenOCD to read and write memory without checking completion of
+@deffn Command {arm7_9 fast_memory_access} (enable|disable)
+Enable or disable memory writes and reads that don't check completion of
the operation. This provides a huge speed increase, especially with USB JTAG
cables (FT2232), but might be unsafe if used with targets running at very low
speeds, like the 32kHz startup clock of an AT91RM9200.
-@item @b{arm7_9 dcc_downloads} <@var{enable}|@var{disable}>
-@cindex arm7_9 dcc_downloads
-@*Enable the use of the debug communications channel (DCC) to write larger (>128 byte)
-amounts of memory. DCC downloads offer a huge speed increase, but might be potentially
-unsafe, especially with targets running at very low speeds. This command was introduced
-with OpenOCD rev. 60, and requires a few bytes of working area.
-@end itemize
+@end deffn
-@subsection ARM720T specific commands
+@deffn {Debug Command} {arm7_9 write_core_reg} num mode word
+@emph{This is intended for use while debugging OpenOCD; you probably
+shouldn't use it.}
+
+Writes a 32-bit @var{word} to register @var{num} (from 0 to 16)
+as used in the specified @var{mode}
+(where e.g. mode 16 is "user" and mode 19 is "supervisor";
+the M4..M0 bits of the PSR).
+Registers 0..15 are the normal CPU registers such as r0(0), r1(1) ... pc(15).
+Register 16 is the mode-specific SPSR,
+unless the specified mode is 0xffffffff (32-bit all-ones)
+in which case register 16 is the CPSR.
+The write goes directly to the CPU, bypassing the register cache.
+@end deffn
+
+@deffn {Debug Command} {arm7_9 write_xpsr} word (0|1)
+@emph{This is intended for use while debugging OpenOCD; you probably
+shouldn't use it.}
+
+If the second parameter is zero, writes @var{word} to the
+Current Program Status register (CPSR).
+Else writes @var{word} to the current mode's Saved PSR (SPSR).
+In both cases, this bypasses the register cache.
+@end deffn
+
+@deffn {Debug Command} {arm7_9 write_xpsr_im8} byte rotate (0|1)
+@emph{This is intended for use while debugging OpenOCD; you probably
+shouldn't use it.}
+
+Writes eight bits to the CPSR or SPSR,
+first rotating them by @math{2*rotate} bits,
+and bypassing the register cache.
+This has lower JTAG overhead than writing the entire CPSR or SPSR
+with @command{arm7_9 write_xpsr}.
+@end deffn
+
+@subsubsection ARM720T specific commands
@cindex ARM720T specific commands
-@itemize @bullet
-@item @b{arm720t cp15} <@var{num}> [@var{value}]
-@cindex arm720t cp15
-@*display/modify cp15 register <@option{num}> [@option{value}].
-@item @b{arm720t md<bhw>_phys} <@var{addr}> [@var{count}]
-@cindex arm720t md<bhw>_phys
-@*Display memory at physical address addr.
-@item @b{arm720t mw<bhw>_phys} <@var{addr}> <@var{value}>
-@cindex arm720t mw<bhw>_phys
-@*Write memory at physical address addr.
-@item @b{arm720t virt2phys} <@var{va}>
-@cindex arm720t virt2phys
-@*Translate a virtual address to a physical address.
-@end itemize
+These commands are available to ARM720T based CPUs,
+which are implementations of the ARMv4T architecture
+based on the ARM7TDMI-S integer core.
+They are available in addition to the ARMv4/5 and ARM7/ARM9 commands.
-@subsection ARM9TDMI specific commands
+@deffn Command {arm720t cp15} regnum [value]
+Display cp15 register @var{regnum};
+else if a @var{value} is provided, that value is written to that register.
+@end deffn
+
+@deffn Command {arm720t mdw_phys} addr [count]
+@deffnx Command {arm720t mdh_phys} addr [count]
+@deffnx Command {arm720t mdb_phys} addr [count]
+Display contents of physical address @var{addr}, as
+32-bit words (@command{mdw_phys}), 16-bit halfwords (@command{mdh_phys}),
+or 8-bit bytes (@command{mdb_phys}).
+If @var{count} is specified, displays that many units.
+@end deffn
+
+@deffn Command {arm720t mww_phys} addr word
+@deffnx Command {arm720t mwh_phys} addr halfword
+@deffnx Command {arm720t mwb_phys} addr byte
+Writes the specified @var{word} (32 bits),
+@var{halfword} (16 bits), or @var{byte} (8-bit) pattern,
+at the specified physical address @var{addr}.
+@end deffn
+
+@deffn Command {arm720t virt2phys} va
+Translate a virtual address @var{va} to a physical address
+and display the result.
+@end deffn
+
+@subsubsection ARM9TDMI specific commands
@cindex ARM9TDMI specific commands
-@itemize @bullet
-@item @b{arm9tdmi vector_catch} <@var{all}|@var{none}>
-@cindex arm9tdmi vector_catch
-@*Catch arm9 interrupt vectors, can be @option{all} @option{none} or any of the following:
+Many ARM9-family CPUs are built around ARM9TDMI integer cores,
+or processors resembling ARM9TDMI, and can use these commands.
+Such cores include the ARM920T, ARM926EJ-S, and ARM966.
+
+@deffn Command {arm9tdmi vector_catch} (all|none|list)
+Catch arm9 interrupt vectors, can be @option{all}, @option{none},
+or a list with one or more of the following:
@option{reset} @option{undef} @option{swi} @option{pabt} @option{dabt} @option{reserved}
@option{irq} @option{fiq}.
+@end deffn
-Can also be used on other ARM9 based cores such as ARM966, ARM920T and ARM926EJ-S.
-@end itemize
+@subsubsection ARM920T specific commands
+@cindex ARM920T specific commands
-@subsection ARM966E specific commands
-@cindex ARM966E specific commands
+These commands are available to ARM920T based CPUs,
+which are implementations of the ARMv4T architecture
+built using the ARM9TDMI integer core.
+They are available in addition to the ARMv4/5, ARM7/ARM9,
+and ARM9TDMI commands.
-@itemize @bullet
-@item @b{arm966e cp15} <@var{num}> [@var{value}]
-@cindex arm966e cp15
-@*display/modify cp15 register <@option{num}> [@option{value}].
-@end itemize
+@deffn Command {arm920t cache_info}
+Print information about the caches found. This allows to see whether your target
+is an ARM920T (2x16kByte cache) or ARM922T (2x8kByte cache).
+@end deffn
-@subsection ARM920T specific commands
-@cindex ARM920T specific commands
+@deffn Command {arm920t cp15} regnum [value]
+Display cp15 register @var{regnum};
+else if a @var{value} is provided, that value is written to that register.
+@end deffn
-@itemize @bullet
-@item @b{arm920t cp15} <@var{num}> [@var{value}]
-@cindex arm920t cp15
-@*display/modify cp15 register <@option{num}> [@option{value}].
-@item @b{arm920t cp15i} <@var{num}> [@var{value}] [@var{address}]
-@cindex arm920t cp15i
-@*display/modify cp15 (interpreted access) <@option{opcode}> [@option{value}] [@option{address}]
-@item @b{arm920t cache_info}
-@cindex arm920t cache_info
-@*Print information about the caches found. This allows to see whether your target
-is an ARM920T (2x16kByte cache) or ARM922T (2x8kByte cache).
-@item @b{arm920t md<bhw>_phys} <@var{addr}> [@var{count}]
-@cindex arm920t md<bhw>_phys
-@*Display memory at physical address addr.
-@item @b{arm920t mw<bhw>_phys} <@var{addr}> <@var{value}>
-@cindex arm920t mw<bhw>_phys
-@*Write memory at physical address addr.
-@item @b{arm920t read_cache} <@var{filename}>
-@cindex arm920t read_cache
-@*Dump the content of ICache and DCache to a file.
-@item @b{arm920t read_mmu} <@var{filename}>
-@cindex arm920t read_mmu
-@*Dump the content of the ITLB and DTLB to a file.
-@item @b{arm920t virt2phys} <@var{va}>
-@cindex arm920t virt2phys
-@*Translate a virtual address to a physical address.
-@end itemize
+@deffn Command {arm920t cp15i} opcode [value [address]]
+Interpreted access using cp15 @var{opcode}.
+If no @var{value} is provided, the result is displayed.
+Else if that value is written using the specified @var{address},
+or using zero if no other address is not provided.
+@end deffn
-@subsection ARM926EJ-S specific commands
+@deffn Command {arm920t mdw_phys} addr [count]
+@deffnx Command {arm920t mdh_phys} addr [count]
+@deffnx Command {arm920t mdb_phys} addr [count]
+Display contents of physical address @var{addr}, as
+32-bit words (@command{mdw_phys}), 16-bit halfwords (@command{mdh_phys}),
+or 8-bit bytes (@command{mdb_phys}).
+If @var{count} is specified, displays that many units.
+@end deffn
+
+@deffn Command {arm920t mww_phys} addr word
+@deffnx Command {arm920t mwh_phys} addr halfword
+@deffnx Command {arm920t mwb_phys} addr byte
+Writes the specified @var{word} (32 bits),
+@var{halfword} (16 bits), or @var{byte} (8-bit) pattern,
+at the specified physical address @var{addr}.
+@end deffn
+
+@deffn Command {arm920t read_cache} filename
+Dump the content of ICache and DCache to a file named @file{filename}.
+@end deffn
+
+@deffn Command {arm920t read_mmu} filename
+Dump the content of the ITLB and DTLB to a file named @file{filename}.
+@end deffn
+
+@deffn Command {arm920t virt2phys} @var{va}
+Translate a virtual address @var{va} to a physical address
+and display the result.
+@end deffn
+
+@subsubsection ARM926EJ-S specific commands
@cindex ARM926EJ-S specific commands
-@itemize @bullet
-@item @b{arm926ejs cp15} <@var{num}> [@var{value}]
-@cindex arm926ejs cp15
-@*display/modify cp15 register <@option{num}> [@option{value}].
-@item @b{arm926ejs cache_info}
-@cindex arm926ejs cache_info
-@*Print information about the caches found.
-@item @b{arm926ejs md<bhw>_phys} <@var{addr}> [@var{count}]
-@cindex arm926ejs md<bhw>_phys
-@*Display memory at physical address addr.
-@item @b{arm926ejs mw<bhw>_phys} <@var{addr}> <@var{value}>
-@cindex arm926ejs mw<bhw>_phys
-@*Write memory at physical address addr.
-@item @b{arm926ejs virt2phys} <@var{va}>
-@cindex arm926ejs virt2phys
-@*Translate a virtual address to a physical address.
-@end itemize
+These commands are available to ARM926EJ-S based CPUs,
+which are implementations of the ARMv5TEJ architecture
+based on the ARM9EJ-S integer core.
+They are available in addition to the ARMv4/5, ARM7/ARM9,
+and ARM9TDMI commands.
-@subsection CORTEX_M3 specific commands
-@cindex CORTEX_M3 specific commands
+@deffn Command {arm926ejs cache_info}
+Print information about the caches found.
+@end deffn
-@itemize @bullet
-@item @b{cortex_m3 maskisr} <@var{on}|@var{off}>
-@cindex cortex_m3 maskisr
-@*Enable masking (disabling) interrupts during target step/resume.
-@end itemize
+@deffn Command {arm926ejs cp15} opcode1 opcode2 CRn CRm regnum [value]
+Accesses cp15 register @var{regnum} using
+@var{opcode1}, @var{opcode2}, @var{CRn}, and @var{CRm}.
+If a @var{value} is provided, that value is written to that register.
+Else that register is read and displayed.
+@end deffn
-@page
-@section Debug commands
-@cindex Debug commands
-The following commands give direct access to the core, and are most likely
-only useful while debugging OpenOCD.
-@itemize @bullet
-@item @b{arm7_9 write_xpsr} <@var{32-bit value}> <@option{0=cpsr}, @option{1=spsr}>
-@cindex arm7_9 write_xpsr
-@*Immediately write either the current program status register (CPSR) or the saved
-program status register (SPSR), without changing the register cache (as displayed
-by the @option{reg} and @option{armv4_5 reg} commands).
-@item @b{arm7_9 write_xpsr_im8} <@var{8-bit value}> <@var{rotate 4-bit}>
-<@var{0=cpsr},@var{1=spsr}>
-@cindex arm7_9 write_xpsr_im8
-@*Write the 8-bit value rotated right by 2*rotate bits, using an immediate write
-operation (similar to @option{write_xpsr}).
-@item @b{arm7_9 write_core_reg} <@var{num}> <@var{mode}> <@var{value}>
-@cindex arm7_9 write_core_reg
-@*Write a core register, without changing the register cache (as displayed by the
-@option{reg} and @option{armv4_5 reg} commands). The <@var{mode}> argument takes the
-encoding of the [M4:M0] bits of the PSR.
-@end itemize
+@deffn Command {arm926ejs mdw_phys} addr [count]
+@deffnx Command {arm926ejs mdh_phys} addr [count]
+@deffnx Command {arm926ejs mdb_phys} addr [count]
+Display contents of physical address @var{addr}, as
+32-bit words (@command{mdw_phys}), 16-bit halfwords (@command{mdh_phys}),
+or 8-bit bytes (@command{mdb_phys}).
+If @var{count} is specified, displays that many units.
+@end deffn
-@section Target Requests
-@cindex Target Requests
-OpenOCD can handle certain target requests, currently debugmsg are only supported for arm7_9 and cortex_m3.
+@deffn Command {arm926ejs mww_phys} addr word
+@deffnx Command {arm926ejs mwh_phys} addr halfword
+@deffnx Command {arm926ejs mwb_phys} addr byte
+Writes the specified @var{word} (32 bits),
+@var{halfword} (16 bits), or @var{byte} (8-bit) pattern,
+at the specified physical address @var{addr}.
+@end deffn
+
+@deffn Command {arm926ejs virt2phys} @var{va}
+Translate a virtual address @var{va} to a physical address
+and display the result.
+@end deffn
+
+@subsubsection ARM966E specific commands
+@cindex ARM966E specific commands
+
+These commands are available to ARM966 based CPUs,
+which are implementations of the ARMv5TE architecture.
+They are available in addition to the ARMv4/5, ARM7/ARM9,
+and ARM9TDMI commands.
+
+@deffn Command {arm966e cp15} regnum [value]
+Display cp15 register @var{regnum};
+else if a @var{value} is provided, that value is written to that register.
+@end deffn
+
+@subsubsection XScale specific commands
+@cindex XScale specific commands
+
+These commands are available to XScale based CPUs,
+which are implementations of the ARMv5TE architecture.
+
+@deffn Command {xscale analyze_trace}
+Displays the contents of the trace buffer.
+@end deffn
+
+@deffn Command {xscale cache_clean_address} address
+Changes the address used when cleaning the data cache.
+@end deffn
+
+@deffn Command {xscale cache_info}
+Displays information about the CPU caches.
+@end deffn
+
+@deffn Command {xscale cp15} regnum [value]
+Display cp15 register @var{regnum};
+else if a @var{value} is provided, that value is written to that register.
+@end deffn
+
+@deffn Command {xscale debug_handler} target address
+Changes the address used for the specified target's debug handler.
+@end deffn
+
+@deffn Command {xscale dcache} (enable|disable)
+Enables or disable the CPU's data cache.
+@end deffn
+
+@deffn Command {xscale dump_trace} filename
+Dumps the raw contents of the trace buffer to @file{filename}.
+@end deffn
+
+@deffn Command {xscale icache} (enable|disable)
+Enables or disable the CPU's instruction cache.
+@end deffn
+
+@deffn Command {xscale mmu} (enable|disable)
+Enables or disable the CPU's memory management unit.
+@end deffn
+
+@deffn Command {xscale trace_buffer} (enable|disable) [fill [n] | wrap]
+Enables or disables the trace buffer,
+and controls how it is emptied.
+@end deffn
+
+@deffn Command {xscale trace_image} filename [offset [type]]
+Opens a trace image from @file{filename}, optionally rebasing
+its segment addresses by @var{offset}.
+The image @var{type} may be one of
+@option{bin} (binary), @option{ihex} (Intel hex),
+@option{elf} (ELF file), @option{s19} (Motorola s19),
+@option{mem}, or @option{builder}.
+@end deffn
+
+@deffn Command {xscale vector_catch} mask
+Provide a bitmask showing the vectors to catch.
+@end deffn
+
+@subsection ARMv6 Architecture
+
+@subsubsection ARM11 specific commands
+@cindex ARM11 specific commands
+
+@deffn Command {arm11 mcr} p1 p2 p3 p4 p5
+Read coprocessor register
+@end deffn
+
+@deffn Command {arm11 memwrite burst} [value]
+Displays the value of the memwrite burst-enable flag,
+which is enabled by default.
+If @var{value} is defined, first assigns that.
+@end deffn
+
+@deffn Command {arm11 memwrite error_fatal} [value]
+Displays the value of the memwrite error_fatal flag,
+which is enabled by default.
+If @var{value} is defined, first assigns that.
+@end deffn
+
+@deffn Command {arm11 mrc} p1 p2 p3 p4 p5 value
+Write coprocessor register
+@end deffn
+
+@deffn Command {arm11 no_increment} [value]
+Displays the value of the flag controlling whether
+some read or write operations increment the pointer
+(the default behavior) or not (acting like a FIFO).
+If @var{value} is defined, first assigns that.
+@end deffn
+
+@deffn Command {arm11 step_irq_enable} [value]
+Displays the value of the flag controlling whether
+IRQs are enabled during single stepping;
+they is disabled by default.
+If @var{value} is defined, first assigns that.
+@end deffn
+
+@subsection ARMv7 Architecture
+
+@subsubsection Cortex-M3 specific commands
+@cindex Cortex-M3 specific commands
+
+@deffn Command {cortex_m3 maskisr} (on|off)
+Control masking (disabling) interrupts during target step/resume.
+@end deffn
+
+@section Target DCC Requests
+@cindex Linux-ARM DCC support
+@cindex libdcc
+@cindex DCC
+OpenOCD can handle certain target requests; currently debugmsgs
+@command{target_request debugmsgs}
+are only supported for arm7_9 and cortex_m3.
+
See libdcc in the contrib dir for more details.
-@itemize @bullet
-@item @b{target_request debugmsgs} <@var{enable}|@var{disable}|@var{charmsg}>
-@cindex target_request debugmsgs
-@*Enable/disable target debugmsgs requests. debugmsgs enable messages to be sent to the debugger while the target is running. @var{charmsg} receives messages if Linux kernel ``Kernel low-level debugging via EmbeddedICE DCC channel'' option is enabled.
-@end itemize
+Linux-ARM kernels have a ``Kernel low-level debugging
+via EmbeddedICE DCC channel'' option (CONFIG_DEBUG_ICEDCC,
+depends on CONFIG_DEBUG_LL) which uses this mechanism to
+deliver messages before a serial console can be activated.
+@deffn Command {target_request debugmsgs} [enable|disable|charmsg]
+Displays current handling of target DCC message requests.
+These messages may be sent to the debugger while the target is running.
+The optional @option{enable} and @option{charmsg} parameters are
+equivalent; both enable the messages, @option{disable} disables them.
+@end deffn
+
@node JTAG Commands
@chapter JTAG Commands
@cindex JTAG Commands
|
|
From: <zw...@ma...> - 2009-05-28 03:18:52
|
Author: zwelch
Date: 2009-05-28 03:18:47 +0200 (Thu, 28 May 2009)
New Revision: 1938
Modified:
trunk/doc/openocd.texi
Log:
David Brownell <da...@pa...>:
Continue updating the NOR flash coverage to use @deffn syntax, so the
commands have more consistent presentation and formatting. This
reorganizes information and updates its presentation, except where
the information didn't really match the code.
This patch updates the main commands, and finishes making the section
structure parallel the NAND presentation. Of note:
- The "flash fill[whb] addr value length" commands are now documented.
- The "flash bank" command is now presented much earlier
- Explicit mention is made that NOR flash should be read using just
standard memory access commands, like "mdw" and "dump_image".
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-28 01:11:10 UTC (rev 1937)
+++ trunk/doc/openocd.texi 2009-05-28 01:18:47 UTC (rev 1938)
@@ -64,7 +64,7 @@
* Reset Configuration:: Reset Configuration
* Tap Creation:: Tap Creation
* Target Configuration:: Target Configuration
-* Flash Configuration:: Flash Configuration
+* Flash Commands:: Flash Commands
* NAND Flash Commands:: NAND Flash Commands
* General Commands:: General Commands
* JTAG Commands:: JTAG Commands
@@ -2305,9 +2305,8 @@
@end example
@* The target# is a the 0 based target numerical index.
-@node Flash Configuration
-@chapter Flash programming
-@cindex Flash Configuration
+@node Flash Commands
+@chapter Flash Commands
OpenOCD has different commands for NOR and NAND flash;
the ``flash'' command works with NOR flash, while
@@ -2319,95 +2318,36 @@
However, the documentation also uses ``flash'' as a generic term;
for example, ``Put flash configuration in board-specific files''.
-@b{Note:} As of 28/nov/2008 OpenOCD does not know how to program a SPI
+@quotation Note
+As of 28-nov-2008 OpenOCD does not know how to program a SPI
flash that a micro may boot from. Perhaps you, the reader, would like to
contribute support for this.
+@end quotation
Flash Steps:
@enumerate
-@item Configure via the command @b{flash bank}
-@* Normally this is done in a configuration file.
-@item Operate on the flash via @b{flash SOMECOMMAND}
+@item Configure via the command @command{flash bank}
+@* Do this in a board-specific configuration file,
+passing parameters as needed by the driver.
+@item Operate on the flash via @command{flash subcommand}
@* Often commands to manipulate the flash are typed by a human, or run
-via a script in some automated way. For example: To program the boot
-flash on your board.
+via a script in some automated way. Common tasks include writing a
+boot loader, operating system, or other data.
@item GDB Flashing
@* Flashing via GDB requires the flash be configured via ``flash
bank'', and the GDB flash features be enabled.
@xref{GDB Configuration}.
@end enumerate
-@section Flash commands
-@cindex Flash commands
-@subsection flash banks
-@b{flash banks}
-@cindex flash banks
-@*List configured flash banks
-@*@b{NOTE:} the singular form: 'flash bank' is used to configure the flash banks.
-@subsection flash info
-@b{flash info} <@var{num}>
-@cindex flash info
-@*Print info about flash bank <@option{num}>
-@subsection flash probe
-@b{flash probe} <@var{num}>
-@cindex flash probe
-@*Identify the flash, or validate the parameters of the configured flash. Operation
-depends on the flash type.
-@subsection flash erase_check
-@b{flash erase_check} <@var{num}>
-@cindex flash erase_check
-@*Check erase state of sectors in flash bank <@var{num}>. This is the only operation that
-updates the erase state information displayed by @option{flash info}. That means you have
-to issue an @option{erase_check} command after erasing or programming the device to get
-updated information.
-@subsection flash protect_check
-@b{flash protect_check} <@var{num}>
-@cindex flash protect_check
-@*Check protection state of sectors in flash bank <num>.
-@option{flash erase_sector} using the same syntax.
-@subsection flash erase_sector
-@b{flash erase_sector} <@var{num}> <@var{first}> <@var{last}>
-@cindex flash erase_sector
-@anchor{flash erase_sector}
-@*Erase sectors at bank <@var{num}>, starting at sector <@var{first}> up to and including
-<@var{last}>. Sector numbering starts at 0. Depending on the flash type, erasing may
-require the protection to be disabled first (e.g. Intel Advanced Bootblock flash using
-the CFI driver).
-@subsection flash erase_address
-@b{flash erase_address} <@var{address}> <@var{length}>
-@cindex flash erase_address
-@*Erase sectors starting at <@var{address}> for <@var{length}> bytes
-@subsection flash write_bank
-@b{flash write_bank} <@var{num}> <@var{file}> <@var{offset}>
-@cindex flash write_bank
-@anchor{flash write_bank}
-@*Write the binary <@var{file}> to flash bank <@var{num}>, starting at
-<@option{offset}> bytes from the beginning of the bank.
-@subsection flash write_image
-@b{flash write_image} [@var{erase}] <@var{file}> [@var{offset}] [@var{type}]
-@cindex flash write_image
-@anchor{flash write_image}
-@*Write the image <@var{file}> to the current target's flash bank(s). A relocation
-[@var{offset}] can be specified and the file [@var{type}] can be specified
-explicitly as @option{bin} (binary), @option{ihex} (Intel hex), @option{elf}
-(ELF file) or @option{s19} (Motorola s19). Flash memory will be erased prior to programming
-if the @option{erase} parameter is given.
-@subsection flash protect
-@b{flash protect} <@var{num}> <@var{first}> <@var{last}> <@option{on}|@option{off}>
-@cindex flash protect
-@*Enable (@var{on}) or disable (@var{off}) protection of flash sectors <@var{first}> to
-<@var{last}> of @option{flash bank} <@var{num}>.
+Many CPUs have the ablity to ``boot'' from the first flash bank.
+This means that misprograming that bank can ``brick'' a system,
+so that it can't boot.
+JTAG tools, like OpenOCD, are often then used to ``de-brick'' the
+board by (re)installing working boot firmware.
-@section flash bank command
-The @command{flash bank} command is used to configure one or more flash
-chips (or @emph{banks} in OpenOCD terms).
-Most CPUs have the ablity to ``boot'' from the first flash bank.
+@section Flash Configuration Commands
+@cindex flash configuration
-@quotation Note
-This command is not available after OpenOCD initialization has completed.
-Use it in board specific configuration files, not interactively.
-@end quotation
-
@deffn {Config Command} {flash bank} driver base size chip_width bus_width target [driver_options]
Configures a flash bank which provides persistent storage
for addresses from @math{base} to @math{base + size - 1}.
@@ -2435,8 +2375,154 @@
additional parameters. See the driver-specific documentation
for more information.
@end itemize
+@quotation Note
+This command is not available after OpenOCD initialization has completed.
+Use it in board specific configuration files, not interactively.
+@end quotation
@end deffn
+@comment the REAL name for this command is "ocd_flash_banks"
+@comment less confusing would be: "flash list" (like "nand list")
+@deffn Command {flash banks}
+Prints a one-line summary of each device declared
+using @command{flash bank}, numbered from zero.
+Note that this is the @emph{plural} form;
+the @emph{singular} form is a very different command.
+@end deffn
+
+@deffn Command {flash probe} num
+Identify the flash, or validate the parameters of the configured flash. Operation
+depends on the flash type.
+The @var{num} parameter is a value shown by @command{flash banks}.
+Most flash commands will implicitly @emph{autoprobe} the bank;
+flash drivers can distinguish between probing and autoprobing,
+but most don't bother.
+@end deffn
+
+@section Erasing, Reading, Writing to Flash
+@cindex flash erasing
+@cindex flash reading
+@cindex flash writing
+@cindex flash programming
+
+One feature distinguishing NOR flash from NAND or serial flash technologies
+is that for read access, it acts exactly like any other addressible memory.
+This means you can use normal memory read commands like @command{mdw} or
+@command{dump_image} with it, with no special @command{flash} subcommands.
+@xref{Memory access}.
+@xref{Image access}.
+
+Write access works differently. Flash memory normally needs to be erased
+before it's written. Erasing a sector turns all of its bits to ones, and
+writing can turn ones into zeroes. This is why there are special commands
+for interactive erasing and writing, and why GDB needs to know which parts
+of the address space hold NOR flash memory.
+
+@quotation Note
+Most of these erase and write commands leverage the fact that NOR flash
+chips consume target address space. They implicitly refer to the current
+JTAG target, and map from an address in that target's address space
+back to a flash bank.
+@comment In May 2009, those mappings may fail if any bank associated
+@comment with that target doesn't succesfuly autoprobe ... bug worth fixing?
+A few commands use abstract addressing based on bank and sector numbers,
+and don't depend on searching the current target and its address space.
+Avoid confusing the two command models.
+@end quotation
+
+Some flash chips implement software protection against accidental writes,
+since such buggy writes could in some cases ``brick'' a system.
+For such systems, erasing and writing may require sector protection to be
+disabled first.
+Examples include CFI flash such as ``Intel Advanced Bootblock flash'',
+and AT91SAM7 on-chip flash.
+@xref{flash protect}.
+
+@anchor{flash erase_sector}
+@deffn Command {flash erase_sector} num first last
+Erase sectors in bank @var{num}, starting at sector @var{first} up to and including
+@var{last}. Sector numbering starts at 0.
+The @var{num} parameter is a value shown by @command{flash banks}.
+@end deffn
+
+@deffn Command {flash erase_address} address length
+Erase sectors starting at @var{address} for @var{length} bytes.
+The flash bank to use is inferred from the @var{address}, and
+the specified length must stay within that bank.
+As a special case, when @var{length} is zero and @var{address} is
+the start of the bank, the whole flash is erased.
+@end deffn
+
+@deffn Command {flash fillw} address word length
+@deffnx Command {flash fillh} address halfword length
+@deffnx Command {flash fillb} address byte length
+Fills flash memory with the specified @var{word} (32 bits),
+@var{halfword} (16 bits), or @var{byte} (8-bit) pattern,
+starting at @var{address} and continuing
+for @var{length} units (word/halfword/byte).
+No erasure is done before writing; when needed, that must be done
+before issuing this command.
+Writes are done in blocks of up to 1024 bytes, and each write is
+verified by reading back the data and comparing it to what was written.
+The flash bank to use is inferred from the @var{address} of
+each block, and the specified length must stay within that bank.
+@end deffn
+@comment no current checks for errors if fill blocks touch multiple banks!
+
+@anchor{flash write_bank}
+@deffn Command {flash write_bank} num filename offset
+Write the binary @file{filename} to flash bank @var{num},
+starting at @var{offset} bytes from the beginning of the bank.
+The @var{num} parameter is a value shown by @command{flash banks}.
+@end deffn
+
+@anchor{flash write_image}
+@deffn Command {flash write_image} [erase] filename [offset] [type]
+Write the image @file{filename} to the current target's flash bank(s).
+A relocation @var{offset} may be specified, in which case it is added
+to the base address for each section in the image.
+The file [@var{type}] can be specified
+explicitly as @option{bin} (binary), @option{ihex} (Intel hex), @option{elf}
+(ELF file) or @option{s19} (Motorola s19).
+The relevant flash sectors will be erased prior to programming
+if the @option{erase} parameter is given.
+The flash bank to use is inferred from the @var{address} of
+each image segment.
+@end deffn
+
+@section Other Flash commands
+@cindex flash protection
+
+@deffn Command {flash erase_check} num
+Check erase state of sectors in flash bank @var{num},
+and display that status.
+The @var{num} parameter is a value shown by @command{flash banks}.
+This is the only operation that
+updates the erase state information displayed by @option{flash info}. That means you have
+to issue an @command{flash erase_check} command after erasing or programming the device
+to get updated information.
+(Code execution may have invalidated any state records kept by OpenOCD.)
+@end deffn
+
+@deffn Command {flash info} num
+Print info about flash bank @var{num}
+The @var{num} parameter is a value shown by @command{flash banks}.
+The information includes per-sector protect status.
+@end deffn
+
+@anchor{flash protect}
+@deffn Command {flash protect} num first last (on|off)
+Enable (@var{on}) or disable (@var{off}) protection of flash sectors
+@var{first} to @var{last} of flash bank @var{num}.
+The @var{num} parameter is a value shown by @command{flash banks}.
+@end deffn
+
+@deffn Command {flash protect_check} num
+Check protection state of sectors in flash bank @var{num}.
+The @var{num} parameter is a value shown by @command{flash banks}.
+@comment @option{flash erase_sector} using the same syntax.
+@end deffn
+
@section Flash Drivers, Options, and Commands
@anchor{Flash Driver List}
As noted above, the @command{flash bank} command requires a driver name,
@@ -3279,6 +3365,7 @@
@section Memory access commands
+@anchor{Memory access}
@subsection meminfo
display available RAM memory.
@subsection Memory peek/poke type commands
@@ -3314,6 +3401,7 @@
@end itemize
@section Image loading commands
+@anchor{Image access}
@subsection load_image
@b{load_image} <@var{file}> <@var{address}> [@option{bin}|@option{ihex}|@option{elf}]
@cindex load_image
|
|
From: <zw...@ma...> - 2009-05-28 03:11:15
|
Author: zwelch Date: 2009-05-28 03:11:10 +0200 (Thu, 28 May 2009) New Revision: 1937 Modified: trunk/doc/openocd.texi Log: David Brownell <da...@pa...>: Start updating the NOR flash coverage to use @deffn syntax, so the commands have more consistent presentation and formatting. This reorganizes information and updates its presentation, except where the information didn't really match the code. This patch updates most of the driver specific support, creating one new (and alphabetized!) section just for driver-specific data, where previously that data was split over up to three sections. Of note: - The at91sam7 docs were a bit out of date with respect to the code. - The "str9xpec" stuff still deserves some work. For now, it sits in its own subsection; pretty messy. - Likewise the "mflash" stuff. That's a parallel infrastructure, and is now in a section of its own. - The "mass_erase" commands for the Cortex M3 chips got turned into footnotes. IMO, they should vanish sometime; they're superfluous. - There are still a bunch of undocumented NOR drivers. Examples: avr(8), tms470, pic32mx, more. Plus there are a handful of minor tweaks to the NAND docs (to help make the NOR and NAND presentations be parallel); the "Command Index" has been renamed as the "Command and Driver Index"; reference TI instead of Luminary Micro in several places. Modified: trunk/doc/openocd.texi =================================================================== --- trunk/doc/openocd.texi 2009-05-28 00:47:30 UTC (rev 1936) +++ trunk/doc/openocd.texi 2009-05-28 01:11:10 UTC (rev 1937) @@ -82,7 +82,7 @@ @comment Occurs when creating ``--html --no-split'' output @comment This fix is based on: http://sourceware.org/ml/binutils/2006-05/msg00215.html * OpenOCD Concept Index:: Concept Index -* OpenOCD Command Index:: Command Index +* Command and Driver Index:: Command and Driver Index @end menu @node About @@ -110,7 +110,7 @@ @b{GDB Debug:} It allows ARM7 (ARM7TDMI and ARM720t), ARM9 (ARM920T, ARM922T, ARM926EJ--S, ARM966E--S), XScale (PXA25x, IXP42x) and -Cortex-M3 (Luminary Stellaris LM3 and ST STM32) based cores to be +Cortex-M3 (Stellaris LM3 and ST STM32) based cores to be debugged via the GDB protocol. @b{Flash Programing:} Flash writing is supported for external CFI @@ -497,7 +497,7 @@ @item @b{signalyzer} @* See: @url{http://www.signalyzer.com} @item @b{evb_lm3s811} -@* See: @url{http://www.luminarymicro.com} - The Luminary Micro Stellaris LM3S811 eval board has an FTD2232C chip built in. +@* See: @url{http://www.luminarymicro.com} - The Stellaris LM3S811 eval board has an FTD2232C chip built in. @item @b{olimex-jtag} @* See: @url{http://www.olimex.com} @item @b{flyswatter} @@ -2398,204 +2398,265 @@ @*Enable (@var{on}) or disable (@var{off}) protection of flash sectors <@var{first}> to <@var{last}> of @option{flash bank} <@var{num}>. -@subsection mFlash commands -@cindex mFlash commands +@section flash bank command +The @command{flash bank} command is used to configure one or more flash +chips (or @emph{banks} in OpenOCD terms). +Most CPUs have the ablity to ``boot'' from the first flash bank. + +@quotation Note +This command is not available after OpenOCD initialization has completed. +Use it in board specific configuration files, not interactively. +@end quotation + +@deffn {Config Command} {flash bank} driver base size chip_width bus_width target [driver_options] +Configures a flash bank which provides persistent storage +for addresses from @math{base} to @math{base + size - 1}. +These banks will often be visible to GDB through the target's memory map. +In some cases, configuring a flash bank will activate extra commands; +see the driver-specific documentation. + @itemize @bullet -@item @b{mflash probe} -@cindex mflash probe -@*Probe mflash. -@item @b{mflash write} <@var{num}> <@var{file}> <@var{offset}> -@cindex mflash write -@*Write the binary <@var{file}> to mflash bank <@var{num}>, starting at -<@var{offset}> bytes from the beginning of the bank. -@item @b{mflash dump} <@var{num}> <@var{file}> <@var{offset}> <@var{size}> -@cindex mflash dump -@*Dump <size> bytes, starting at <@var{offset}> bytes from the beginning of the <@var{num}> bank -to a <@var{file}>. -@item @b{mflash config pll} <@var{frequency}> -@cindex mflash config pll -@*Configure mflash pll. <@var{frequency}> is input frequency of mflash. The order is Hz. -Issuing this command will erase mflash's whole internal nand and write new pll. -After this command, mflash needs power-on-reset for normal operation. -If pll was newly configured, storage and boot(optional) info also need to be update. -@item @b{mflash config boot} -@cindex mflash config boot -@*Configure bootable option. If bootable option is set, mflash offer the first 8 sectors -(4kB) for boot. -@item @b{mflash config storage} -@cindex mflash config storage -@*Configure storage information. For the normal storage operation, this information must be -written. +@item @var{driver} ... identifies the controller driver +associated with the flash bank being declared. +This is usually @code{cfi} for external flash, or else +the name of a microcontroller with embedded flash memory. +@xref{Flash Driver List}. +@item @var{base} ... Base address of the flash chip. +@item @var{size} ... Size of the chip, in bytes. +For some drivers, this value is detected from the hardware. +@item @var{chip_width} ... Width of the flash chip, in bytes; +ignored for most microcontroller drivers. +@item @var{bus_width} ... Width of the data bus used to access the +chip, in bytes; ignored for most microcontroller drivers. +@item @var{target} ... Names the target used to issue +commands to the flash controller. +@comment Actually, it's currently a controller-specific parameter... +@item @var{driver_options} ... drivers may support, or require, +additional parameters. See the driver-specific documentation +for more information. @end itemize +@end deffn -@section flash bank command -The @b{flash bank} command is used to configure one or more flash chips (or banks in OpenOCD terms) +@section Flash Drivers, Options, and Commands +@anchor{Flash Driver List} +As noted above, the @command{flash bank} command requires a driver name, +and allows driver-specific options and behaviors. +Some drivers also activate driver-specific commands. -@example -@b{flash bank} <@var{driver}> <@var{base}> <@var{size}> <@var{chip_width}> -<@var{bus_width}> <@var{target}> [@var{driver_options ...}] -@end example -@cindex flash bank -@*Configures a flash bank at <@var{base}> of <@var{size}> bytes and <@var{chip_width}> -and <@var{bus_width}> bytes using the selected flash <driver>. +@subsection External Flash -@subsection External Flash - cfi options -@cindex cfi options -CFI flashes are external flash chips - often they are connected to a -specific chip select on the CPU. By default, at hard reset, most -CPUs have the ablity to ``boot'' from some flash chip - typically -attached to the CPU's CS0 pin. - -For other chip selects: OpenOCD does not know how to configure, or -access a specific chip select. Instead you, the human, might need to -configure additional chip selects via other commands (like: mww) , or +@deffn {Flash Driver} cfi +@cindex Common Flash Interface +@cindex CFI +The ``Common Flash Interface'' (CFI) is the main standard for +external NOR flash chips, each of which connects to a +specific external chip select on the CPU. +Frequently the first such chip is used to boot the system. +Your board's @code{reset-init} handler might need to +configure additional chip selects using other commands (like: @command{mww} to +configure a bus and its timings) , or perhaps configure a GPIO pin that controls the ``write protect'' pin on the flash chip. +The CFI driver can use a target-specific working area to significantly +speed up operation. -@b{flash bank cfi} <@var{base}> <@var{size}> <@var{chip_width}> <@var{bus_width}> -<@var{target}> [@var{jedec_probe}|@var{x16_as_x8}] -@*CFI flashes require the name or number of the target they're connected to -as an additional -argument. The CFI driver makes use of a working area (specified for the target) -to significantly speed up operation. +The CFI driver can accept the following optional parameters, in any order: -@var{chip_width} and @var{bus_width} are specified in bytes. +@itemize +@item @var{jedec_probe} ... is used to detect certain non-CFI flash ROMs, +like AM29LV010 and similar types. +@item @var{x16_as_x8} ... +@end itemize -The @var{jedec_probe} option is used to detect certain non-CFI flash ROMs, like AM29LV010 and similar types. +To configure two adjacent banks of 16 MBytes each, both sixteen bits (two bytes) +wide on a sixteen bit bus: -@var{x16_as_x8} ??? +@example +flash bank cfi 0x00000000 0x01000000 2 2 $_TARGETNAME +flash bank cfi 0x01000000 0x01000000 2 2 $_TARGETNAME +@end example +@end deffn @subsection Internal Flash (Microcontrollers) -@subsubsection lpc2000 options -@cindex lpc2000 options -@b{flash bank lpc2000} <@var{base}> <@var{size}> 0 0 <@var{target}> <@var{variant}> -<@var{clock}> [@var{calc_checksum}] -@*LPC flashes don't require the chip and bus width to be specified. Additional -parameters are the <@var{variant}>, which may be @var{lpc2000_v1} (older LPC21xx and LPC22xx) -or @var{lpc2000_v2} (LPC213x, LPC214x, LPC210[123], LPC23xx and LPC24xx), -the name or number of the target this flash belongs to (first is 0), -the frequency at which the core -is currently running (in kHz - must be an integral number), and the optional keyword -@var{calc_checksum}, telling the driver to calculate a valid checksum for the exception -vector table. +@deffn {Flash Driver} aduc702x +The ADUC702x analog microcontrollers from ST Micro +include internal flash and use ARM7TDMI cores. +The aduc702x flash driver works with models ADUC7019 through ADUC7028. +The setup command only requires the @var{target} argument +since all devices in this family have the same memory layout. +@example +flash bank aduc702x 0 0 0 0 $_TARGETNAME +@end example +@end deffn -@subsubsection at91sam7 options -@cindex at91sam7 options +@deffn {Flash Driver} at91sam7 +All members of the AT91SAM7 microcontroller family from Atmel +include internal flash and use ARM7TDMI cores. +The driver automatically recognizes a number of these chips using +the chip identification register, and autoconfigures itself. -@b{flash bank at91sam7} 0 0 0 0 <@var{target}> -@*AT91SAM7 flashes only require the @var{target}, all other values are looked up after -reading the chip-id and type. +@example +flash bank at91sam7 0 0 0 0 $_TARGETNAME +@end example -@subsubsection str7 options -@cindex str7 options +For chips which are not recognized by the controller driver, you must +provide additional parameters in the following order: -@b{flash bank str7x} <@var{base}> <@var{size}> 0 0 <@var{target}> <@var{variant}> -@*variant can be either STR71x, STR73x or STR75x. +@itemize +@item @var{chip_model} ... label used with @command{flash info} +@item @var{banks} +@item @var{sectors_per_bank} +@item @var{pages_per_sector} +@item @var{pages_size} +@item @var{num_nvm_bits} +@item @var{freq_khz} ... required if an external clock is provided, +optional (but recommended) when the oscillator frequency is known +@end itemize -@subsubsection str9 options -@cindex str9 options +It is recommended that you provide zeroes for all of those values +except the clock frequency, so that everything except that frequency +will be autoconfigured. +Knowing the frequency helps ensure correct timings for flash access. -@b{flash bank str9x} <@var{base}> <@var{size}> 0 0 <@var{target}> -@*The str9 needs the flash controller to be configured prior to Flash programming, e.g. +The flash controller handles erases automatically on a page (128/256 byte) +basis, so explicit erase commands are not necessary for flash programming. +However, there is an ``EraseAll`` command that can erase an entire flash +plane (of up to 256KB), and it will be used automatically when you issue +@command{flash erase_sector} or @command{flash erase_address} commands. + +@deffn Command {at91sam7 gpnvm} bitnum (set|clear) +Set or clear a ``General Purpose Non-Volatle Memory'' (GPNVM) +bit for the processor. Each processor has a number of such bits, +used for controlling features such as brownout detection (so they +are not truly general purpose). +@quotation Note +This assumes that the first flash bank (number 0) is associated with +the appropriate at91sam7 target. +@end quotation +@end deffn +@end deffn + +@deffn {Flash Driver} lpc2000 +Most members of the LPC2000 microcontroller family from NXP +include internal flash and use ARM7TDMI cores. +The @var{lpc2000} driver defines two mandatory and one optional parameters, +which must appear in the following order: + +@itemize +@item @var{variant} ... required, may be +@var{lpc2000_v1} (older LPC21xx and LPC22xx) +or @var{lpc2000_v2} (LPC213x, LPC214x, LPC210[123], LPC23xx and LPC24xx) +@item @var{clock_kHz} ... the frequency, in kiloHertz, +at which the core is running +@item @var{calc_checksum} ... optional (but you probably want to provide this!), +telling the driver to calculate a valid checksum for the exception vector table. +@end itemize + +LPC flashes don't require the chip and bus width to be specified. + @example -str9x flash_config 0 4 2 0 0x80000 +flash bank lpc2000 0x0 0x7d000 0 0 $_TARGETNAME \ + lpc2000_v2 14765 calc_checksum @end example -This will setup the BBSR, NBBSR, BBADR and NBBADR registers respectively. +@end deffn -@subsubsection str9 options (str9xpec driver) +@deffn {Flash Driver} stellaris +All members of the Stellaris LM3Sxxx microcontroller family from +Texas Instruments +include internal flash and use ARM Cortex M3 cores. +The driver automatically recognizes a number of these chips using +the chip identification register, and autoconfigures itself. +@footnote{Currently there is a @command{stellaris mass_erase} command. +That seems pointless since the same effect can be had using the +standard @command{flash erase_address} command.} -@b{flash bank str9xpec} <@var{base}> <@var{size}> 0 0 <@var{target}> -@*Before using the flash commands the turbo mode must be enabled using str9xpec -@option{enable_turbo} <@var{num>.} +@example +flash bank stellaris 0 0 0 0 $_TARGETNAME +@end example +@end deffn -Only use this driver for locking/unlocking the device or configuring the option bytes. -Use the standard str9 driver for programming. @xref{STR9 specific commands}. +@deffn {Flash Driver} stm32x +All members of the STM32 microcontroller family from ST Microelectronics +include internal flash and use ARM Cortex M3 cores. +The driver automatically recognizes a number of these chips using +the chip identification register, and autoconfigures itself. -@subsubsection Stellaris (LM3Sxxx) options -@cindex Stellaris (LM3Sxxx) options +@example +flash bank stm32x 0 0 0 0 $_TARGETNAME +@end example -@b{flash bank stellaris} <@var{base}> <@var{size}> 0 0 <@var{target}> -@*Stellaris flash plugin only require the @var{target}. +Some stm32x-specific commands +@footnote{Currently there is a @command{stm32x mass_erase} command. +That seems pointless since the same effect can be had using the +standard @command{flash erase_address} command.} +are defined: -@subsubsection stm32x options -@cindex stm32x options +@deffn Command {stm32x lock} num +Locks the entire stm32 device. +The @var{num} parameter is a value shown by @command{flash banks}. +@end deffn -@b{flash bank stm32x} <@var{base}> <@var{size}> 0 0 <@var{target}> -@*stm32x flash plugin only require the @var{target}. +@deffn Command {stm32x unlock} num +Unlocks the entire stm32 device. +The @var{num} parameter is a value shown by @command{flash banks}. +@end deffn -@subsubsection aduc702x options -@cindex aduc702x options +@deffn Command {stm32x options_read} num +Read and display the stm32 option bytes written by +the @command{stm32x options_write} command. +The @var{num} parameter is a value shown by @command{flash banks}. +@end deffn -@b{flash bank aduc702x} 0 0 0 0 <@var{target}> -@*The aduc702x flash plugin works with Analog Devices model numbers ADUC7019 through ADUC7028. The setup command only requires the @var{target} argument (all devices in this family have the same memory layout). +@deffn Command {stm32x options_write} num (SWWDG|HWWDG) (RSTSTNDBY|NORSTSTNDBY) (RSTSTOP|NORSTSTOP) +Writes the stm32 option byte with the specified values. +The @var{num} parameter is a value shown by @command{flash banks}. +@end deffn +@end deffn -@subsection mFlash Configuration -@cindex mFlash Configuration -@b{mflash bank} <@var{soc}> <@var{base}> <@var{RST pin}> <@var{target}> -@cindex mflash bank -@*Configures a mflash for <@var{soc}> host bank at -<@var{base}>. Pin number format is dependent on host GPIO calling convention. -Currently, mflash bank support s3c2440 and pxa270. +@deffn {Flash Driver} str7x +All members of the STR7 microcontroller family from ST Microelectronics +include internal flash and use ARM7TDMI cores. +The @var{str7x} driver defines one mandatory parameter, @var{variant}, +which is either @code{STR71x}, @code{STR73x} or @code{STR75x}. -(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1. @example -mflash bank s3c2440 0x10000000 1b 0 +flash bank str7x 0x40000000 0x00040000 0 0 $_TARGETNAME STR71x @end example -(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43. +@end deffn + +@deffn {Flash Driver} str9x +Most members of the STR9 microcontroller family from ST Microelectronics +include internal flash and use ARM966E cores. +The str9 needs the flash controller to be configured using +the @command{str9x flash_config} command prior to Flash programming. + @example -mflash bank pxa270 0x08000000 43 0 +flash bank str9x 0x40000000 0x00040000 0 0 $_TARGETNAME +str9x flash_config 0 4 2 0 0x80000 @end example -@section Microcontroller specific Flash Commands +@deffn Command {str9x flash_config} num bbsr nbbsr bbadr nbbadr +Configures the str9 flash controller. +The @var{num} parameter is a value shown by @command{flash banks}. -@subsection AT91SAM7 specific commands -@cindex AT91SAM7 specific commands -The flash configuration is deduced from the chip identification register. The flash -controller handles erases automatically on a page (128/265 byte) basis, so erase is -not necessary for flash programming. AT91SAM7 processors with less than 512K flash -only have a single flash bank embedded on chip. AT91SAM7xx512 have two flash planes -that can be erased separatly. Only an EraseAll command is supported by the controller -for each flash plane and this is called with @itemize @bullet -@item @b{flash erase} <@var{num}> @var{first_plane} @var{last_plane} -@*bulk erase flash planes first_plane to last_plane. -@item @b{at91sam7 gpnvm} <@var{num}> <@var{bit}> <@option{set}|@option{clear}> -@cindex at91sam7 gpnvm -@*set or clear a gpnvm bit for the processor +@item @var{bbsr} - Boot Bank Size register +@item @var{nbbsr} - Non Boot Bank Size register +@item @var{bbadr} - Boot Bank Start Address register +@item @var{nbbadr} - Boot Bank Start Address register @end itemize +@end deffn -@subsection STR9 specific commands -@cindex STR9 specific commands -@anchor{STR9 specific commands} -These are flash specific commands when using the str9xpec driver. -@itemize @bullet -@item @b{str9xpec enable_turbo} <@var{num}> -@cindex str9xpec enable_turbo -@*enable turbo mode, will simply remove the str9 from the chain and talk -directly to the embedded flash controller. -@item @b{str9xpec disable_turbo} <@var{num}> -@cindex str9xpec disable_turbo -@*restore the str9 into JTAG chain. -@item @b{str9xpec lock} <@var{num}> -@cindex str9xpec lock -@*lock str9 device. The str9 will only respond to an unlock command that will -erase the device. -@item @b{str9xpec unlock} <@var{num}> -@cindex str9xpec unlock -@*unlock str9 device. -@item @b{str9xpec options_read} <@var{num}> -@cindex str9xpec options_read -@*read str9 option bytes. -@item @b{str9xpec options_write} <@var{num}> -@cindex str9xpec options_write -@*write str9 option bytes. -@end itemize +@end deffn -Note: Before using the str9xpec driver here is some background info to help -you better understand how the drivers works. OpenOCD has two flash drivers for -the str9. +@subsection str9xpec driver +@cindex str9xpec + +Here is some background info to help +you better understand how this driver works. OpenOCD has two flash drivers for +the str9: @enumerate @item Standard driver @option{str9x} programmed via the str9 core. Normally used for @@ -2630,25 +2691,45 @@ has been locked. Halting the core is not required for the @option{str9xpec} driver as mentioned above, just issue the commands above manually or from a telnet prompt. -@subsection STR9 configuration -@cindex STR9 configuration +@subsubsection str9xpec driver options + +@b{flash bank str9xpec} <@var{base}> <@var{size}> 0 0 <@var{target}> +@*Before using the flash commands the turbo mode must be enabled using str9xpec +@option{enable_turbo} <@var{num>.} + +Only use this driver for locking/unlocking the device or configuring the option bytes. +Use the standard str9 driver for programming. + +@subsubsection str9xpec specific commands +@cindex str9xpec specific commands +These are flash specific commands when using the str9xpec driver. + @itemize @bullet -@item @b{str9x flash_config} <@var{bank}> <@var{BBSR}> <@var{NBBSR}> -<@var{BBADR}> <@var{NBBADR}> -@cindex str9x flash_config -@*Configure str9 flash controller. -@example -e.g. str9x flash_config 0 4 2 0 0x80000 -This will setup -BBSR - Boot Bank Size register -NBBSR - Non Boot Bank Size register -BBADR - Boot Bank Start Address register -NBBADR - Boot Bank Start Address register -@end example +@item @b{str9xpec enable_turbo} <@var{num}> +@cindex str9xpec enable_turbo +@*enable turbo mode, will simply remove the str9 from the chain and talk +directly to the embedded flash controller. +@item @b{str9xpec disable_turbo} <@var{num}> +@cindex str9xpec disable_turbo +@*restore the str9 into JTAG chain. +@item @b{str9xpec lock} <@var{num}> +@cindex str9xpec lock +@*lock str9 device. The str9 will only respond to an unlock command that will +erase the device. +@item @b{str9xpec unlock} <@var{num}> +@cindex str9xpec unlock +@*unlock str9 device. +@item @b{str9xpec options_read} <@var{num}> +@cindex str9xpec options_read +@*read str9 option bytes. +@item @b{str9xpec options_write} <@var{num}> +@cindex str9xpec options_write +@*write str9 option bytes. @end itemize -@subsection STR9 option byte configuration +@subsubsection STR9 option byte configuration @cindex STR9 option byte configuration + @itemize @bullet @item @b{str9xpec options_cmap} <@var{num}> <@option{bank0}|@option{bank1}> @cindex str9xpec options_cmap @@ -2664,37 +2745,57 @@ @*configure str9 lvd reset warning source. @end itemize -@subsection STM32x specific commands -@cindex STM32x specific commands - -These are flash specific commands when using the stm32x driver. -@itemize @bullet -@item @b{stm32x lock} <@var{num}> -@cindex stm32x lock -@*lock stm32 device. -@item @b{stm32x unlock} <@var{num}> -@cindex stm32x unlock -@*unlock stm32 device. -@item @b{stm32x options_read} <@var{num}> -@cindex stm32x options_read -@*read stm32 option bytes. -@item @b{stm32x options_write} <@var{num}> <@option{SWWDG}|@option{HWWDG}> -<@option{RSTSTNDBY}|@option{NORSTSTNDBY}> <@option{RSTSTOP}|@option{NORSTSTOP}> -@cindex stm32x options_write -@*write stm32 option bytes. -@item @b{stm32x mass_erase} <@var{num}> -@cindex stm32x mass_erase -@*mass erase flash memory. -@end itemize +@section mFlash -@subsection Stellaris specific commands -@cindex Stellaris specific commands - -These are flash specific commands when using the Stellaris driver. +@subsection mFlash Configuration +@cindex mFlash Configuration +@b{mflash bank} <@var{soc}> <@var{base}> <@var{RST pin}> <@var{target}> +@cindex mflash bank +@*Configures a mflash for <@var{soc}> host bank at +<@var{base}>. Pin number format is dependent on host GPIO calling convention. +Currently, mflash bank support s3c2440 and pxa270. + +(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1. + +@example +mflash bank s3c2440 0x10000000 1b 0 +@end example + +(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43. + +@example +mflash bank pxa270 0x08000000 43 0 +@end example + +@subsection mFlash commands +@cindex mFlash commands + @itemize @bullet -@item @b{stellaris mass_erase} <@var{num}> -@cindex stellaris mass_erase -@*mass erase flash memory. +@item @b{mflash probe} +@cindex mflash probe +@*Probe mflash. +@item @b{mflash write} <@var{num}> <@var{file}> <@var{offset}> +@cindex mflash write +@*Write the binary <@var{file}> to mflash bank <@var{num}>, starting at +<@var{offset}> bytes from the beginning of the bank. +@item @b{mflash dump} <@var{num}> <@var{file}> <@var{offset}> <@var{size}> +@cindex mflash dump +@*Dump <size> bytes, starting at <@var{offset}> bytes from the beginning of the <@var{num}> bank +to a <@var{file}>. +@item @b{mflash config pll} <@var{frequency}> +@cindex mflash config pll +@*Configure mflash pll. <@var{frequency}> is input frequency of mflash. The order is Hz. +Issuing this command will erase mflash's whole internal nand and write new pll. +After this command, mflash needs power-on-reset for normal operation. +If pll was newly configured, storage and boot(optional) info also need to be update. +@item @b{mflash config boot} +@cindex mflash config boot +@*Configure bootable option. If bootable option is set, mflash offer the first 8 sectors +(4kB) for boot. +@item @b{mflash config storage} +@cindex mflash config storage +@*Configure storage information. For the normal storage operation, this information must be +written. @end itemize @node NAND Flash Commands @@ -2782,7 +2883,7 @@ configuration files, not interactively. @itemize @bullet -@item @var{controller} ... identifies a the controller driver +@item @var{controller} ... identifies the controller driver associated with the NAND device being declared. @xref{NAND Driver List}. @item @var{target} ... names the target used when issuing @@ -2849,6 +2950,7 @@ @deffn Command {nand erase} num offset length @cindex NAND erasing +@cindex NAND programming Erases blocks on the specified NAND device, starting at the specified @var{offset} and continuing for @var{length} bytes. Both of those values must be exact multiples of the device's @@ -2864,6 +2966,7 @@ @deffn Command {nand write} num filename offset [option...] @cindex NAND writing +@cindex NAND programming Writes binary data from the file into the specified NAND device, starting at the specified offset. Those pages should already have been erased; you can't change zero bits to one bits. @@ -2963,7 +3066,7 @@ with the wrong ECC data can cause them to be marked as bad. @end deffn -@section NAND Drivers; Driver-specific Options and Commands +@section NAND Drivers, Options, and Commands @anchor{NAND Driver List} As noted above, the @command{nand device} command allows driver-specific options and behaviors. @@ -2989,7 +3092,7 @@ @deffn {NAND Driver} lpc3180 These controllers require an extra @command{nand device} parameter: the clock rate used by the controller. -@deffn Command {nand lpc3180 select} num [mlc|slc] +@deffn Command {lpc3180 select} num [mlc|slc] Configures use of the MLC or SLC controller mode. MLC implies use of hardware ECC. The @var{num} parameter is the value shown by @command{nand list}. @@ -3014,7 +3117,10 @@ change any behavior. @end deffn -@deffn {NAND Driver} {s3c2410, s3c2412, s3c2440, s3c2443} +@deffn {NAND Driver} s3c2410 +@deffnx {NAND Driver} s3c2412 +@deffnx {NAND Driver} s3c2440 +@deffnx {NAND Driver} s3c2443 These S3C24xx family controllers don't have any special @command{nand device} options, and don't define any specialized commands. @@ -3273,7 +3379,6 @@ @cindex Target Specific Commands -@page @section Architecture Specific Commands @cindex Architecture Specific Commands @@ -4503,8 +4608,8 @@ @printindex cp -@node OpenOCD Command Index -@unnumbered OpenOCD Command Index +@node Command and Driver Index +@unnumbered Command and Driver Index @printindex fn @bye |
|
From: <zw...@ma...> - 2009-05-28 02:49:00
|
Author: zwelch
Date: 2009-05-28 02:47:30 +0200 (Thu, 28 May 2009)
New Revision: 1936
Modified:
trunk/doc/openocd.texi
Log:
David Brownell <da...@pa...>:
Fix a bunch of PDF generation bugs in the texi:
* The "overfull" warnings are basically complaints about lines
that are too long, so they ran off the right margin of the
PDF documentation and turn into a "black blot".
* The "underfull" warnings are basically complaints about lines
that look ugly when they get filled, because the tokens are
so long that the line-break algorithm can't do anything good.
In a few cases the simplest fix seemed to be to use more appropriate
texi commands.
In other cases the fix was a content bugfix: "ocd_" not "openocd_";
and many of those "target variants" actually aren't recognized.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-27 23:54:16 UTC (rev 1935)
+++ trunk/doc/openocd.texi 2009-05-28 00:47:30 UTC (rev 1936)
@@ -261,7 +261,7 @@
@item @b{ftdi2232} libftdi (@uref{http://www.intra2net.com/opensource/ftdi/})
@item @b{ftd2xx} libftd2xx (@uref{http://www.ftdichip.com/Drivers/D2XX.htm})
@item When using the Amontec JTAGkey, you have to get the drivers from the Amontec
-homepage (@uref{http://www.amontec.com}), as the JTAGkey uses a non-standard VID/PID.
+homepage (@uref{http://www.amontec.com}). The JTAGkey uses a non-standard VID/PID.
@end itemize
libftdi is supported under Windows. Do not use versions earlier than 0.14.
@@ -320,9 +320,11 @@
@item
@option{--enable-ft2232_libftdi} - An open source (free) alternative to FTDICHIP.COM ftd2xx solution (Linux, MacOS, Cygwin).
@item
-@option{--with-ftd2xx-win32-zipdir=PATH} - If using FTDICHIP.COM ft2232c, point at the directory where the Win32 FTDICHIP.COM 'CDM' driver zip file was unpacked.
+@option{--with-ftd2xx-win32-zipdir=PATH} - If using FTDICHIP.COM ft2232c driver,
+give the directory where the Win32 FTDICHIP.COM 'CDM' driver zip file was unpacked.
@item
-@option{--with-ftd2xx-linux-tardir=PATH} - Linux only. Equivalent of @option{--with-ftd2xx-win32-zipdir}, where you unpacked the TAR.GZ file.
+@option{--with-ftd2xx-linux-tardir=PATH} - If using FTDICHIP.COM ft2232c driver
+on Linux, give the directory where the Linux driver's TAR.GZ file was unpacked.
@item
@option{--with-ftd2xx-lib=shared|static} - Linux only. Default: static. Specifies how the FTDICHIP.COM libftd2xx driver should be linked. Note: 'static' only works in conjunction with @option{--with-ftd2xx-linux-tardir}. The 'shared' value is supported (12/26/2008), however you must manually install the required header files and shared libraries in an appropriate place. This uses ``libusb'' internally.
@item
@@ -369,43 +371,54 @@
Below is an example build process:
-1) Check out the latest version of ``openocd'' from SVN.
+@enumerate
+@item Check out the latest version of ``openocd'' from SVN.
-2) Download & unpack either the Windows or Linux FTD2xx drivers
- (@uref{http://www.ftdichip.com/Drivers/D2XX.htm}).
+@item If you are using the FTDICHIP.COM driver, download
+and unpack the Windows or Linux FTD2xx drivers
+(@uref{http://www.ftdichip.com/Drivers/D2XX.htm}).
+If you are using the libftdi driver, install that package
+(e.g. @command{apt-get install libftdi} on systems with APT).
@example
- /home/duane/ftd2xx.win32 => the Cygwin/Win32 ZIP file contents.
- /home/duane/libftd2xx0.4.16 => the Linux TAR.GZ file contents.
+/home/duane/ftd2xx.win32 => the Cygwin/Win32 ZIP file contents
+/home/duane/libftd2xx0.4.16 => the Linux TAR.GZ file contents
@end example
-3) Configure with these options:
+@item Configure with options resembling the following.
+@enumerate a
+@item Cygwin FTDICHIP solution:
@example
-Cygwin FTDICHIP solution:
- ./configure --prefix=/home/duane/mytools \
- --enable-ft2232_ftd2xx \
- --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32
+./configure --prefix=/home/duane/mytools \
+ --enable-ft2232_ftd2xx \
+ --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32
+@end example
-Linux FTDICHIP solution:
- ./configure --prefix=/home/duane/mytools \
- --enable-ft2232_ftd2xx \
- --with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16
+@item Linux FTDICHIP solution:
+@example
+./configure --prefix=/home/duane/mytools \
+ --enable-ft2232_ftd2xx \
+ --with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16
+@end example
-Cygwin/Linux LIBFTDI solution:
- Assumes:
- 1a) For Windows: The Windows port of LIBUSB is in place.
- 1b) For Linux: libusb has been built/installed and is in place.
+@item Cygwin/Linux LIBFTDI solution ... assuming that
+@itemize
+@item For Windows -- that the Windows port of LIBUSB is in place.
+@item For Linux -- that libusb has been built/installed and is in place.
+@item That libftdi has been built and installed (relies on libusb).
+@end itemize
- 2) And libftdi has been built and installed
- Note: libftdi - relies upon libusb.
+Then configure the libftdi solution like this:
- ./configure --prefix=/home/duane/mytools \
- --enable-ft2232_libftdi
-
+@example
+./configure --prefix=/home/duane/mytools \
+ --enable-ft2232_libftdi
@end example
+@end enumerate
-4) Then just type ``make'', and perhaps ``make install''.
+@item Then just type ``make'', and perhaps ``make install''.
+@end enumerate
@section Miscellaneous Configure Options
@@ -467,10 +480,11 @@
There are many USB JTAG dongles on the market, many of them are based
on a chip from ``Future Technology Devices International'' (FTDI)
-known as the FTDI FT2232.
+known as the FTDI FT2232; this is a USB full speed (12 Mbps) chip.
+See: @url{http://www.ftdichip.com} for more information.
+In summer 2009, USB high speed (480 Mbps) versions of these FTDI
+chips are starting to become available in JTAG adapters.
-See: @url{http://www.ftdichip.com} or @url{http://www.ftdichip.com/Products/FT2232H.htm}
-
As of 28/Nov/2008, the following are supported:
@itemize @bullet
@@ -489,7 +503,9 @@
@item @b{flyswatter}
@* See: @url{http://www.tincantools.com}
@item @b{turtelizer2}
-@* See: @url{http://www.ethernut.de}, or @url{http://www.ethernut.de/en/hardware/turtelizer/index.html}
+@* See:
+@uref{http://www.ethernut.de/en/hardware/turtelizer/index.html, Turtelizer 2}, or
+@url{http://www.ethernut.de}
@item @b{comstick}
@* Link: @url{http://www.hitex.com/index.php?id=383}
@item @b{stm32stick}
@@ -563,7 +579,8 @@
@* Link: @url{http://www.gateworks.com/products/avila_accessories/gw16042.php}
@item @b{Wiggler2}
-@* Link: @url{http://www.ccac.rwth-aachen.de/~michaels/index.php/hardware/armjtag}
+@*@uref{http://www.ccac.rwth-aachen.de/@/~michaels/@/index.php/hardware/@/armjtag,
+Improved parallel-port wiggler-style JTAG adapter}
@item @b{Wiggler_ntrst_inverted}
@* Yet another variation - See the source code, src/jtag/parport.c
@@ -581,12 +598,13 @@
@* Unknown.
@item @b{Lattice}
-@* ispDownload from Lattice Semiconductor @url{http://www.latticesemi.com/lit/docs/devtools/dlcable.pdf}
+@* ispDownload from Lattice Semiconductor
+@url{http://www.latticesemi.com/lit/docs/@/devtools/dlcable.pdf}
@item @b{flashlink}
-@* From ST Microsystems, link:
-@url{http://www.st.com/stonline/products/literature/um/7889.pdf}
-Title: FlashLINK JTAG programing cable for PSD and uPSD
+@* From ST Microsystems;
+@uref{http://www.st.com/stonline/@/products/literature/um/7889.pdf,
+FlashLINK JTAG programing cable for PSD and uPSD}
@end itemize
@@ -717,7 +735,7 @@
OpenOCD will read each filename in sequence, for example:
@example
- openocd -f file1.cfg -f file2.cfg -f file2.cfg
+openocd -f file1.cfg -f file2.cfg -f file2.cfg
@end example
You can also intermix various commands with the ``-c'' command line
@@ -806,11 +824,6 @@
today, that said, perhaps some interfaces have only been used by the
sole developer who created it.
-@b{FIXME/NOTE:} We need to add support for a variable like Tcl variable
-tcl_platform(platform), it should be called jim_platform (because it
-is jim, not real tcl) and it should contain 1 of 3 words: ``linux'',
-``cygwin'' or ``mingw''
-
Interface files should be found in @t{$(INSTALLDIR)/lib/openocd/interface}
@section Board Config Files
@@ -881,8 +894,10 @@
problems in OpenOCD configurations.
@example
-Info: JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
-Error: ERROR: Tap: sam7x256.cpu - Expected id: 0x12345678, Got: 0x3f0f0f0f
+Info: JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f
+ (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
+Error: ERROR: Tap: sam7x256.cpu - Expected id: 0x12345678,
+ Got: 0x3f0f0f0f
Error: ERROR: expected: mfg: 0x33c, part: 0x2345, ver: 0x1
Error: ERROR: got: mfg: 0x787, part: 0xf0f0, ver: 0x3
@end example
@@ -989,7 +1004,8 @@
@example
# for an ARM7TDMI.
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
-jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
+ -expected-id $_CPUTAPID
@end example
@b{COMPLEX example:}
@@ -1007,14 +1023,16 @@
@} else @{
set _FLASHTAPID 0x25966041
@}
-jtag newtap $_CHIPNAME flash -irlen 8 -ircapture 0x1 -irmask 0x1 -expected-id $_FLASHTAPID
+jtag newtap $_CHIPNAME flash -irlen 8 -ircapture 0x1 -irmask 0x1 \
+ -expected-id $_FLASHTAPID
if @{ [info exists CPUTAPID ] @} @{
set _CPUTAPID $CPUTAPID
@} else @{
set _CPUTAPID 0x25966041
@}
-jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0xf -irmask 0xe -expected-id $_CPUTAPID
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0xf -irmask 0xe \
+ -expected-id $_CPUTAPID
if @{ [info exists BSTAPID ] @} @{
@@ -1022,7 +1040,8 @@
@} else @{
set _BSTAPID 0x1457f041
@}
-jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID
+jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 \
+ -expected-id $_BSTAPID
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
@end example
@@ -1145,7 +1164,6 @@
@* See: @xref{Tcl Crash Course}.
@end itemize
-
@node Daemon Configuration
@chapter Daemon Configuration
@cindex initialization
@@ -2087,7 +2105,10 @@
reset halt
@}
mychip.cpu configure -event gdb-attach my_attach_proc
- mychip.cpu configure -event gdb-attach @{ puts "Reset..." ; reset halt @}
+ mychip.cpu configure -event gdb-attach @{
+ puts "Reset..."
+ reset halt
+ @}
@end example
@section Current Events
@@ -2256,27 +2277,16 @@
@section Target Variants
@itemize @bullet
-@item @b{arm7tdmi}
-@* Unknown (please write me)
-@item @b{arm720t}
-@* Unknown (please write me) (similar to arm7tdmi)
-@item @b{arm9tdmi}
-@* Variants: @option{arm920t}, @option{arm922t} and @option{arm940t}
-This enables the hardware single-stepping support found on these
-cores.
-@item @b{arm920t}
-@* None.
-@item @b{arm966e}
-@* None (this is also used as the ARM946)
@item @b{cortex_m3}
-@* use variant <@var{-variant lm3s}> when debugging Luminary lm3s targets. This will cause
-OpenOCD to use a software reset rather than asserting SRST to avoid a issue with clearing
-the debug registers. This is fixed in Fury Rev B, DustDevil Rev B, Tempest, these revisions will
+@* Use variant @option{lm3s} when debugging older Stellaris LM3S targets.
+This will cause OpenOCD to use a software reset rather than asserting
+SRST, to avoid a issue with clearing the debug registers.
+This is fixed in Fury Rev B, DustDevil Rev B, Tempest; these revisions will
be detected and the normal reset behaviour used.
@item @b{xscale}
-@* Supported variants are @option{ixp42x}, @option{ixp45x}, @option{ixp46x},@option{pxa250}, @option{pxa255}, @option{pxa26x}.
-@item @b{arm11}
-@* Supported variants are @option{arm1136}, @option{arm1156}, @option{arm1176}
+@*Supported variants are
+@option{ixp42x}, @option{ixp45x}, @option{ixp46x},
+@option{pxa250}, @option{pxa255}, @option{pxa26x}.
@item @b{mips_m4k}
@* Use variant @option{ejtag_srst} when debugging targets that do not
provide a functional SRST line on the EJTAG connector. This causes
@@ -3536,8 +3546,13 @@
The way this works on the ZY1000 is to prefix a filename by
"/tftp/ip/" and append the TFTP path on the TFTP
-server (tftpd). E.g. "load_image /tftp/10.0.0.96/c:\temp\abc.elf" will
-load c:\temp\abc.elf from the developer pc (10.0.0.96) into memory as
+server (tftpd). For example,
+
+@example
+load_image /tftp/10.0.0.96/c:\temp\abc.elf
+@end example
+
+will load c:\temp\abc.elf from the developer pc (10.0.0.96) into memory as
if the file was hosted on the embedded host.
In order to achieve decent performance, you must choose a TFTP server
@@ -3567,7 +3582,8 @@
To start OpenOCD with a target script for the AT91R40008 CPU and reset
the CPU upon startup of the OpenOCD daemon.
@example
-openocd -f interface/parport.cfg -f target/at91r40008.cfg -c init -c reset
+openocd -f interface/parport.cfg -f target/at91r40008.cfg \
+ -c "init" -c "reset"
@end example
@@ -3585,7 +3601,8 @@
errors, which has since been fixed: look up 1836 in
@url{http://sourceware.org/cgi-bin/gnatsweb.pl?database=gdb}
-@*OpenOCD can communicate with GDB in two ways:
+OpenOCD can communicate with GDB in two ways:
+
@enumerate
@item
A socket (TCP/IP) connection is typically started as follows:
@@ -3603,7 +3620,7 @@
session.
@end enumerate
-@*To see a list of available OpenOCD commands type @option{monitor help} on the
+To list the available OpenOCD commands type @command{monitor help} on the
GDB command line.
OpenOCD supports the gdb @option{qSupported} packet, this enables information
@@ -3707,8 +3724,9 @@
By low-level, the intent is a human would not directly use these commands.
-Low-level commands are (should be) prefixed with "openocd_", e.g. openocd_flash_banks
-is the low level API upon which "flash banks" is implemented.
+Low-level commands are (should be) prefixed with "ocd_", e.g.
+@command{ocd_flash_banks}
+is the low level API upon which @command{flash banks} is implemented.
@itemize @bullet
@item @b{ocd_mem2array} <@var{varname}> <@var{width}> <@var{addr}> <@var{nelems}>
@@ -3745,6 +3763,13 @@
Note: 'winxx' was choosen because today (March-2009) no distinction is made between Win32 and Win64.
+@quotation Note
+We should add support for a variable like Tcl variable
+@code{tcl_platform(platform)}, it should be called
+@code{jim_platform} (because it
+is jim, not real tcl).
+@end quotation
+
@node Upgrading
@chapter Deprecated/Removed Commands
@cindex Deprecated/Removed Commands
@@ -3753,7 +3778,8 @@
@itemize @bullet
@item @b{arm7_9 fast_writes}
@cindex arm7_9 fast_writes
-@*use @option{arm7_9 fast_memory_access} command with same args. @xref{arm7_9 fast_memory_access}.
+@*Use @command{arm7_9 fast_memory_access} instead.
+@xref{arm7_9 fast_memory_access}.
@item @b{arm7_9 force_hw_bkpts}
@cindex arm7_9 force_hw_bkpts
@*Use @command{gdb_breakpoint_override} instead. Note that GDB will use hardware breakpoints
@@ -4451,7 +4477,8 @@
is set to 10kHz for reset and 8MHz for post reset.
@example
-openocd -f interface/parport.cfg -f target/str710.cfg -c "init" -c "reset"
+openocd -f interface/parport.cfg -f target/str710.cfg \
+ -c "init" -c "reset"
@end example
To list the target scripts available:
|
|
From: <zw...@ma...> - 2009-05-28 01:54:19
|
Author: zwelch Date: 2009-05-28 01:54:16 +0200 (Thu, 28 May 2009) New Revision: 1935 Modified: trunk/src/flash/mflash.c Log: Fix potentialyl unaligned memory accesses in mflash driver. Modified: trunk/src/flash/mflash.c =================================================================== --- trunk/src/flash/mflash.c 2009-05-27 21:03:51 UTC (rev 1934) +++ trunk/src/flash/mflash.c 2009-05-27 23:54:16 UTC (rev 1935) @@ -1126,8 +1126,9 @@ u8 buff[512]; memset(buff, 0xff, 512); - *((u32 *)&buff[0]) = pll->lock_cyc; /* PLL Lock cycle */ - *((u16 *)&buff[4]) = pll->feedback_div; /* PLL Feedback 9bit Divider */ + /* PLL Lock cycle and Feedback 9bit Divider */ + memcpy(buff, &pll->lock_cyc, sizeof(u32)); + memcpy(buff + 4, &pll->feedback_div, sizeof(u16)); buff[6] = pll->input_div; /* PLL Input 5bit Divider */ buff[7] = pll->output_div; /* PLL Output Divider */ |
|
From: kc8apf at B. <kc...@ma...> - 2009-05-27 23:03:56
|
Author: kc8apf
Date: 2009-05-27 23:03:51 +0200 (Wed, 27 May 2009)
New Revision: 1934
Modified:
trunk/src/target/embeddedice.c
Log:
Author: Nicolas Pitre <ni...@ca...>
- cut out the "unknown EmbeddedICE version" message with Feroceon
Modified: trunk/src/target/embeddedice.c
===================================================================
--- trunk/src/target/embeddedice.c 2009-05-27 20:30:17 UTC (rev 1933)
+++ trunk/src/target/embeddedice.c 2009-05-27 21:03:51 UTC (rev 1934)
@@ -179,6 +179,13 @@
arm7_9->has_monitor_mode = 1;
break;
default:
+ /*
+ * The Feroceon implementation has the version number
+ * in some unusual bits. Let feroceon.c validate it
+ * and do the appropriate setup itself.
+ */
+ if (strcmp(target->type->name, "feroceon") == 0)
+ break;
LOG_ERROR("unknown EmbeddedICE version (comms ctrl: 0x%8.8x)", buf_get_u32(reg_list[EICE_COMMS_CTRL].value, 0, 32));
}
|
|
From: kc8apf at B. <kc...@ma...> - 2009-05-27 22:30:21
|
Author: kc8apf
Date: 2009-05-27 22:30:17 +0200 (Wed, 27 May 2009)
New Revision: 1933
Modified:
trunk/src/helper/log.c
trunk/src/server/gdb_server.c
Log:
Author: Nicolas Pitre <ni...@ca...>
- Silence errors about keep_alive() not being called frequently enough unless
a gdb session is active or debugging is enabled
Modified: trunk/src/helper/log.c
===================================================================
--- trunk/src/helper/log.c 2009-05-27 15:15:06 UTC (rev 1932)
+++ trunk/src/helper/log.c 2009-05-27 20:30:17 UTC (rev 1933)
@@ -385,7 +385,19 @@
current_time=timeval_ms();
if (current_time-last_time>1000)
{
- LOG_WARNING("keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (%lld). Workaround: increase \"set remotetimeout\" in GDB", current_time-last_time);
+ extern int gdb_actual_connections;
+
+ if (gdb_actual_connections)
+ LOG_WARNING("keep_alive() was not invoked in the "
+ "1000ms timelimit. GDB alive packet not "
+ "sent! (%lld). Workaround: increase "
+ "\"set remotetimeout\" in GDB",
+ current_time-last_time);
+ else
+ LOG_DEBUG("keep_alive() was not invoked in the "
+ "1000ms timelimit (%lld). This may cause "
+ "trouble with GDB connections.",
+ current_time-last_time);
}
if (current_time-last_time>500)
{
Modified: trunk/src/server/gdb_server.c
===================================================================
--- trunk/src/server/gdb_server.c 2009-05-27 15:15:06 UTC (rev 1932)
+++ trunk/src/server/gdb_server.c 2009-05-27 20:30:17 UTC (rev 1933)
@@ -61,6 +61,10 @@
/* target behaviour on gdb detach */
enum gdb_detach_mode detach_mode = GDB_DETACH_RESUME;
+/* number of gdb connections, mainly to supress gdb related debugging spam
+ * in helper/log.c when no gdb connections are actually active */
+int gdb_actual_connections;
+
/* set if we are sending a memory map to gdb
* via qXfer:memory-map:read packet */
/* enabled by default*/
@@ -797,6 +801,9 @@
if (initial_ack != '+')
gdb_putback_char(connection, initial_ack);
target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_ATTACH );
+
+ gdb_actual_connections++;
+
return ERROR_OK;
}
@@ -805,6 +812,8 @@
gdb_service_t *gdb_service = connection->service->priv;
gdb_connection_t *gdb_connection = connection->priv;
+ gdb_actual_connections--;
+
/* see if an image built with vFlash commands is left */
if (gdb_connection->vflash_image)
{
|
|
From: <zw...@ma...> - 2009-05-27 17:15:17
|
Author: zwelch Date: 2009-05-27 17:15:06 +0200 (Wed, 27 May 2009) New Revision: 1932 Modified: trunk/doc/manual/main.txt trunk/doc/manual/primer/tcl.txt trunk/doc/manual/scripting.txt trunk/doc/manual/style.txt Log: Numerous minor updates and fixes for The Manual: - Link Scripting Overview into the TCL Primer; both need more work. - Remove redundant OpenOCD from Scripting Overview subpage title. - Fix incorrect tag in Doxygen style guide example. - Fix minor typo in first introductory paragraph of main page. Modified: trunk/doc/manual/main.txt =================================================================== --- trunk/doc/manual/main.txt 2009-05-27 12:34:02 UTC (rev 1931) +++ trunk/doc/manual/main.txt 2009-05-27 15:15:06 UTC (rev 1932) @@ -4,7 +4,7 @@ learning about the internal architecture of the OpenOCD project. In addition, this document contains the tactical and strategic plans -and processes that have been devleoped by and for the community. +and processes that have been developed by and for the OpenOCD community. Developers that want to contribute to OpenOCD should read the following sections before starting work: Modified: trunk/doc/manual/primer/tcl.txt =================================================================== --- trunk/doc/manual/primer/tcl.txt 2009-05-27 12:34:02 UTC (rev 1931) +++ trunk/doc/manual/primer/tcl.txt 2009-05-27 15:15:06 UTC (rev 1932) @@ -1,5 +1,7 @@ /** @page primertcl OpenOCD TCL Primer +The @subpage scripting page provides additional TCL Primer material. + @verbatim **************************************** Modified: trunk/doc/manual/scripting.txt =================================================================== --- trunk/doc/manual/scripting.txt 2009-05-27 12:34:02 UTC (rev 1931) +++ trunk/doc/manual/scripting.txt 2009-05-27 15:15:06 UTC (rev 1932) @@ -1,4 +1,4 @@ -/** @page scripting OpenOCD Scripting Overview +/** @page scripting Scripting Overview @section scriptingisnt What scripting will not do Modified: trunk/doc/manual/style.txt =================================================================== --- trunk/doc/manual/style.txt 2009-05-27 12:34:02 UTC (rev 1931) +++ trunk/doc/manual/style.txt 2009-05-27 15:15:06 UTC (rev 1932) @@ -202,7 +202,7 @@ */ /** @file -This file contains the @page page. +This file contains the @ref pagename page. */ @endverbatim |
|
From: <zw...@ma...> - 2009-05-27 14:34:07
|
Author: zwelch
Date: 2009-05-27 14:34:02 +0200 (Wed, 27 May 2009)
New Revision: 1931
Modified:
trunk/src/flash/mflash.c
trunk/src/flash/mflash.h
Log:
unsik Kim <don...@gm...>:
Add large bank write/dump support in mflash driver.
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-05-27 12:30:42 UTC (rev 1930)
+++ trunk/src/flash/mflash.c 2009-05-27 12:34:02 UTC (rev 1931)
@@ -670,13 +670,11 @@
static int mg_write_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- u32 address, buf_cnt;
+ u32 address, buf_cnt, cnt, res, i;
u8 *buffer;
- /* TODO : multi-bank support, large file support */
fileio_t fileio;
duration_t duration;
char *duration_text;
- int ret;
if (argc != 3) {
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -688,18 +686,32 @@
return ERROR_FAIL;
}
- buffer = malloc(fileio.size);
-
- if (fileio_read(&fileio, fileio.size, buffer, &buf_cnt) != ERROR_OK)
- {
- free(buffer);
+ buffer = malloc(MG_FILEIO_CHUNK);
+ if (!buffer) {
fileio_close(&fileio);
return ERROR_FAIL;
}
+ cnt = fileio.size / MG_FILEIO_CHUNK;
+ res = fileio.size % MG_FILEIO_CHUNK;
+
duration_start_measure(&duration);
- ret = mg_mflash_write(address, buffer, (u32)fileio.size);
+ for (i = 0; i < cnt; i++) {
+ if (fileio_read(&fileio, MG_FILEIO_CHUNK, buffer, &buf_cnt) !=
+ ERROR_OK)
+ goto mg_write_cmd_err;
+ if (mg_mflash_write(address, buffer, MG_FILEIO_CHUNK) != ERROR_OK)
+ goto mg_write_cmd_err;
+ address += MG_FILEIO_CHUNK;
+ }
+
+ if (res) {
+ if (fileio_read(&fileio, res, buffer, &buf_cnt) != ERROR_OK)
+ goto mg_write_cmd_err;
+ if (mg_mflash_write(address, buffer, res) != ERROR_OK)
+ goto mg_write_cmd_err;
+ }
duration_stop_measure(&duration, &duration_text);
@@ -708,19 +720,24 @@
(float)fileio.size / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
free(duration_text);
+ free(buffer);
+ fileio_close(&fileio);
+ return ERROR_OK;
+
+mg_write_cmd_err:
+ duration_stop_measure(&duration, &duration_text);
+ free(duration_text);
+ free(buffer);
fileio_close(&fileio);
- free(buffer);
-
- return ERROR_OK;
+ return ERROR_FAIL;
}
static int mg_dump_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- u32 address, size_written, size;
+ u32 address, size_written, size, cnt, res, i;
u8 *buffer;
- /* TODO : multi-bank support */
fileio_t fileio;
duration_t duration;
char *duration_text;
@@ -735,31 +752,55 @@
if (fileio_open(&fileio, args[1], FILEIO_WRITE, FILEIO_BINARY) != ERROR_OK) {
return ERROR_FAIL;
}
+
+ buffer = malloc(MG_FILEIO_CHUNK);
+ if (!buffer) {
+ fileio_close(&fileio);
+ return ERROR_FAIL;
+ }
- buffer = malloc(size);
-
+ cnt = size / MG_FILEIO_CHUNK;
+ res = size % MG_FILEIO_CHUNK;
+
duration_start_measure(&duration);
- mg_mflash_read(address, buffer, size);
+ for (i = 0; i < cnt; i++) {
+ if (mg_mflash_read(address, buffer, MG_FILEIO_CHUNK) != ERROR_OK)
+ goto mg_dump_cmd_err;
+ if (fileio_write(&fileio, MG_FILEIO_CHUNK, buffer, &size_written)
+ != ERROR_OK)
+ goto mg_dump_cmd_err;
+ address += MG_FILEIO_CHUNK;
+ }
+
+ if (res) {
+ if (mg_mflash_read(address, buffer, res) != ERROR_OK)
+ goto mg_dump_cmd_err;
+ if (fileio_write(&fileio, res, buffer, &size_written) != ERROR_OK)
+ goto mg_dump_cmd_err;
+ }
duration_stop_measure(&duration, &duration_text);
- fileio_write(&fileio, size, buffer, &size_written);
-
command_print(cmd_ctx, "dump image (address 0x%8.8x size %u) to file %s in %s (%f kB/s)",
address, size, args[1], duration_text,
(float)size / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
free(duration_text);
-
+ free(buffer);
fileio_close(&fileio);
- free(buffer);
+ return ERROR_OK;
- return ERROR_OK;
+mg_dump_cmd_err:
+ duration_stop_measure(&duration, &duration_text);
+ free(duration_text);
+ free(buffer);
+ fileio_close(&fileio);
+
+ return ERROR_FAIL;
}
-
static int mg_set_feature(mg_feature_id feature, mg_feature_val config)
{
target_t *target = mflash_bank->target;
Modified: trunk/src/flash/mflash.h
===================================================================
--- trunk/src/flash/mflash.h 2009-05-27 12:30:42 UTC (rev 1930)
+++ trunk/src/flash/mflash.h 2009-05-27 12:34:02 UTC (rev 1931)
@@ -176,6 +176,8 @@
#define MG_UNLOCK_OTP_AREA 0xFF
+#define MG_FILEIO_CHUNK 1048576
+
typedef enum _mg_io_type_wait{
mg_io_wait_bsy = 1,
|
|
From: <zw...@ma...> - 2009-05-27 14:30:48
|
Author: zwelch
Date: 2009-05-27 14:30:42 +0200 (Wed, 27 May 2009)
New Revision: 1930
Modified:
trunk/doc/openocd.texi
trunk/src/flash/mflash.c
trunk/src/flash/mflash.h
Log:
unsik Kim <don...@gm...>:
Add mflash configuration code, updating relevant documentation.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-27 12:21:28 UTC (rev 1929)
+++ trunk/doc/openocd.texi 2009-05-27 12:30:42 UTC (rev 1930)
@@ -2393,15 +2393,29 @@
@itemize @bullet
@item @b{mflash probe}
@cindex mflash probe
-Probe mflash.
+@*Probe mflash.
@item @b{mflash write} <@var{num}> <@var{file}> <@var{offset}>
@cindex mflash write
-Write the binary <@var{file}> to mflash bank <@var{num}>, starting at
+@*Write the binary <@var{file}> to mflash bank <@var{num}>, starting at
<@var{offset}> bytes from the beginning of the bank.
@item @b{mflash dump} <@var{num}> <@var{file}> <@var{offset}> <@var{size}>
@cindex mflash dump
-Dump <size> bytes, starting at <@var{offset}> bytes from the beginning of the <@var{num}> bank
+@*Dump <size> bytes, starting at <@var{offset}> bytes from the beginning of the <@var{num}> bank
to a <@var{file}>.
+@item @b{mflash config pll} <@var{frequency}>
+@cindex mflash config pll
+@*Configure mflash pll. <@var{frequency}> is input frequency of mflash. The order is Hz.
+Issuing this command will erase mflash's whole internal nand and write new pll.
+After this command, mflash needs power-on-reset for normal operation.
+If pll was newly configured, storage and boot(optional) info also need to be update.
+@item @b{mflash config boot}
+@cindex mflash config boot
+@*Configure bootable option. If bootable option is set, mflash offer the first 8 sectors
+(4kB) for boot.
+@item @b{mflash config storage}
+@cindex mflash config storage
+@*Configure storage information. For the normal storage operation, this information must be
+written.
@end itemize
@section flash bank command
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-05-27 12:21:28 UTC (rev 1929)
+++ trunk/src/flash/mflash.c 2009-05-27 12:30:42 UTC (rev 1930)
@@ -356,12 +356,10 @@
return ERROR_OK;
}
-static int mg_mflash_probe(void)
+static int mg_mflash_rst(void)
{
mg_init_gpio();
- LOG_INFO("reset mflash");
-
mg_hdrst(0);
if (mg_dsk_wait(mg_io_wait_bsy, MG_OEM_DISK_WAIT_TIME_LONG) != ERROR_OK)
@@ -382,6 +380,16 @@
if (mg_dsk_wait(mg_io_wait_not_bsy, MG_OEM_DISK_WAIT_TIME_LONG) != ERROR_OK)
return ERROR_FAIL;
+ LOG_INFO("mflash: reset ok");
+
+ return ERROR_OK;
+}
+
+static int mg_mflash_probe(void)
+{
+ if (mg_mflash_rst() != ERROR_OK)
+ return ERROR_FAIL;
+
if (mg_dsk_drv_info() != ERROR_OK)
return ERROR_FAIL;
@@ -465,7 +473,8 @@
return ERROR_OK;
}
-static int mg_mflash_do_write_sects(void *buff, u32 sect_num, u32 sect_cnt)
+static int mg_mflash_do_write_sects(void *buff, u32 sect_num, u32 sect_cnt,
+ mg_io_type_cmd cmd)
{
u32 i, address;
int ret;
@@ -473,10 +482,8 @@
u8 *buff_ptr = buff;
duration_t duration;
- if ( mg_dsk_io_cmd(sect_num, sect_cnt, mg_io_cmd_write) != ERROR_OK ) {
- LOG_ERROR("mg_io_cmd_write fail");
+ if ( mg_dsk_io_cmd(sect_num, sect_cnt, cmd) != ERROR_OK )
return ERROR_FAIL;
- }
address = mflash_bank->base + MG_BUFFER_OFFSET;
@@ -506,7 +513,10 @@
}
}
- ret = mg_dsk_wait(mg_io_wait_rdy, MG_OEM_DISK_WAIT_TIME_NORMAL);
+ if (cmd == mg_io_cmd_write)
+ ret = mg_dsk_wait(mg_io_wait_rdy, MG_OEM_DISK_WAIT_TIME_NORMAL);
+ else
+ ret = mg_dsk_wait(mg_io_wait_rdy, MG_OEM_DISK_WAIT_TIME_LONG);
return ret;
}
@@ -522,7 +532,7 @@
for (i = 0; i < quotient; i++) {
LOG_DEBUG("sect num : %u buff : %0lx", sect_num,
(unsigned long)buff_ptr);
- mg_mflash_do_write_sects(buff_ptr, sect_num, 256);
+ mg_mflash_do_write_sects(buff_ptr, sect_num, 256, mg_io_cmd_write);
sect_num += 256;
buff_ptr += 256 * MG_MFLASH_SECTOR_SIZE;
}
@@ -530,7 +540,7 @@
if (residue) {
LOG_DEBUG("sect num : %u buff : %0lx", sect_num,
(unsigned long)buff_ptr);
- mg_mflash_do_write_sects(buff_ptr, sect_num, residue);
+ mg_mflash_do_write_sects(buff_ptr, sect_num, residue, mg_io_cmd_write);
}
return ERROR_OK;
@@ -749,6 +759,433 @@
return ERROR_OK;
}
+
+static int mg_set_feature(mg_feature_id feature, mg_feature_val config)
+{
+ target_t *target = mflash_bank->target;
+ u32 mg_task_reg = mflash_bank->base + MG_REG_OFFSET;
+
+ if (mg_dsk_wait(mg_io_wait_rdy_noerr, MG_OEM_DISK_WAIT_TIME_NORMAL)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ target_write_u8(target, mg_task_reg + MG_REG_FEATURE, feature);
+ target_write_u8(target, mg_task_reg + MG_REG_SECT_CNT, config);
+ target_write_u8(target, mg_task_reg + MG_REG_COMMAND,
+ mg_io_cmd_set_feature);
+
+ return ERROR_OK;
+}
+
+static int mg_is_valid_pll(double XIN, int N, double CLK_OUT, int NO)
+{
+ double v1 = XIN / N;
+ double v2 = CLK_OUT * NO;
+
+ if (v1 <1000000 || v1 > 15000000 || v2 < 100000000 || v2 > 500000000)
+ return ERROR_FAIL;
+
+ return ERROR_OK;
+}
+
+static int mg_pll_get_M(unsigned short feedback_div)
+{
+ int i, M;
+
+ for (i = 1, M=0; i < 512; i <<= 1, feedback_div >>= 1)
+ M += (feedback_div & 1) * i;
+
+ return M + 2;
+}
+
+static int mg_pll_get_N(unsigned char input_div)
+{
+ int i, N;
+
+ for (i = 1, N = 0; i < 32; i <<= 1, input_div >>= 1)
+ N += (input_div & 1) * i;
+
+ return N + 2;
+}
+
+static int mg_pll_get_NO(unsigned char output_div)
+{
+ int i, NO;
+
+ for (i = 0, NO = 1; i < 2; ++i, output_div >>= 1)
+ if(output_div & 1)
+ NO = NO << 1;
+
+ return NO;
+}
+
+static double mg_do_calc_pll(double XIN, mg_pll_t * p_pll_val, int is_approximate)
+{
+ unsigned short i;
+ unsigned char j, k;
+ int M, N, NO;
+ double CLK_OUT;
+ double DIV = 1;
+ double ROUND = 0;
+
+ if (is_approximate) {
+ DIV = 1000000;
+ ROUND = 500000;
+ }
+
+ for (i = 0; i < MG_PLL_MAX_FEEDBACKDIV_VAL ; ++i) {
+ M = mg_pll_get_M(i);
+
+ for (j = 0; j < MG_PLL_MAX_INPUTDIV_VAL ; ++j) {
+ N = mg_pll_get_N(j);
+
+ for (k = 0; k < MG_PLL_MAX_OUTPUTDIV_VAL ; ++k) {
+ NO = mg_pll_get_NO(k);
+
+ CLK_OUT = XIN * ((double)M / N) / NO;
+
+ if ((int)((CLK_OUT+ROUND) / DIV)
+ == (int)(MG_PLL_CLK_OUT / DIV)) {
+ if (mg_is_valid_pll(XIN, N, CLK_OUT, NO) == ERROR_OK)
+ {
+ p_pll_val->lock_cyc = (int)(XIN * MG_PLL_STD_LOCKCYCLE / MG_PLL_STD_INPUTCLK);
+ p_pll_val->feedback_div = i;
+ p_pll_val->input_div = j;
+ p_pll_val->output_div = k;
+
+ return CLK_OUT;
+ }
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+static double mg_calc_pll(double XIN, mg_pll_t *p_pll_val)
+{
+ double CLK_OUT;
+
+ CLK_OUT = mg_do_calc_pll(XIN, p_pll_val, 0);
+
+ if (!CLK_OUT)
+ return mg_do_calc_pll(XIN, p_pll_val, 1);
+ else
+ return CLK_OUT;
+}
+
+static int mg_verify_interface(void)
+{
+ u16 buff[MG_MFLASH_SECTOR_SIZE >> 1];
+ u16 i, j;
+ u32 address = mflash_bank->base + MG_BUFFER_OFFSET;
+ target_t *target = mflash_bank->target;
+
+ for (j = 0; j < 10; j++) {
+ for (i = 0; i < MG_MFLASH_SECTOR_SIZE >> 1; i++)
+ buff[i] = i;
+
+ target->type->write_memory(target, address, 2,
+ MG_MFLASH_SECTOR_SIZE / 2, (u8 *)buff);
+
+ memset(buff, 0xff, MG_MFLASH_SECTOR_SIZE);
+
+ target->type->read_memory(target, address, 2,
+ MG_MFLASH_SECTOR_SIZE / 2, (u8 *)buff);
+
+ for (i = 0; i < MG_MFLASH_SECTOR_SIZE >> 1; i++) {
+ if (buff[i] != i) {
+ LOG_ERROR("mflash: verify interface fail");
+ return ERROR_FAIL;
+ }
+ }
+ }
+
+ LOG_INFO("mflash: verify interface ok");
+ return ERROR_OK;
+}
+
+static const char g_strSEG_SerialNum[20] = {
+ 'G','m','n','i','-','e','e','S','g','a','e','l',
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
+};
+
+static const char g_strSEG_FWRev[8] = {
+ 'F','X','L','T','2','v','0','.'
+};
+
+static const char g_strSEG_ModelNum[40] = {
+ 'F','X','A','L','H','S','2',0x20,'0','0','s','7',
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
+};
+
+static void mg_gen_ataid(mg_io_type_drv_info *pSegIdDrvInfo)
+{
+ /* b15 is ATA device(0) , b7 is Removable Media Device */
+ pSegIdDrvInfo->general_configuration = 0x045A;
+ /* 128MB : Cylinder=> 977 , Heads=> 8 , Sectors=> 32
+ * 256MB : Cylinder=> 980 , Heads=> 16 , Sectors=> 32
+ * 384MB : Cylinder=> 745 , Heads=> 16 , Sectors=> 63
+ */
+ pSegIdDrvInfo->number_of_cylinders = 0x02E9;
+ pSegIdDrvInfo->reserved1 = 0x0;
+ pSegIdDrvInfo->number_of_heads = 0x10;
+ pSegIdDrvInfo->unformatted_bytes_per_track = 0x0;
+ pSegIdDrvInfo->unformatted_bytes_per_sector = 0x0;
+ pSegIdDrvInfo->sectors_per_track = 0x3F;
+ pSegIdDrvInfo->vendor_unique1[0] = 0x000B;
+ pSegIdDrvInfo->vendor_unique1[1] = 0x7570;
+ pSegIdDrvInfo->vendor_unique1[2] = 0x8888;
+
+ memcpy(pSegIdDrvInfo->serial_number, (void *)g_strSEG_SerialNum,20);
+ /* 0x2 : dual buffer */
+ pSegIdDrvInfo->buffer_type = 0x2;
+ /* buffer size : 2KB */
+ pSegIdDrvInfo->buffer_sector_size = 0x800;
+ pSegIdDrvInfo->number_of_ecc_bytes = 0;
+
+ memcpy(pSegIdDrvInfo->firmware_revision, (void *)g_strSEG_FWRev,8);
+
+ memcpy(pSegIdDrvInfo->model_number, (void *)g_strSEG_ModelNum,40);
+
+ pSegIdDrvInfo->maximum_block_transfer = 0x4;
+ pSegIdDrvInfo->vendor_unique2 = 0x0;
+ pSegIdDrvInfo->dword_io = 0x00;
+ /* b11 : IORDY support(PIO Mode 4), b10 : Disable/Enbale IORDY
+ * b9 : LBA support, b8 : DMA mode support
+ */
+ pSegIdDrvInfo->capabilities = 0x1 << 9;
+
+ pSegIdDrvInfo->reserved2 = 0x4000;
+ pSegIdDrvInfo->vendor_unique3 = 0x00;
+ /* PIOMode-2 support */
+ pSegIdDrvInfo->pio_cycle_timing_mode = 0x02;
+ pSegIdDrvInfo->vendor_unique4 = 0x00;
+ /* MultiWord-2 support */
+ pSegIdDrvInfo->dma_cycle_timing_mode = 0x00;
+ /* b1 : word64~70 is valid
+ * b0 : word54~58 are valid and reflect the current numofcyls,heads,sectors
+ * b2 : If device supports Ultra DMA , set to one to vaildate word88
+ */
+ pSegIdDrvInfo->translation_fields_valid = (0x1 << 1) | (0x1 << 0);
+ pSegIdDrvInfo->number_of_current_cylinders = 0x02E9;
+ pSegIdDrvInfo->number_of_current_heads = 0x10;
+ pSegIdDrvInfo->current_sectors_per_track = 0x3F;
+ pSegIdDrvInfo->current_sector_capacity_lo = 0x7570;
+ pSegIdDrvInfo->current_sector_capacity_hi = 0x000B;
+
+ pSegIdDrvInfo->multi_sector_count = 0x04;
+ /* b8 : Multiple secotr setting valid , b[7:0] num of secotrs per block */
+ pSegIdDrvInfo->multi_sector_setting_valid = 0x01;
+ pSegIdDrvInfo->total_user_addressable_sectors_lo = 0x7570;
+ pSegIdDrvInfo->total_user_addressable_sectors_hi = 0x000B;
+ pSegIdDrvInfo->single_dma_modes_supported = 0x00;
+ pSegIdDrvInfo->single_dma_transfer_active = 0x00;
+ /* b2 :Multi-word DMA mode 2, b1 : Multi-word DMA mode 1 */
+ pSegIdDrvInfo->multi_dma_modes_supported = (0x1 << 0);
+ /* b2 :Multi-word DMA mode 2, b1 : Multi-word DMA mode 1 */
+ pSegIdDrvInfo->multi_dma_transfer_active = (0x1 << 0);
+ /* b0 : PIO Mode-3 support, b1 : PIO Mode-4 support */
+ pSegIdDrvInfo->adv_pio_mode = 0x00;
+ /* 480(0x1E0)nsec for Multi-word DMA mode0
+ * 150(0x96) nsec for Multi-word DMA mode1
+ * 120(0x78) nsec for Multi-word DMA mode2
+ */
+ pSegIdDrvInfo->min_dma_cyc = 0x1E0;
+ pSegIdDrvInfo->recommend_dma_cyc = 0x1E0;
+ pSegIdDrvInfo->min_pio_cyc_no_iordy = 0x1E0;
+ pSegIdDrvInfo->min_pio_cyc_with_iordy = 0x1E0;
+ memset((void *)pSegIdDrvInfo->reserved3, 0x00, 22);
+ /* b7 : ATA/ATAPI-7 ,b6 : ATA/ATAPI-6 ,b5 : ATA/ATAPI-5,b4 : ATA/ATAPI-4 */
+ pSegIdDrvInfo->major_ver_num = 0x7E;
+ /* 0x1C : ATA/ATAPI-6 T13 1532D revision1 */
+ pSegIdDrvInfo->minor_ver_num = 0x19;
+ /* NOP/READ BUFFER/WRITE BUFFER/Power management feature set support */
+ pSegIdDrvInfo->feature_cmd_set_suprt0 = 0x7068;
+ /* Features/command set is valid/Advanced Pwr management/CFA feature set
+ * not support
+ */
+ pSegIdDrvInfo->feature_cmd_set_suprt1 = 0x400C;
+ pSegIdDrvInfo->feature_cmd_set_suprt2 = 0x4000;
+ /* READ/WRITE BUFFER/PWR Management enable */
+ pSegIdDrvInfo->feature_cmd_set_en0 = 0x7000;
+ /* CFA feature is disabled / Advancde power management disable */
+ pSegIdDrvInfo->feature_cmd_set_en1 = 0x0;
+ pSegIdDrvInfo->feature_cmd_set_en2 = 0x4000;
+ pSegIdDrvInfo->reserved4 = 0x0;
+ /* 0x1 * 2minutes */
+ pSegIdDrvInfo->req_time_for_security_er_done = 0x19;
+ pSegIdDrvInfo->req_time_for_enhan_security_er_done = 0x19;
+ /* Advanced power management level 1 */
+ pSegIdDrvInfo->adv_pwr_mgm_lvl_val = 0x0;
+ pSegIdDrvInfo->reserved5 = 0x0;
+ memset((void *)pSegIdDrvInfo->reserved6, 0x00, 68);
+ /* Security mode feature is disabled */
+ pSegIdDrvInfo->security_stas = 0x0;
+ memset((void *)pSegIdDrvInfo->vendor_uniq_bytes, 0x00, 62);
+ /* CFA power mode 1 support in maximum 200mA */
+ pSegIdDrvInfo->cfa_pwr_mode = 0x0100;
+ memset((void *)pSegIdDrvInfo->reserved7, 0x00, 190);
+}
+
+static int mg_storage_config(void)
+{
+ u8 buff[512];
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_vcmd)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ mg_gen_ataid((mg_io_type_drv_info *)buff);
+
+ if (mg_mflash_do_write_sects(buff, 0, 1, mg_vcmd_update_stgdrvinfo)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_default)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ LOG_INFO("mflash: storage config ok");
+ return ERROR_OK;
+}
+
+static int mg_boot_config(void)
+{
+ u8 buff[512];
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_vcmd)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ memset(buff, 0xff, 512);
+
+ buff[0] = mg_op_mode_snd; /* operation mode */
+ buff[1] = MG_UNLOCK_OTP_AREA;
+ buff[2] = 4; /* boot size */
+ *((u32 *)(buff + 4)) = 0; /* XIP size */
+
+ if (mg_mflash_do_write_sects(buff, 0, 1, mg_vcmd_update_xipinfo)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_default)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ LOG_INFO("mflash: boot config ok");
+ return ERROR_OK;
+}
+
+static int mg_set_pll(mg_pll_t *pll)
+{
+ u8 buff[512];
+
+ memset(buff, 0xff, 512);
+ *((u32 *)&buff[0]) = pll->lock_cyc; /* PLL Lock cycle */
+ *((u16 *)&buff[4]) = pll->feedback_div; /* PLL Feedback 9bit Divider */
+ buff[6] = pll->input_div; /* PLL Input 5bit Divider */
+ buff[7] = pll->output_div; /* PLL Output Divider */
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_vcmd)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_mflash_do_write_sects(buff, 0, 1, mg_vcmd_wr_pll)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_default)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ LOG_INFO("mflash: set pll ok");
+ return ERROR_OK;
+}
+
+static int mg_erase_nand(void)
+{
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_vcmd)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_mflash_do_write_sects(NULL, 0, 0, mg_vcmd_purge_nand)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_set_feature(mg_feature_id_transmode, mg_feature_val_trans_default)
+ != ERROR_OK)
+ return ERROR_FAIL;
+
+ LOG_INFO("mflash: erase nand ok");
+ return ERROR_OK;
+}
+
+int mg_config_cmd(struct command_context_s *cmd_ctx, char *cmd,
+ char **args, int argc)
+{
+ double fin, fout;
+ mg_pll_t pll;
+
+ if (mg_verify_interface() != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_mflash_rst() != ERROR_OK)
+ return ERROR_FAIL;
+
+ switch (argc) {
+ case 2:
+ if (!strcmp(args[1], "boot")) {
+ if (mg_boot_config() != ERROR_OK)
+ return ERROR_FAIL;
+
+ return ERROR_OK;
+ } else if (!strcmp(args[1], "storage")) {
+ if (mg_storage_config() != ERROR_OK)
+ return ERROR_FAIL;
+
+ return ERROR_OK;
+ } else
+ return ERROR_COMMAND_NOTFOUND;
+ break;
+ case 3:
+ if (!strcmp(args[1], "pll")) {
+ fin = strtoul(args[2], NULL, 0);
+
+ if (fin > MG_PLL_CLK_OUT)
+ return ERROR_FAIL;
+
+ fout = mg_calc_pll(fin, &pll);
+
+ if (!fout)
+ return ERROR_FAIL;
+
+ LOG_INFO("mflash: Fout=%u Hz, feedback=%u,"
+ "indiv=%u, outdiv=%u, lock=%u",
+ (u32)fout, pll.feedback_div,
+ pll.input_div, pll.output_div,
+ pll.lock_cyc);
+
+ if (mg_erase_nand() != ERROR_OK)
+ return ERROR_FAIL;
+
+ if (mg_set_pll(&pll) != ERROR_OK)
+ return ERROR_FAIL;
+
+ return ERROR_OK;
+ } else
+ return ERROR_COMMAND_NOTFOUND;
+ break;
+ default:
+ return ERROR_COMMAND_SYNTAX_ERROR;
+ }
+
+ return ERROR_OK;
+}
+
int mflash_init_drivers(struct command_context_s *cmd_ctx)
{
if (mflash_bank) {
@@ -757,6 +1194,8 @@
"mflash write <num> <file> <address>");
register_command(cmd_ctx, mflash_cmd, "dump", mg_dump_cmd, COMMAND_EXEC,
"mflash dump <num> <file> <address> <size>");
+ register_command(cmd_ctx, mflash_cmd, "config", mg_config_cmd,
+ COMMAND_EXEC, "mflash config <num> <stage>");
}
return ERROR_OK;
Modified: trunk/src/flash/mflash.h
===================================================================
--- trunk/src/flash/mflash.h 2009-05-27 12:21:28 UTC (rev 1929)
+++ trunk/src/flash/mflash.h 2009-05-27 12:30:42 UTC (rev 1930)
@@ -48,7 +48,7 @@
mg_io_uint16 unformatted_bytes_per_track; /* 04 */
mg_io_uint16 unformatted_bytes_per_sector; /* 05 */
mg_io_uint16 sectors_per_track; /* 06 */
- mg_io_uint8 vendor_unique1[6]; /* 07/08/09 */
+ mg_io_uint16 vendor_unique1[3]; /* 07/08/09 */
mg_io_uint8 serial_number[20]; /* 10~19 */
@@ -117,6 +117,14 @@
} mg_io_type_drv_info;
+typedef struct _mg_pll_t
+{
+ unsigned int lock_cyc;
+ unsigned short feedback_div; /* 9bit divider */
+ unsigned char input_div; /* 5bit divider */
+ unsigned char output_div; /* 2bit divider */
+} mg_pll_t;
+
typedef struct mg_drv_info_s {
mg_io_type_drv_info drv_id;
u32 tot_sects;
@@ -158,6 +166,16 @@
#define MG_OEM_DISK_WAIT_TIME_NORMAL 3000 /* msec */
#define MG_OEM_DISK_WAIT_TIME_SHORT 1000 /* msec */
+#define MG_PLL_CLK_OUT 66000000.0 /* 66Mhz */
+#define MG_PLL_MAX_FEEDBACKDIV_VAL 512
+#define MG_PLL_MAX_INPUTDIV_VAL 32
+#define MG_PLL_MAX_OUTPUTDIV_VAL 4
+
+#define MG_PLL_STD_INPUTCLK 12000000.0 /* 12Mhz */
+#define MG_PLL_STD_LOCKCYCLE 10000
+
+#define MG_UNLOCK_OTP_AREA 0xFF
+
typedef enum _mg_io_type_wait{
mg_io_wait_bsy = 1,
@@ -238,4 +256,37 @@
} mg_io_type_cmd;
+typedef enum _mg_feature_id
+{
+ mg_feature_id_transmode = 0x3
+} mg_feature_id;
+
+typedef enum _mg_feature_val
+{
+ mg_feature_val_trans_default = 0x0,
+ mg_feature_val_trans_vcmd = 0x3,
+ mg_feature_val_trand_vcmds = 0x2
+} mg_feature_val;
+
+typedef enum _mg_vcmd
+{
+ mg_vcmd_update_xipinfo = 0xFA, /* FWPATCH commmand through IOM I/O */
+ mg_vcmd_verify_fwpatch = 0xFB, /* FWPATCH commmand through IOM I/O */
+ mg_vcmd_update_stgdrvinfo = 0xFC, /* IOM identificatin info program command */
+ mg_vcmd_prep_fwpatch = 0xFD, /* FWPATCH commmand through IOM I/O */
+ mg_vcmd_exe_fwpatch = 0xFE, /* FWPATCH commmand through IOM I/O */
+ mg_vcmd_wr_pll = 0x8B,
+ mg_vcmd_purge_nand = 0x8C, /* Only for Seagle */
+ mg_vcmd_lock_otp = 0x8D,
+ mg_vcmd_rd_otp = 0x8E,
+ mg_vcmd_wr_otp = 0x8F
+} mg_vcmd;
+
+typedef enum _mg_opmode
+{
+ mg_op_mode_xip = 1, /* TRUE XIP */
+ mg_op_mode_snd = 2, /* BOOT+Storage */
+ mg_op_mode_stg = 0 /* Only Storage */
+} mg_opmode;
+
#endif
|
|
From: <zw...@ma...> - 2009-05-27 14:21:31
|
Author: zwelch
Date: 2009-05-27 14:21:28 +0200 (Wed, 27 May 2009)
New Revision: 1929
Modified:
trunk/src/flash/mflash.c
trunk/src/flash/mflash.h
Log:
unsik Kim <don...@gm...>:
Remove unused mflash driver 'prove' field.
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-05-27 12:20:13 UTC (rev 1928)
+++ trunk/src/flash/mflash.c 2009-05-27 12:21:28 UTC (rev 1929)
@@ -358,8 +358,6 @@
static int mg_mflash_probe(void)
{
- mflash_bank->proved = 0;
-
mg_init_gpio();
LOG_INFO("reset mflash");
@@ -387,8 +385,6 @@
if (mg_dsk_drv_info() != ERROR_OK)
return ERROR_FAIL;
- mflash_bank->proved = 1;
-
return ERROR_OK;
}
@@ -678,10 +674,6 @@
address = strtoul(args[2], NULL, 0);
- if (! mflash_bank->proved ) {
- mg_mflash_probe();
- }
-
if (fileio_open(&fileio, args[1], FILEIO_READ, FILEIO_BINARY) != ERROR_OK) {
return ERROR_FAIL;
}
@@ -730,10 +722,6 @@
address = strtoul(args[2], NULL, 0);
size = strtoul(args[3], NULL, 0);
- if (! mflash_bank->proved ) {
- mg_mflash_probe();
- }
-
if (fileio_open(&fileio, args[1], FILEIO_WRITE, FILEIO_BINARY) != ERROR_OK) {
return ERROR_FAIL;
}
Modified: trunk/src/flash/mflash.h
===================================================================
--- trunk/src/flash/mflash.h 2009-05-27 12:20:13 UTC (rev 1928)
+++ trunk/src/flash/mflash.h 2009-05-27 12:21:28 UTC (rev 1929)
@@ -131,8 +131,6 @@
mflash_gpio_drv_t *gpio_drv;
target_t *target;
mg_drv_info_t *drv_info;
-
- u8 proved;
} mflash_bank_t;
extern int mflash_register_commands(struct command_context_s *cmd_ctx);
|
|
From: <zw...@ma...> - 2009-05-27 14:20:18
|
Author: zwelch
Date: 2009-05-27 14:20:13 +0200 (Wed, 27 May 2009)
New Revision: 1928
Modified:
trunk/doc/openocd.texi
trunk/src/flash/mflash.c
trunk/src/flash/mflash.h
Log:
unsik Kim <don...@gm...>:
Remove unused mflash bank command options.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-27 12:16:07 UTC (rev 1927)
+++ trunk/doc/openocd.texi 2009-05-27 12:20:13 UTC (rev 1928)
@@ -2509,22 +2509,19 @@
@subsection mFlash Configuration
@cindex mFlash Configuration
-@b{mflash bank} <@var{soc}> <@var{base}> <@var{chip_width}> <@var{bus_width}>
-<@var{RST pin}> <@var{WP pin}> <@var{DPD pin}> <@var{target}>
+@b{mflash bank} <@var{soc}> <@var{base}> <@var{RST pin}> <@var{target}>
@cindex mflash bank
@*Configures a mflash for <@var{soc}> host bank at
-<@var{base}>. <@var{chip_width}> and <@var{bus_width}> are bytes
-order. Pin number format is dependent on host GPIO calling convention.
-If WP or DPD pin was not used, write -1. Currently, mflash bank
-support s3c2440 and pxa270.
+<@var{base}>. Pin number format is dependent on host GPIO calling convention.
+Currently, mflash bank support s3c2440 and pxa270.
-(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1, <@var{WP pin}> and <@var{DPD pin}> are not used.
+(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1.
@example
-mflash bank s3c2440 0x10000000 2 2 1b -1 -1 0
+mflash bank s3c2440 0x10000000 1b 0
@end example
-(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43, <@var{DPD pin}> is not used and <@var{DPD pin}> is GPIO 51.
+(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43.
@example
-mflash bank pxa270 0x08000000 2 2 43 -1 51 0
+mflash bank pxa270 0x08000000 43 0
@end example
@section Microcontroller specific Flash Commands
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-05-27 12:16:07 UTC (rev 1927)
+++ trunk/src/flash/mflash.c 2009-05-27 12:20:13 UTC (rev 1928)
@@ -203,16 +203,6 @@
gpio_drv->set_gpio_to_output(mflash_bank->rst_pin);
gpio_drv->set_gpio_output_val(mflash_bank->rst_pin, 1);
- if (mflash_bank->wp_pin.num != -1) {
- gpio_drv->set_gpio_to_output(mflash_bank->wp_pin);
- gpio_drv->set_gpio_output_val(mflash_bank->wp_pin, 1);
- }
-
- if (mflash_bank->dpd_pin.num != -1) {
- gpio_drv->set_gpio_to_output(mflash_bank->dpd_pin);
- gpio_drv->set_gpio_output_val(mflash_bank->dpd_pin, 1);
- }
-
return ERROR_OK;
}
@@ -790,30 +780,22 @@
char *str;
int i;
- if (argc < 8)
+ if (argc < 4)
{
return ERROR_COMMAND_SYNTAX_ERROR;
}
- if ((target = get_target(args[7])) == NULL)
+ if ((target = get_target(args[3])) == NULL)
{
- LOG_ERROR("target '%s' not defined", args[7]);
+ LOG_ERROR("target '%s' not defined", args[3]);
return ERROR_FAIL;
}
mflash_bank = calloc(sizeof(mflash_bank_t), 1);
mflash_bank->base = strtoul(args[1], NULL, 0);
- mflash_bank->chip_width = strtoul(args[2], NULL, 0);
- mflash_bank->bus_width = strtoul(args[3], NULL, 0);
- mflash_bank->rst_pin.num = strtoul(args[4], &str, 0);
+ mflash_bank->rst_pin.num = strtoul(args[2], &str, 0);
if (*str)
mflash_bank->rst_pin.port[0] = (u16)tolower(str[0]);
- mflash_bank->wp_pin.num = strtol(args[5], &str, 0);
- if (*str)
- mflash_bank->wp_pin.port[0] = (u16)tolower(str[0]);
- mflash_bank->dpd_pin.num = strtol(args[6], &str, 0);
- if (*str)
- mflash_bank->dpd_pin.port[0] = (u16)tolower(str[0]);
mflash_bank->target = target;
@@ -835,6 +817,6 @@
{
mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL);
register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG,
- "mflash bank <soc> <base> <chip_width> <bus_width> <RST pin> <WP pin> <DPD pin> <target #>");
+ "mflash bank <soc> <base> <RST pin> <target #>");
return ERROR_OK;
}
Modified: trunk/src/flash/mflash.h
===================================================================
--- trunk/src/flash/mflash.h 2009-05-27 12:16:07 UTC (rev 1927)
+++ trunk/src/flash/mflash.h 2009-05-27 12:20:13 UTC (rev 1928)
@@ -125,12 +125,8 @@
typedef struct mflash_bank_s
{
u32 base;
- u32 chip_width;
- u32 bus_width;
mflash_gpio_num_t rst_pin;
- mflash_gpio_num_t wp_pin;
- mflash_gpio_num_t dpd_pin;
mflash_gpio_drv_t *gpio_drv;
target_t *target;
|
|
From: <zw...@ma...> - 2009-05-27 14:16:14
|
Author: zwelch
Date: 2009-05-27 14:16:07 +0200 (Wed, 27 May 2009)
New Revision: 1927
Modified:
trunk/src/flash/mflash.c
Log:
unsik Kim <don...@gm...>:
Change prefix of mflash driver routines to mg_.
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-05-27 12:06:51 UTC (rev 1926)
+++ trunk/src/flash/mflash.c 2009-05-27 12:16:07 UTC (rev 1927)
@@ -191,12 +191,12 @@
return ret;
}
-static int mflash_rst(u8 level)
+static int mg_hdrst(u8 level)
{
return mflash_bank->gpio_drv->set_gpio_output_val(mflash_bank->rst_pin, level);
}
-static int mflash_init_gpio (void)
+static int mg_init_gpio (void)
{
mflash_gpio_drv_t *gpio_drv = mflash_bank->gpio_drv;
@@ -370,16 +370,16 @@
{
mflash_bank->proved = 0;
- mflash_init_gpio();
+ mg_init_gpio();
LOG_INFO("reset mflash");
- mflash_rst(0);
+ mg_hdrst(0);
if (mg_dsk_wait(mg_io_wait_bsy, MG_OEM_DISK_WAIT_TIME_LONG) != ERROR_OK)
return ERROR_FAIL;
- mflash_rst(1);
+ mg_hdrst(1);
if (mg_dsk_wait(mg_io_wait_not_bsy, MG_OEM_DISK_WAIT_TIME_LONG) != ERROR_OK)
return ERROR_FAIL;
@@ -402,7 +402,7 @@
return ERROR_OK;
}
-static int mflash_probe_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int mg_probe_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int ret;
@@ -672,7 +672,7 @@
return ERROR_OK;
}
-static int mflash_write_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int mg_write_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
u32 address, buf_cnt;
u8 *buffer;
@@ -724,7 +724,7 @@
return ERROR_OK;
}
-static int mflash_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int mg_dump_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
u32 address, size_written, size;
u8 *buffer;
@@ -774,17 +774,17 @@
int mflash_init_drivers(struct command_context_s *cmd_ctx)
{
if (mflash_bank) {
- register_command(cmd_ctx, mflash_cmd, "probe", mflash_probe_command, COMMAND_EXEC, NULL);
- register_command(cmd_ctx, mflash_cmd, "write", mflash_write_command, COMMAND_EXEC,
+ register_command(cmd_ctx, mflash_cmd, "probe", mg_probe_cmd, COMMAND_EXEC, NULL);
+ register_command(cmd_ctx, mflash_cmd, "write", mg_write_cmd, COMMAND_EXEC,
"mflash write <num> <file> <address>");
- register_command(cmd_ctx, mflash_cmd, "dump", mflash_dump_command, COMMAND_EXEC,
+ register_command(cmd_ctx, mflash_cmd, "dump", mg_dump_cmd, COMMAND_EXEC,
"mflash dump <num> <file> <address> <size>");
}
return ERROR_OK;
}
-static int mflash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int mg_bank_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
char *str;
@@ -834,7 +834,7 @@
int mflash_register_commands(struct command_context_s *cmd_ctx)
{
mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL);
- register_command(cmd_ctx, mflash_cmd, "bank", mflash_bank_command, COMMAND_CONFIG,
+ register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG,
"mflash bank <soc> <base> <chip_width> <bus_width> <RST pin> <WP pin> <DPD pin> <target #>");
return ERROR_OK;
}
|
|
From: <zw...@ma...> - 2009-05-27 14:06:55
|
Author: zwelch
Date: 2009-05-27 14:06:51 +0200 (Wed, 27 May 2009)
New Revision: 1926
Modified:
trunk/src/jtag/vsllink.c
Log:
SimonQian <sim...@Si...>:
This patch allows the vsllink to support very large scan sizes in DMA mode.
Modified: trunk/src/jtag/vsllink.c
===================================================================
--- trunk/src/jtag/vsllink.c 2009-05-27 11:58:19 UTC (rev 1925)
+++ trunk/src/jtag/vsllink.c 2009-05-27 12:06:51 UTC (rev 1926)
@@ -710,10 +710,10 @@
&VSLLINK_TAP_MOVE_INSERT_INSIGNIFICANT[tap_move_ndx(tap_get_state())][tap_move_ndx(tap_get_end_state())];
u8 tms_scan = VSLLINK_TAP_MOVE(tap_get_state(), tap_get_end_state());
- vsllink_tap_ensure_space(0, 8);
-
if (tap_get_state() == TAP_RESET)
{
+ vsllink_tap_ensure_space(0, 8);
+
for (i = 0; i < 8; i++)
{
vsllink_tap_append_step(1, 0);
@@ -1318,7 +1318,6 @@
vsllink_end_state(saved_end_state);
/* Scan */
- vsllink_tap_ensure_space(1, (scan_size + 7) & ~0x00000007);
vsllink_tap_append_scan_dma(scan_size, buffer, command);
tap_set_state(ir_scan ? TAP_IRPAUSE : TAP_DRPAUSE);
@@ -1581,20 +1580,37 @@
}
static void vsllink_tap_append_scan_dma(int length, u8 *buffer, scan_command_t *command)
{
- pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
- int i;
+ pending_scan_result_t *pending_scan_result;
+ int len_tmp, len_all, i;
- pending_scan_result->offset = tap_length;
- pending_scan_result->length = length;
- pending_scan_result->command = command;
- pending_scan_result->buffer = buffer;
-
- for (i = 0; i < length; i++)
+ len_all = 0;
+ while (len_all < length)
{
- vsllink_tap_append_step((i < length-1 ? 0 : 1), (buffer[i/8] >> (i%8)) & 1);
+ if ((length - len_all) > tap_buffer_size * 8)
+ {
+ len_tmp = tap_buffer_size * 8;
+ }
+ else
+ {
+ len_tmp = length - len_all;
+ }
+
+ vsllink_tap_ensure_space(1, (len_tmp + 7) & ~7);
+
+ pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
+ pending_scan_result->offset = tap_length;
+ pending_scan_result->length = len_tmp;
+ pending_scan_result->command = command;
+ pending_scan_result->buffer = buffer + len_all / 8;
+
+ for (i = 0; i < len_tmp; i++)
+ {
+ vsllink_tap_append_step(((len_all+i) < length-1 ? 0 : 1), (buffer[(len_all+i)/8] >> ((len_all+i)%8)) & 1);
+ }
+
+ pending_scan_results_length++;
+ len_all += len_tmp;
}
-
- pending_scan_results_length++;
}
/* Pad and send a tap sequence to the device, and receive the answer.
|
|
From: ntfreak at B. <nt...@ma...> - 2009-05-27 13:58:20
|
Author: ntfreak
Date: 2009-05-27 13:58:19 +0200 (Wed, 27 May 2009)
New Revision: 1925
Added:
trunk/tcl/interface/cortino.cfg
Modified:
trunk/doc/openocd.texi
trunk/src/jtag/ft2232.c
Log:
- add support for cortino jtag interface
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2009-05-27 10:44:03 UTC (rev 1924)
+++ trunk/doc/openocd.texi 2009-05-27 11:58:19 UTC (rev 1925)
@@ -496,6 +496,8 @@
@* Link @url{http://www.hitex.com/stm32-stick}
@item @b{axm0432_jtag}
@* Axiom AXM-0432 Link @url{http://www.axman.com}
+@item @b{cortino}
+@* Link @url{http://www.hitex.com/index.php?id=cortino}
@end itemize
@section USB JLINK based
@@ -1471,6 +1473,8 @@
OOCDLink
@item @b{axm0432_jtag}
Axiom AXM-0432
+@item @b{cortino}
+Hitex Cortino JTAG interface
@end itemize
@item @b{ft2232_vid_pid} <@var{vid}> <@var{pid}>
Modified: trunk/src/jtag/ft2232.c
===================================================================
--- trunk/src/jtag/ft2232.c 2009-05-27 10:44:03 UTC (rev 1924)
+++ trunk/src/jtag/ft2232.c 2009-05-27 11:58:19 UTC (rev 1925)
@@ -124,6 +124,7 @@
static int axm0432_jtag_init(void);
static int sheevaplug_init(void);
static int icebear_jtag_init(void);
+static int cortino_jtag_init(void);
/* reset procedures for supported layouts */
static void usbjtag_reset(int trst, int srst);
@@ -156,8 +157,9 @@
{ "comstick", comstick_init, comstick_reset, NULL },
{ "stm32stick", stm32stick_init, stm32stick_reset, NULL },
{ "axm0432_jtag", axm0432_jtag_init, axm0432_jtag_reset, NULL },
- {"sheevaplug", sheevaplug_init, sheevaplug_reset, NULL },
+ { "sheevaplug", sheevaplug_init, sheevaplug_reset, NULL },
{ "icebear", icebear_jtag_init, icebear_jtag_reset, NULL },
+ { "cortino", cortino_jtag_init, comstick_reset, NULL },
{ NULL, NULL, NULL, NULL },
};
@@ -2576,6 +2578,49 @@
return ERROR_OK;
}
+static int cortino_jtag_init(void)
+{
+ u8 buf[3];
+ u32 bytes_written;
+
+ low_output = 0x08;
+ low_direction = 0x1b;
+
+ /* initialize low byte for jtag */
+ buf[0] = 0x80; /* command "set data bits low byte" */
+ buf[1] = low_output; /* value (TMS=1,TCK=0, TDI=0, nOE=0) */
+ buf[2] = low_direction; /* dir (output=1), TCK/TDI/TMS=out, TDO=in, nOE=out */
+ LOG_DEBUG("%2.2x %2.2x %2.2x", buf[0], buf[1], buf[2]);
+
+ if ( ( ( ft2232_write(buf, 3, &bytes_written) ) != ERROR_OK ) || (bytes_written != 3) )
+ {
+ LOG_ERROR("couldn't initialize FT2232 with 'cortino' layout");
+ return ERROR_JTAG_INIT_FAILED;
+ }
+
+ nTRST = 0x01;
+ nTRSTnOE = 0x00; /* no output enable for nTRST */
+ nSRST = 0x02;
+ nSRSTnOE = 0x00; /* no output enable for nSRST */
+
+ high_output = 0x03;
+ high_direction = 0x03;
+
+ /* initialize high port */
+ buf[0] = 0x82; /* command "set data bits high byte" */
+ buf[1] = high_output;
+ buf[2] = high_direction;
+ LOG_DEBUG("%2.2x %2.2x %2.2x", buf[0], buf[1], buf[2]);
+
+ if ( ( ( ft2232_write(buf, 3, &bytes_written) ) != ERROR_OK ) || (bytes_written != 3) )
+ {
+ LOG_ERROR("couldn't initialize FT2232 with 'stm32stick' layout");
+ return ERROR_JTAG_INIT_FAILED;
+ }
+
+ return ERROR_OK;
+}
+
static void olimex_jtag_blink(void)
{
/* Olimex ARM-USB-OCD has a LED connected to ACBUS3
Added: trunk/tcl/interface/cortino.cfg
===================================================================
--- trunk/tcl/interface/cortino.cfg 2009-05-27 10:44:03 UTC (rev 1924)
+++ trunk/tcl/interface/cortino.cfg 2009-05-27 11:58:19 UTC (rev 1925)
@@ -0,0 +1,11 @@
+#
+# Hitex Cortino
+#
+# http://www.hitex.com/index.php?id=cortino
+#
+
+interface ft2232
+ft2232_device_desc "Cortino"
+ft2232_layout cortino
+ft2232_vid_pid 0x0640 0x0032
+
Property changes on: trunk/tcl/interface/cortino.cfg
___________________________________________________________________
Name: svn:eol-style
+ native
|
|
From: <zw...@ma...> - 2009-05-27 12:44:09
|
Author: zwelch Date: 2009-05-27 12:44:03 +0200 (Wed, 27 May 2009) New Revision: 1924 Modified: trunk/doc/manual/style.txt Log: Add new Style Guides for languages used (and to be used) by project. Modified: trunk/doc/manual/style.txt =================================================================== --- trunk/doc/manual/style.txt 2009-05-27 10:40:52 UTC (rev 1923) +++ trunk/doc/manual/style.txt 2009-05-27 10:44:03 UTC (rev 1924) @@ -1,20 +1,47 @@ -/** @page styleguide OpenOCD Coding C Style Guide +/** @page styleguide Style Guides -The following rules describe a formatting, naming, and other conventions -that should be followed when writing or changing the OpenOCD C code. -Many of the general rules should apply to OpenOCD's Jim/TCL code as well. - -The goals of this guide are: -- to produce code that appears clean, consistent, and readable, -- to allow developers to create patches that conform to a standard, +The goals for each of these guides are: +- to produce correct code that appears clean, consistent, and readable, +- to allow developers to create patches that conform to a standard, and - to eliminate these issues as points of future contention. -consistent. Some of these rules may be ignored in the spirit of these stated goals; however, such exceptions should be fairly rare. -@section styleformat Formatting Rules +The following style guides describe a formatting, naming, and other +conventions that should be followed when writing or changing the OpenOCD +code: +- @subpage styletcl +- @subpage stylec +- @subpage styleperl +- @subpage styleautotools + +In addition, the following style guides provide information for +providing documentation, either as part of the C code or stand-alone. + +- @subpage styledoxygen +- @subpage styletexinfo +- @subpage stylelatex + +Feedback would be welcome to improve the OpenOCD guidelines. + + */ +/** @page styletcl TCL Style Guide + +OpenOCD needs to expand its Jim/TCL Style Guide. + +Many of the guidelines listed on the @ref stylec page should apply to +OpenOCD's Jim/TCL code as well. + + */ +/** @page stylec C Style Guide + +This page contains guidelines for writing new C source code for the +OpenOCD project. + +@section styleformat Formatting Guide + - remove any trailing white space at the end of lines. - use TAB characters for indentation; do NOT use spaces. - displayed TAB width is 4 characters. @@ -23,7 +50,7 @@ - remove any trailing empty lines at the end of source files - do not "comment out" code from the tree; instead, one should either: -# remove it entirely (Subversion can retrieve the old version), or - -# use an @c #if/#endif block. + -# use an @c \#if/\#endif block. Finally, try to avoid lines of code that are longer than than 72-80 columns: @@ -74,20 +101,186 @@ } @endcode -@section styledoxygen Doxygen Rules + */ +/** @page styledoxygen Doxygen Style Guide -- use @c /// to for one-line documentation -- for multiple lines, use a "block" style with one space +The following sections provide guidelines for OpenOCD developers +who wish to write Doxygen comments in the code or this manual. +For an introduction to Doxygen documentation, +see the @ref primerdoxygen. + +@section styledoxyblocks Doxygen Block Selection + +Several different types of Doxygen comments can be used; often, +one style will be the most appropriate for a specific context. +The following guidelines provide developers with heuristics for +selecting an appropriate form and writing consistent documentation +comments. + +-# use @c /// to for one-line documentation of instances. +-# for documentation requiring multiple lines, use a "block" style: @verbatim /** - * @brief Short description. - * Full description here. - * @param foo Describe foo. + * @brief First sentence is short description. Remaining text becomes + * the full description block, where "empty" lines start new paragraphs. + * + * One can make text appear in @a italics, @b bold, @c monospace, or + * in blocks such as the one in which this example appears in the Style + * Guide. See the Doxygen Manual for the full list of commands. + * + * @param foo For a function, describe the parameters (e.g. @a foo). + * @returns The value(s) returned, or possible error conditions. */ @endverbatim -- if the total line length will be less than 72 columns, then + -# The block should start on the line following the opening @c /**. + -# The end of the block, \f$*/\f$, should also be on its own line. + -# Every line in the block should have a @c '*' in-line with its start: + - A leading space is required to align the @c '*' with the @c /** line. + - A single "empty" line should separate the function documentation + from the block of parameter and return value descriptions. + - Except to separate paragraphs of documentation, other extra + "empty" lines should be removed from the block. + -# Only single spaces should be used; do @b not add mid-line indentation. +-# If the total line length will be less than 72-80 columns, then - The @c /**< form can be used on the same line. - This style should be used sparingly; the best use is for fields: - - @code int field /**< field description */ @endcode + @code int field; /**< field description */ @endcode +@section styledoxyall Doxygen Style Guide + +The following guidelines apply to all Doxygen comment blocks: + +-# Use the @c '\@cmd' form for all doxygen commands (do @b not use @c '\\cmd'). +-# Use symbol names such that Doxygen automatically creates links: + -# @c function_name() can be used to reference functions + (e.g. flash_set_dirty()). + -# @c struct_name::member_name should be used to reference structure + fields in the documentation (e.g. @c flash_driver_s::name). + -# URLS get converted to markup automatically, without any extra effort. + -# new pages can be linked into the heirarchy by using the @c \@subpage + command somewhere the page(s) under which they should be linked: + -# use @c \@ref in other contexts to create links to pages and sections. +-# Use good Doxygen mark-up: + -# '\@a' (italics) should be used to reference parameters (e.g. <i>foo</i>). + -# '\@b' (bold) should be used to emphasizing <b>single</b> words. + -# '\@c' (monospace) should be used with <code>file names</code> and + <code>code symbols</code>, so they appear visually distinct from + surrounding text. + -# To mark-up multiple words, the HTML alternatives must be used. +-# Two spaces should be used when nesting lists; do @b not use '\\t' in lists. +-# Code examples provided in documentation must conform to the Style Guide. + +@section styledoxytext Doxygen Text Inputs + +In addition to the guidelines in the preceding sections, the following +additional style guidelines should be considered when writing +documentation as part of standalone text files: + +-# Text files must contain Doxygen at least one comment block: + -# Documentation should begin in the first column (except for nested lists). + -# Do NOT use the @c '*' convention that must be used in the source code. +-# Each file should contain at least one @c \@page block. + -# Each new page should be listed as a \@subpage in the \@page block + of the page that should serve as its parent. + -# Large pages should be structure in parts using meaningful \@section + and \@subsection commands. +-# Include a @c \@file block at the end of each Doxygen @c .txt file to + document its contents: + - Doxygen creates such pages for files automatically, but no content + will appear on them for those that only contain manual pages. + - The \@file block should provide useful meta-documentation to assist + techincal writers; typically, a list of the pages that it contains. + - For example, the @ref styleguide exists in @c doc/manual/style.txt, + which contains a reference back to itself. +-# The \@file and \@page commands should begin on the same line as + the start of the Doxygen comment: +@verbatim +/** @page pagename Page Title + +Documentation for the page. + */ +/** @file + +This file contains the @page page. + + */ +@endverbatim + +For an example, the Doxygen source for this Style Guide can be found in +@c doc/manual/style.txt, alongside other parts of The Manual. + + */ +/** @page styletexinfo Texinfo Style Guide + +This page needs to provide style guidelines for Texinfo, the mark-up +language used by The Guide for OpenOCD Users. + + */ +/** @page stylelatex LaTeX Style Guide + +This page needs to provide style guidelines for using LaTeX, the +typesetting language used by The References for OpenOCD Hardware. +Likewise, the @ref primerlatex for using this guide needs to be completed. + + */ +/** @page styleperl Perl Style Guide + +This page provides some style guidelines for using Perl, a scripting +language used by several small tools in the tree: + +-# Ensure all Perl scripts use the proper suffix (@c .pl for scripts, and + @c .pm for modules) +-# Pass files as script parameters or piped as input: + - Do NOT code paths to files in the tree, as this breaks out-of-tree builds. + - If you must, then you must also use an automake rule to create the script. +-# use @c '#!/usr/bin/perl' as the first line of Perl scripts. +-# always <code>use strict</code> and <code>use warnings</code> +-# invoke scripts indirectly in Makefiles or other scripts: +@code +perl script.pl +@endcode + +Maintainers must also be sure to follow additional guidelines: +-# Ensure that Perl scripts are committed as executables: + - Use "<code>chmod +x script.pl</code>" + @a before using "<code>svn add script.pl</code>", or + - Use "<code>svn ps svn:executable '*' script.pl</code>" + @a after using "<code>svn add script.pl</code>". + + */ +/** @page styleautotools Autotools Style Guide + +This page contains style guidelines for the OpenOCD autotools scripts. + +The following guidelines apply to the @c configure.in file: +- Better guidelines need to be developed, but until then... +- Use good judgement. + +The following guidelines apply to @c Makefile.am files: +-# When assigning variables with long lists of items: + -# Separate the values on each line to make the files "patch friendly": +@code +VAR = \ + value1 \ + value2 \ + ... + value9 \ + value10 +@endcode + */ +/** @file + +This file contains the @ref styleguide pages. The @ref styleguide pages +include the following Style Guides for their respective code and +documentation languages: + +- @ref styletcl +- @ref stylec +- @ref styledoxygen +- @ref styletexinfo +- @ref stylelatex +- @ref styleperl +- @ref styleautotools + + */ |
|
From: <zw...@ma...> - 2009-05-27 12:40:59
|
Author: zwelch Date: 2009-05-27 12:40:52 +0200 (Wed, 27 May 2009) New Revision: 1923 Modified: trunk/doc/manual/main.txt Log: Link new Primer pages into the main list of Primers. Modified: trunk/doc/manual/main.txt =================================================================== --- trunk/doc/manual/main.txt 2009-05-27 10:35:20 UTC (rev 1922) +++ trunk/doc/manual/main.txt 2009-05-27 10:40:52 UTC (rev 1923) @@ -35,6 +35,8 @@ They seek to provide information to pull novices up the learning curves associated with the fundamental technologies used by OpenOCD. +- @subpage primerdocs +- @subpage primerautotools - @subpage primertcl - @subpage primerjtag |
|
From: <zw...@ma...> - 2009-05-27 12:35:34
|
Author: zwelch Date: 2009-05-27 12:35:20 +0200 (Wed, 27 May 2009) New Revision: 1922 Added: trunk/doc/manual/primer/docs.txt Log: Add Documentation Primer to The Manual. Added: trunk/doc/manual/primer/docs.txt =================================================================== --- trunk/doc/manual/primer/docs.txt 2009-05-27 10:27:32 UTC (rev 1921) +++ trunk/doc/manual/primer/docs.txt 2009-05-27 10:35:20 UTC (rev 1922) @@ -0,0 +1,122 @@ +/** @page primerdocs OpenOCD Documentation Primers + +This page provides an introduction to OpenOCD's documentation processes. + +OpenOCD presently produces several kinds of documentation: +- The Guide: + - Focuses on using the OpenOCD software. + - Details the installation, usage, and customization. + - Provides descriptions of public Jim/TCL script commands. + - Written using GNU texinfo. + - Created with 'make pdf' or 'make html'. + - See @subpage primertexinfo and @ref styletexinfo. +- The References: (as proposed) + - Focuses on using specific hardware with OpenOCD. + - Details the supported interfaces, chips, boards, and targets. + - Provides overview, usage, reference, and FAQ for each device. + - Written using LaTeX language with custom macros. + - Created with 'make references'. + - See @subpage primerlatex and @ref stylelatex. +- The Manual: + - Focuses on developing the OpenOCD software. + - Details the architecutre, driver interfaces, and processes. + - Provides "full" coverage of C source code (work-in-progress). + - Written using Doxygen C language conventions (i.e. in comments). + - Created with 'make doxygen'. + - See @subpage primerdoxygen and @ref styledoxygen. + +The following sections provide more information for anyone that wants to +contribute new or updated documentation to the OpenOCD project. + + */ +/** @page primertexinfo Texinfo Primer + +The OpenOCD User Guide presently exists entirely within the +doc/openocd.texi document. That file contains documentation with +mark-up suitable for being parsed by the GNU Texinfo utilities +(http://www.gnu.org/software/texinfo/). + +This section needs to be expanded to provide an overview to new +developers. + +OpenOCD style guidelines for Texinfo documentation can be found on the +@ref styletexinfo page. + + */ +/** @page primerlatex LaTeX Primer + +The OpenOCD project provides a number of reference guides using the +LaTeX typesetting language. + +- OpenOCD Quick Reference Sheets +- OpenOCD Hardware Reference Guides + +These documents have not yet been produced, so this Primer serves as +a placeholder to describe how they are created and can be extended. +The same holds true for the @ref stylelatex page. + + */ +/** @page primerdoxygen Doxygen Primer + +Doxygen-style comments are used to provide documentation in-line with +the OpenOCD source code. These comments are used to document functions, +variables, structs, enums, fields, and everything else that might need +to be documented for developers. Additional files containing comments +that supplement the code comments in order to provide complete developer +documentation. + +Even if you already know Doxygen, please read this Primer to learn +how OpenOCD developers already use Doxygen features in the project tree. +For more information about OpenOCD's required style for using Doxygen, +see the @ref styledoxygen page and look at existing documentation in the +@c doc/manual tree. + +@section primerdoxytext Doxygen Input Files + +Doxygen has been configured parse all of the C source code files (*.c +and *.h) in @c src/ in order to produce a complete reference of all +OpenOCD project symbols. In addition to the source code files, other +files will also be scanned for comment blocks; some are referenced +explicitly by the @c INPUT variable in the Doxygen configuration file. + +By default, the Doxygen configuration enables a "full" set of features, +including generation of dependency graphs (using the GraphViz package). +These features may be disabled by editing the @c Doxyfile.in file at the +top of the project tree; the configuration file includes comments that +provide detailed documentation for each option. + +To support out-of-tree building of the documentation, the @c Doxyfile.in +@c INPUT values will have all instances of the string @c "@srcdir@" +replaced with the current value of the make variable +<code>$(srcdir)</code>. The Makefile uses a rule to convert +@c Doxyfile.in into the @c Doxyfile used by <code>make doxygen</code>. + +@section primerdoxyoocd OpenOCD Input Files + +OpenOCD uses the @c INPUT mechanism to include additional documentation to +provide The Manual for OpenOCD Developers. These extra files contain +high-level information intended to supplement the relatively low-level +documentation that gets extracted from the source code comments. + +OpenOCD's Doxygen configuration file will search for all @c .txt files +that can be found under the @c doc/manual directory in the project tree. +New files containing valid Doxygen markup that are placed in or under +that directory will be detected and included in The Manual automatically. + +@section primerdoxyman Doxygen Reference Manual + +The full documentation for Doxygen can be referenced on-line at the project +home page: http://www.doxygen.org/index.html. In HTML versions of this +document, an image with a link to this site appears in the page footer. + +*/ +/** @file + +This file contains the Doxygen source code for the @ref primerdocs. +The @ref primerdocs page also contains the following sections: + +- @ref primertexinfo +- @ref primerlatex +- @ref primerdoxygen + + */ Property changes on: trunk/doc/manual/primer/docs.txt ___________________________________________________________________ Name: svn:eol-style + native |
|
From: <zw...@ma...> - 2009-05-27 12:27:36
|
Author: zwelch Date: 2009-05-27 12:27:32 +0200 (Wed, 27 May 2009) New Revision: 1921 Added: trunk/doc/manual/primer/autotools.txt Log: Add draft of Autotools Primer to The Manual. Added: trunk/doc/manual/primer/autotools.txt =================================================================== --- trunk/doc/manual/primer/autotools.txt 2009-05-27 07:49:58 UTC (rev 1920) +++ trunk/doc/manual/primer/autotools.txt 2009-05-27 10:27:32 UTC (rev 1921) @@ -0,0 +1,167 @@ +/** @page primerautotools OpenOCD Autotools Primer + +This page provides an overview to OpenOCD's use of the GNU autotool suite: +- @ref primerautoconf +- @ref primerautomake +- @ref primerlibtool + +Most developers do not need to concern themselves with these tools, as +the @ref primerbootstrap script runs these tools in the required sequence. + +@section primerbootstrap Autotools Bootstrap + +The @c bootstrap script should be used by developers to run the +autotools in the correct sequence. + +When run after a fresh checkout, this script generates the build files +required to compile the project, producing the project configure script. +After running @c configure, the @ref primermaintainermode settings will +handle most situations that require running these tools again. In some +cases, a fresh bootstrap may be still required. + +@subsection primerbootstrapcures Problems Solved By Bootstrap + +For example, the build system can fail in unexpected ways after running +<code>svn update</code>. Here, the <code>make maintainer-clean</code> +should be used to remove all of the files generated by the @c bootstrap +script and subsequent build processes. + +In this particular case, one may also need to remove stray files by hand +after running this command to ensure everything is rebuilt properly. +This step should be necessary only if the @c maintainer-clean was run +@b after altering the build system files with Subversion. If it is run +@b before any updates, the build system should never leave artifacts +in the tree. + +Without such precautions, changes can be introduced that leave the tree +timestamps in an inconsistent state, producing strange compile errors +that are resolve after such diligence. + +@subsection primermaintainerclean Autotools Cleaning + +Normally, all files generated by the bootstrap script, configure +process, and build system should be removed after running <code>make +maintainer-clean</code>. Automatically generated files that remain +after this should be listed in @c MAINTAINERCLEANFILES, +@c DISTCLEANFILES, or @c CLEANFILES, depending on which stage of the +build process they are produced. + +@section primerautoconf Autoconf Configuration Script + +The @c autoconf program generates the @c configure script from +@c configure.in, using serious Perl voodoo. The resulting script is +included in the project distribution packages and run by users to +configure the build process for their system. + +@subsection primermaintainermode Maintainer Mode + +After a fresh checkout, @c bootstrap, and a simple @c configure, you may +experience errors when running @c make that some files cannot be found +(e.g. @c version.texi), and a second @c make will "mysteriously" solve +the problems. The isssue is well-known and expected, if unfortunate. + +The OpenOCD project requires that all developers building from the +Subversion repository use the @c --enable-maintainer-mode option when +running the @c configure script. This option ensures that certain files +are created during the build process that would normally be packaged in +the distribution tarball. The @c bootstrap script will remind you of +this requirement when it runs. + +In addition to solving these problems, this option enables Makefile +rules (provided by automake) that allow the normal @c make process to +rebuild the autotools outputs, included the automake-generated Makefiles +themselves. This avoids the heavy-handed approach of running the +@c bootstrap script after changing one of these files. + +@section primerautomake Automake Makefiles + +The @c automake program generates @c Makefile.in files (from @c +Makefile.am files). These files are later processed by the configure +script produced by @c autoconf. + +@subsection primerautomakenewfiles Creating Makefile.am Files + +This section shows how to add a @c Makefile.am in a new directory (or +one that lacks one). +-# The new directory must be listed in the @c SUBDIRS variable in the +parent directory's Makefile.am: +@code +$ echo 'SUBDIRS += directory' >>../Makefile.am +@endcode +-# Create an bare-bones Makefile.am file in directory that needs it: +@code +$ echo "MAINTAINERCLEANFILES = Makefile.in" >Makefile.am +@endcode +-# The @c configure.in script must be updated, so it generates the required +Makefile when the @a configure script is run by the user: +@verbatim +AC_OUTPUT([ + ... + path/to/new/Makefile + ]) +@endverbatim + +Note: these instructions are @b not meant to be used literally, rather +they are shown for demonstration purposes. + +The default MAINTAINERCLEANFILES rule ensures that the +automake-generated @c Makefile.in file will be removed when developers +run <code>make maintainer-clean</code>. Additional rules may be added +after this; however, the project should bootstrap and tear down cleanly +after taking these minimal steps, with the new directory being visited +during the @c make sequence. + +@subsection primerautomaketweaks Updating Makefile.am Files + +Adding, removing, and renaming files from the project tree usually +requires updating the autotools inputs. This section will help describe +how to do this as questions arise. + +@section primerlibtool Libtool and Libraries + +The @c libtool program provides the means of generating libraries in a +portable and painless manner (relatively speaking). + +This section will contain an answer to "what does libtool give OpenOCD?" +and "what do developers need to consider in new code?" + +@section primerautotoolsmation Autotools Automation + +This section outlines three ways the autotools provides automation to +assist with testing and distribution: +- @ref primerautocheck -- automatic unit and smoke tests +- @ref primerautodistcheck -- automatic distribution and packaging tests + +@subsection primerautocheck make check + +The <code>make check</code> command will run the OpenOCD test suite, +once it has been integrated as such. This section will contain +information about how to extend the testing build system components to +implement new checks. + +@subsection primerautodistcheck make distcheck + +The <code>make distcheck</code> command produces an archive of the +project deliverables (using <code>make dist</code>) and verifies its +integrity for distribution by attemptng to use the package in the same +manner as a user. + +These checks includes the following steps: +-# Unpack the project archive into its expected directory. +-# Configure and build the project in a temporary out-of-tree directory. +-# Run <code>make check</code> to ensure the distributed code passes all tests. +-# Run <code>make install</code> into a temporary installation directory. +-# Check that <code>make uninstall</code> removes all files that were installed. +-# Check that <code>make distclean</code> removes all files created +during all other steps (except the first). + +If all of these steps complete successfully, the @c make process will +output a friendly message indicating the archive is ready to be +distributed. + + */ +/** @file + +This file contains the @ref primerautotools page. + + */ Property changes on: trunk/doc/manual/primer/autotools.txt ___________________________________________________________________ Name: svn:eol-style + native |
|
From: <zw...@ma...> - 2009-05-27 09:50:07
|
Author: zwelch
Date: 2009-05-27 09:49:58 +0200 (Wed, 27 May 2009)
New Revision: 1920
Modified:
trunk/src/Makefile.am
trunk/src/helper/Makefile.am
trunk/src/helper/options.c
trunk/src/server/Makefile.am
trunk/src/server/httpd.c
Log:
Update build system to find moved scripts -- Step 3 of 2:
- Update references from using PKGLIBDIR to PKGDATADIR.
- Update built-in script search paths to reflect new install location:
- $(pkgdatadir) => $(pktdatadir)/site
- $(pkglibdir) => $(pktdatadir)/scripts
- Update installed location of httpd files:
- $(pkglibdir)/httpd => $(pkgdatadir)/httpd
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-05-27 06:49:24 UTC (rev 1919)
+++ trunk/src/Makefile.am 2009-05-27 07:49:58 UTC (rev 1920)
@@ -26,10 +26,7 @@
-I$(top_srcdir)/src/flash \
-I$(top_srcdir)/src/pld
-# pass path to prefix path
-libopenocd_la_CPPFLAGS = \
- -DPKGLIBDIR=\"$(pkglibdir)\" \
- -DPKGBLDDATE=\"`date +%F-%R`\"
+libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
if RELEASE
libopenocd_la_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\"
Modified: trunk/src/helper/Makefile.am
===================================================================
--- trunk/src/helper/Makefile.am 2009-05-27 06:49:24 UTC (rev 1919)
+++ trunk/src/helper/Makefile.am 2009-05-27 07:49:58 UTC (rev 1920)
@@ -1,8 +1,7 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/server \
-I$(top_srcdir)/src/target \
- -DPKGDATADIR=\"$(pkgdatadir)\" \
- -DPKGLIBDIR=\"$(pkglibdir)\"
+ -DPKGDATADIR=\"$(pkgdatadir)\"
METASOURCES = AUTO
noinst_LTLIBRARIES = libhelper.la
Modified: trunk/src/helper/options.c
===================================================================
--- trunk/src/helper/options.c 2009-05-27 06:49:24 UTC (rev 1919)
+++ trunk/src/helper/options.c 2009-05-27 07:49:58 UTC (rev 1920)
@@ -97,10 +97,14 @@
add_script_search_dir(strExePath);
}
#else
- /* Add dir for openocd supplied scripts last so that user can over
- ride those scripts if desired. */
- add_script_search_dir(PKGDATADIR);
- add_script_search_dir(PKGLIBDIR);
+ /*
+ * The directory containing OpenOCD-supplied scripts should be
+ * listed last in the built-in search order, so the user can
+ * override these scripts with site-specific customizations.
+ */
+ /// @todo Implement @c add_script_search_dir("${HOME}/.openocd").
+ add_script_search_dir(PKGDATADIR "/site");
+ add_script_search_dir(PKGDATADIR "/scripts");
#endif
return ERROR_OK;
}
Modified: trunk/src/server/Makefile.am
===================================================================
--- trunk/src/server/Makefile.am 2009-05-27 06:49:24 UTC (rev 1919)
+++ trunk/src/server/Makefile.am 2009-05-27 07:49:58 UTC (rev 1920)
@@ -3,7 +3,7 @@
-I$(top_srcdir)/src/target \
-I$(top_srcdir)/src/flash \
-I$(top_srcdir)/src/jtag \
- -DPKGLIBDIR=\"$(pkglibdir)\"
+ -DPKGDATADIR=\"$(pkgdatadir)\"
METASOURCES = AUTO
noinst_LTLIBRARIES = libserver.la
@@ -25,7 +25,12 @@
libserver_la_SOURCES += tcl_server.c
if HTTPD
-nobase_dist_pkglib_DATA = $(wildcard $(srcdir)/httpd/*.tcl $(srcdir)/httpd/*.css $(srcdir)/httpd/menu_cuts/*.png)
+nobase_dist_pkgdata_DATA = \
+ $(wildcard \
+ $(srcdir)/httpd/*.tcl \
+ $(srcdir)/httpd/*.css \
+ $(srcdir)/httpd/menu_cuts/*.png \
+ )
endif
EXTRA_DIST = \
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2009-05-27 06:49:24 UTC (rev 1919)
+++ trunk/src/server/httpd.c 2009-05-27 07:49:58 UTC (rev 1920)
@@ -393,7 +393,7 @@
* being subverted to evil purposes
*/
- const char *httpd_dir=PKGLIBDIR "/httpd";
+ const char *httpd_dir = PKGDATADIR "/httpd";
if (*url=='/')
{
|
|
From: <zw...@ma...> - 2009-05-27 08:49:30
|
Author: zwelch Date: 2009-05-27 08:49:24 +0200 (Wed, 27 May 2009) New Revision: 1919 Added: trunk/tcl/ Removed: trunk/src/tcl/ Modified: trunk/Makefile.am Log: Move TCL script files -- Step 2 of 2: - Move src/tcl to tcl/. - Update top Makefile.am to use new path name. Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2009-05-27 06:44:43 UTC (rev 1918) +++ trunk/Makefile.am 2009-05-27 06:49:24 UTC (rev 1919) @@ -29,7 +29,7 @@ $(MAKE) Doxyfile doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log -TCL_PATH = src/tcl +TCL_PATH = tcl # command to find paths of script files, relative to TCL_PATH TCL_FILES := find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \ sed -e 's,^$(srcdir)/$(TCL_PATH),,' Copied: trunk/tcl (from rev 1918, trunk/src/tcl) |
|
From: <zw...@ma...> - 2009-05-27 08:44:58
|
Author: zwelch
Date: 2009-05-27 08:44:43 +0200 (Wed, 27 May 2009)
New Revision: 1918
Added:
trunk/src/tcl/board/
trunk/src/tcl/interface/
trunk/src/tcl/target/
trunk/src/tcl/test/
Removed:
trunk/src/target/board/
trunk/src/target/interface/
trunk/src/target/target/
trunk/src/target/test/
Modified:
trunk/Makefile.am
trunk/configure.in
trunk/src/Makefile.am
trunk/src/target/Makefile.am
Log:
Move TCL script files -- Step 1 of 2:
- Move src/target/{interface,target,board,test}/ into src/tcl/
- Remove existing rules in src/Makefile.am and src/target/Makefile.am.
- Add Makefile.am handling of *.cfg and *.tcl files in top Makefile.am:
- Add dist-hook to include such files under src/tcl in the distribution.
- Add install-data-hook to install contents of '$(top_srcdir)/src/tcl/'.
- Add uninstall-hook to remove the installed script files.
- Change paths to (un)install script files in '$(pkgdatadir)/scripts'.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-05-27 02:01:15 UTC (rev 1917)
+++ trunk/Makefile.am 2009-05-27 06:44:43 UTC (rev 1918)
@@ -29,6 +29,29 @@
$(MAKE) Doxyfile
doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
+TCL_PATH = src/tcl
+# command to find paths of script files, relative to TCL_PATH
+TCL_FILES := find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
+ sed -e 's,^$(srcdir)/$(TCL_PATH),,'
+
+dist-hook:
+ for i in $$($(TCL_FILES)); do \
+ j="$(distdir)/$(TCL_PATH)/$$i" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
+ done
+
+install-data-hook:
+ for i in $$($(TCL_FILES)); do \
+ j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
+ done
+
+uninstall-hook:
+ rm -rf $(DESTDIR)$(pkgdatadir)/scripts
+
+
distclean-local:
rm -rf Doxyfile doxygen
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-05-27 02:01:15 UTC (rev 1917)
+++ trunk/configure.in 2009-05-27 06:44:43 UTC (rev 1918)
@@ -834,6 +834,7 @@
AM_PROG_CC_C_O
AC_PROG_RANLIB
AC_PROG_LIBTOOL
+AC_PROG_INSTALL
dnl configure checks required for Jim files (these are obsolete w/ C99)
AC_C_CONST
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-05-27 02:01:15 UTC (rev 1917)
+++ trunk/src/Makefile.am 2009-05-27 06:44:43 UTC (rev 1918)
@@ -92,24 +92,4 @@
libopenocd_la_LIBADD += -lmicrohttpd
endif
-nobase_dist_pkglib_DATA = \
- tcl/bitsbytes.tcl \
- tcl/chip/atmel/at91/aic.tcl \
- tcl/chip/atmel/at91/at91sam7x128.tcl \
- tcl/chip/atmel/at91/at91sam7x256.tcl \
- tcl/chip/atmel/at91/pmc.tcl \
- tcl/chip/atmel/at91/rtt.tcl \
- tcl/chip/atmel/at91/usarts.tcl \
- tcl/chip/st/stm32/stm32.tcl \
- tcl/chip/st/stm32/stm32_rcc.tcl \
- tcl/chip/st/stm32/stm32_regs.tcl \
- tcl/cpu/arm/arm7tdmi.tcl \
- tcl/cpu/arm/arm920.tcl \
- tcl/cpu/arm/arm946.tcl \
- tcl/cpu/arm/arm966.tcl \
- tcl/cpu/arm/cortex_m3.tcl \
- tcl/memory.tcl \
- tcl/mmr_helpers.tcl \
- tcl/readable.tcl
-
MAINTAINERCLEANFILES = Makefile.in
Modified: trunk/src/target/Makefile.am
===================================================================
--- trunk/src/target/Makefile.am 2009-05-27 02:01:15 UTC (rev 1917)
+++ trunk/src/target/Makefile.am 2009-05-27 06:44:43 UTC (rev 1918)
@@ -26,14 +26,5 @@
nobase_dist_pkglib_DATA =
nobase_dist_pkglib_DATA += xscale/debug_handler.bin
nobase_dist_pkglib_DATA += ecos/at91eb40a.elf
-# Various chip targets
-nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/target/*.cfg)
-# Various jtag interfaces
-nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/interface/*.cfg)
-# Various preconfigured boards
-nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/board/*.cfg)
-# test files
-nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/test/*.cfg)
-
MAINTAINERCLEANFILES = Makefile.in
Copied: trunk/src/tcl/board (from rev 1917, trunk/src/target/board)
Copied: trunk/src/tcl/interface (from rev 1917, trunk/src/target/interface)
Copied: trunk/src/tcl/target (from rev 1917, trunk/src/target/target)
Copied: trunk/src/tcl/test (from rev 1917, trunk/src/target/test)
|