#20 implement support for "reload" command in simulator

open
nobody
None
5
2007-02-26
2007-02-26
Anonymous
No

IMHO, it would be useful if there was a "reload" command that would reload the COD-file, this would facilitate reloading a changed image, without having to restart the simulator. So, something along the lines of a "reload" instruction would make the develop/assemble/debug & sim cycle somewhat.

The reload command could simply maintain a timestamp & MD5 hash of the last-loaded image file, so that this would trigger a notification if that changed (i.e. due to rebuilding).

Discussion

  • Nobody/Anonymous

    Logged In: NO

    if implemented, it would also be a good idea to honor this information (the hash that is) when the simulator is "reset", so that IF that hash should have changed, the user is automatically informed about this and asked whether he wished to reload the image from disk

     
  • Nobody/Anonymous

    Logged In: NO

    you may not be aware of it (it's probably what most people would call a "feature"), however issuing "load" multiple times in a row -using identical filename- will essentially result in "reloading" the active file ;-)

     
  • Nobody/Anonymous

    Logged In: NO

    given that "reload" would merely be another name for "load [current_filename]" this could be easily implemented by doing something along the lines of:

    1) automatically set a symbol such as "settings.current_filename" to contain the path&filename of the the last loaded file
    2) provide a new instruction to allow commands to be aliased, i.e. named "alias"
    3) allow commands to access the symbol map and read/write corresponding properties

    so, that you could simply end up with something like:

    alias reload="load $settings.current_filename"

    Thus, resulting in a new command being added to the interpreter, which is an alias that's looked up and converted into its native equivalent.

    Due to the nature of this request and its simplicity, I normally wouldn't have suggested this, however I feel that such a facility might indeed be useful for various other purposes, too.
    In particular, because you could have some file which contains your aliases that may be loaded automatically during startup.
    Having something like this in place would be pretty powerful, in particular if it allows you to directly work with the symbol table

     
  • Nobody/Anonymous

    Logged In: NO

    reload without args could and probably should by default fall back to the currently active filename

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks