John Devereux wrote:
> Of course any users board script will be broken too,

Can you send a patch to gerrit with your board cfg? I'd be happy to
add it.


> My own workaround is to manually define $_TARGETNAME in my board
> script.
> 
> ...
> adapter_khz 500
> 
> source [find target/lpc2478.cfg]
> 
> #seems to be needed since target file fails to export it
> set _TARGETNAME lpc2478.cpu
> 
> # override version in lpc2478.cfg since this uses wrong clock
> # frequency and causes flashing to be unreliable. This gets called
> # during init
> proc init_targets {} {
>      echo "Our init_targets: flash configured for 72MHz."
>      setup_lpc2478 72000 500
> }
> 
> # seem to need this here now
> init
> 
> # reset handler that can reset the memory map and clocking to a defined state
> $_TARGETNAME configure -event reset-init {
>     my_init_pll
> }

Does $_TARGETNAME get used in many places? If not you could simply
hard code the cpu name like in the procedure call in init_targets.

lpc2478.cpu configure -event reset-init {
  my_init_pll
}

If you only ever have that one CPU on your board then hard coding
(like already done in your proc init_targets) is perfectly fine IMO.


//Peter

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to