I've given some thought on how users can figure out if a part
is supported by OpenOCD.
There are thousands of flash/target types & combinations out there.
The user may have the part number or some other string to describe
his flash or target.
There are two things that I'd like to see:
- the user should have an effective means to answer if flash X or target Y
is supported and the status of that support.
- it should be possible to print out an exhaustive human readable description
of flash & target support. This information may have to be generated to
cover combinations or sequences of part numbers...
Attach is the change in the flash driver interface that I have in mind.
In addition there needs to be code to support this and some new
commands to run queries + ditto for the target interface...
--
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
### Eclipse Workspace Patch 1.0
#P openocd
Index: src/flash/flash.h
===================================================================
--- src/flash/flash.h (revision 1512)
+++ src/flash/flash.h (working copy)
@@ -61,6 +61,20 @@
int (*protect_check)(struct flash_bank_s *bank);
int (*info)(struct flash_bank_s *bank, char *buf, int buf_size);
int (*auto_probe)(struct flash_bank_s *bank);
+ /* print out human readable messages in response to a partname as an
argument.
+ * Note that a part can be supported by multiple drivers. Also it is
possible
+ * that a string can be recognized by multiple drivers.
+ *
+ * The intention is for users to be quickly able to determine the status
+ * of support for a particular partnumber or flash brand.
+ */
+ int (*supported)(const char *partname);
+
+ /* list all parts supported by this driver. The idea is that this
information
+ * may, in part, be generated and then possibly copy & pasted into the
+ * openocd.texi file */
+ int (*showinfo);
+
} flash_driver_t;
typedef struct flash_bank_s
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development