Programming into flash

In os1.build, the startup code reserves 4 MB of RAM at a physical address of 0x600000. This will be where the os2 image filesystem will reside. The operating system won't use this memory range for other programs.

You'll need to program the srec files that will be created into flash. The best way to do this with the MGT5200 is to use the dBUG tool and the fp command.

To program os1.srec:

  1. Make sure your tftpd server is working.
  2. Change the filename parameter in dBUG to look for this filename. For example:
    dBUG> set filename /xfer/os1.srec
      
    

    You can store this setting using the store command.

  3. Download the S-records:
    dn
      
    
  4. Program the S-records:
    fp 0 fe040000 fe2fffff 20000
      
    

Both the os1.srec and os2.srec files are created with offsets of 0x20000. This allows them to be downloaded in to RAM using the dBUG tool and then programmed. Be sure to include the offset (20000) when you flash program (fp).

Use the same programming technique for os2.srec, but change the start and end address:

fp 0 fe300000 fe3fffff 20000