On Thu, Feb 2, 2012 at 3:17 PM, Freddie Chopin <[email protected]> wrote: > W dniu 2012-02-02 20:54, Øyvind Harboe pisze: >> On Thu, Feb 2, 2012 at 7:48 PM, Chris Morgan<[email protected]> wrote: >>> Hi Oyvind. >>> >>> Would you be able to provide some guidance on how to resolve the >>> issues with the lpc2478.cpu and others that are setting TARGETNAME >>> from the init_target path and board files like the ea board file that >>> use TARGETNAME when sourced and before the init code is called? >> >> I'm short on time these days and I forget all the details.... >> >> I believe Freddie was pretty much on top of the issues. >> >> Freddie pointed out that there were some grander thoughts, but 0 >> adoption of those grander thoughts on how initialisation could be >> done more generally and more robustly. Perhaps a more crude and >> more easily understood approach would be better. > > I've just checked and you CAN define handlers (like reset-init) inside > procedures (like init_targets()), so I think that adding a init_boards() > function that would be executed after init_targets() is quite a good > idea. Overriding init_targets() is not the best idea if you only need to > do something completely different (init some external RAM, configure > resets, ...) than init_targets() does in current script... > > What do you think? I could try to do some patches to make that work, but > I'm first looking for your opinion on this approach (keeping > init_targets(), adding init_boards() or init_board() [second one sounds > better, but is not consistent with init_targets()])... > > 4\/3!! > >
Is the idea to allow some kind of function chaining? I guess I'm not understanding what the principle use of init_targets() was that makes it better than simply executing the code where it was sourced? Is the idea something like being able to include a board file and then run some code after that file has loaded? Isn't that possible by sourcing the board file from your tcl file and putting your code statements after the 'source' line? What kinds of problems are you trying to solve? I wouldn't mind helping out, I'm adept with git etc, and tcl seems simple, but figure we need some architecture idea first. Chris ------------------------------------------------------------------------------ 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
