Laurent Gauch wrote:
under target directories we should add the architecture family
directories as
- target
- arm
- STM32
stm32f103rb.cfg
stm32f107v8.cfg
stm32f100rb.cfg
This gets quite annoying to type when specifying the target, and it
makes it necessary to have lots of small files for all the variants.
How about specifying a CPU variant on the commandline instead of the
filename? I am thinking about a mechanism where OpenOCD reads some kind
of index file, looks up the CPU variant that I passed on the
commandline, and calls the generic config file where that CPU is
supported, passing the variant via some variable. The generic config
file can then deduce RAM size etc. using that variable, instead of
splitting this in multiple small files.
The index could be built automatically from the generic config files, in
a way that each config file provides a list of the CPU variants that it
supports. Extracting the index could be done by two ways:
- at compile/install time, using a simple script
- at runtime, by reading *all* config files and building the list
dynamically in memory.
Comments?
cu
Michael
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development