To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 600
599  |  601
Subject: 
Re: How do I delete firmware from firmware?
Newsgroups: 
lugnet.robotics.rcx
Date: 
Thu, 18 May 2000 16:55:04 GMT
Viewed: 
3776 times
  
Ralph Hempel <rhempel@bmts.com> wrote:
> > I asked this question under a confusing subject that
> > people may have missed so I am asking again. How does
> > one delete firmware from firmware. I am looking for a
> > solution for pbforth but the question could have be asked
> > for LegOS or Quite C as well. If I get no answer I will
> > try gross things like zeroing the first 50 bytes of code,
> > turn off sll interrupts and then jumping to the h8-300 reset
> > vector. Some variation of this will probably work but I
> > wondered if there was an "official" way to do this. I notice
> > from the unofficial internals doc that there is an opcode
> > for this but no rom entry is listed for this function. Has
> > anyone looked at the rom to see what it does?
> 
> I think if you do a direct jump to 0x03ae, it will init memory
> and essentially start the brick from scratch. At least that's
> what I read from the internals doc...

This sounds correct.  In C, this is how I do it:

    /* Delete the firmware */
    *(char *)0xffcc = 1;
    (*(void (**)(void))0)();

Indeed, *(void (**)(void))0) is the reset vector, whose value is 0x03ae.
0xffcc is timer 0.  I forget what effect setting it to 1 has, but I seem to
remember that setting it to 1 gave nicer results than not doing that.  The
Lego firmware that came with the original RIS did this (but I don't know
about later firmware versions).

-Kekoa



Message is in Reply To:
  RE: How do I delete firmware from firmware?
 
(...) I think if you do a direct jump to 0x03ae, it will init memory and essentially start the brick from scratch. At least that's what I read from the internals doc... Cheers, Ralph Hempel - P.Eng ---...--- Check out pbFORTH for LEGO Mindstorms at: (...) (26 years ago, 18-May-00, to lugnet.robotics.rcx)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR