Øyvind Harboe wrote:
> old-post_reset is the most important event that just about anyone
> writing a target configuration script will encounter.
>
> How about simply renaming this event to indicate that it is
> still fully supported and recommended rather than something
> old and nasty to be ignored?
>
> old-post_reset => reset-init
>   
Ah... "reset-init" exists already, see target.c, line: 192

What is missing is 1 line that needs to be added to 'startup.tcl' see below
and your concern is solved.

But to answer your question:

I don't really like the idea of getting rid of 'old'. Reasons:

* The "old-" names are there to keep the old "target_script" command 
from breaking.
* Old names where ambigous - and hence, the source of much confusion.
* New names have distinct "start" and "end" suffixes.
* We wanted to push people to the *new* names
* and wanted to only document the new names.

-Duane.

=========

    #Pass 2 - if needed "init"
    if { 0 == [string compare init $MODE] } {
        foreach t [target names] {
            set err [catch "$t arp_waitstate halted 5000"]
            # Did it halt?
            if { $err == 0 } {
                $t invoke-event old-post_reset
             # ADD ME!!!!
                $t invoke-event reset-init
            }
        }
    }
   
    foreach t [ target names ] {   
        $t invoke-event reset-end
    }

=========



_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to