W dniu 2012-02-02 22:11, Chris Morgan pisze: > How does it look in tcl to override the init_targets from the > lpc2478.cpu file in code?
You just write another init_targets() and it overrides the previous one(s). Currently it's done in lpc2xxx files - init_targets() from lpc2103.cfg overrides init_targets() from lpc2xxx.cfg. Chaining that would be no different than sourcing "linear" scripts. > Does that function then also call the original init_targets to > preserve its initial setup? No. That's why having init_boards() would be nice. > If thats easy then why not move the stuff > at the start of the ea board file into the board specific init_targets > function, call the initial one after sourcing the lpc2478.cpu file and > then continue with its use of $_TARGETNAME? Currently you have to either: - write new init_targets(), call setup_lpc2478() (or perform your own init) and then your code - have "init" command before your code (so that init_targets() would be executed before it) - have your code packed in some procedure, then in openocd command line just add -c "init; your_procedure" In second and third solution you'll need the patch that makes _TARGETNAME global. 4\/3!! ------------------------------------------------------------------------------ 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
