DM&P MakeROM Utility

Home : Products | Technical Support 2002/12/10

What's MakeROM

MakeROM is a DOS utility for programmer to build flash ROM image for M6117D and Vortex86 serials. It supports SST-SF040(512KB) flash ROM now. User can fit their applications, BIOS and X-DOS into one flash ROM. There are about 350 KB free (512KB - 64KB BIOS - 4KB Driver - 89KB X-DOS = 355KB) for user's application if they use Mity-Mity Module or Mity SoC Module. We recommend user to use executable file compression program (UPX, PKLITE etc.) to compress application in order to save more ROM space.

Download:

Make ROM Image

You can type "makerom" under DOS with no parameter to get usage. We will show you how to make a ROM image for Mity-Mite Module step by step.


C:\MAKEROM>makerom
DM&P ROMDISK Image Generator Ver.Dec  3 2002
Copyright (C) 2002 by DM&P Group. All rights reserved.

MAKEROM -s source_file_dir -d output_file_name -o os_name [-b bios_filename]
  [-vortex86] [-shell|-noshell] [-nobios]

  source_file_dir   Specifies source file directory
  output_file_name  Specifies output file name
  os_name           Specifies OS name
  bios_filename     Specifies 64K BIOS file name(default ROMBIOS.IMG)
  -vortex86         Install Vortex86 ROM disk driver
  -shell            Install COMMAND.COM(default)
  -noshell          Do not install COMMAND.COM
  -nobios           Do not install BIOS file

C:\MAKEROM>

For Mity-Mite Module or Mity SoC Module, you can make a Flash ROM contains BIOS and Flash disk (A:). Remainder disk space are about 444KB free (512KB - 64KB BIOS - 4KB Driver = 444KB). For other M6117D and Vortex86 serials, you only can make Flash disk. The disk space are about 508KB (512KB - 4KB Driver = 508KB).

Step by Step

We support that you install makerom on "C:\MAKEROM" and your applications are on "C:\APP". For example, we compiled Mity-Mite Module Demo Box source code to get mmm.exe and compress it:


D:\MMM\OBJ>upx -9 *.exe
                     Ultimate Packer for eXecutables
            Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
UPX 1.20w        Markus F.X.J. Oberhumer & Laszlo Molnar        May 23rd 2001

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    214921 ->     74277   34.56%     dos/exe     MMM.EXE

Packed 1 file.

D:\MMM\OBJ>

You can get more information about UPX here: http://upx.sourceforge.net/. We put mmm.exe, HTML files, image files, packet driver in C:\APP:


C:\APP>dir
 Volume in drive C is DATA
 Volume Serial Number is 3560-14E1

 Directory of C:\APP

2001/12/14  PM 03:05    <DIR>          .
2001/12/14  PM 03:05    <DIR>          ..
2001/12/10  AM 11:02                37 AUTOEXEC.BAT
1993/12/22  AM 12:00             8,693 NE2000.COM
2001/08/02  PM 05:40                88 DSOCK.CFG
2001/12/20  AM 09:48            70,473 MMM.EXE
2002/01/03  PM 02:31             6,035 DEFAULT.HTM
2001/12/06  PM 05:17               764 MAIL.HTM
2001/12/07  PM 03:15               318 DMP.BMP
2001/08/01  AM 12:00             1,160 DMP.GIF
2001/12/07  PM 03:26            15,722 MM.JPG
              10 File(s)        129,574 bytes
               2 Dir(s)  20,338,409,472 bytes free

C:\APP>

You also should write a "autoexec.bat" which will be ran automatically after DOS boot to execute your application. It's the content of autoexec.bat:


@echo off
ne2000 0x62 5 0x320
mmm

It load packet driver and call main program "mmm.exe". We have X-DOS licence that user can freely use X-DOS on DM&P products and it will be used in this example. You can use those arguments to make ROM image now:


C:\MAKEROM>makerom -s c:\app -d my_rom.img -o xdos
DM&P ROMDISK Image Generator Ver.Feb 27 2002
Copyright (C) 2002 by DM&P Group. All rights reserved.

ROMDISK available sector number : 888
write ROMDISK driver : C:\MAKEROM\DATA\DRV.BIN
write boot sector : C:\MAKEROM\DATA\OS\XDOS\BOOTSECT
copy C:\MAKEROM\DATA\OS\XDOS\X-DOS.SYS -> X-DOS.SYS
copy C:\MAKEROM\DATA\OS\XDOS\COMMAND.COM -> COMMAND.COM
write user files
copy disk\MMM.EXE -> \MMM.EXE
copy disk\DEFAULT.HTM -> \DEFAULT.HTM
copy disk\DMP.BMP -> \DMP.BMP
copy disk\DMP.GIF -> \DMP.GIF
copy disk\MAIL.HTM -> \MAIL.HTM
copy disk\MM.JPG -> \MM.JPG
copy disk\DSOCK.CFG -> \DSOCK.CFG
copy disk\NE2000.COM -> \NE2000.COM
copy disk\AUTOEXEC.BAT -> \AUTOEXEC.BAT
482 sectors(246784 bytes)free
write BIOS image : ROMBIOS.IMG
ok

C:\MAKEROM>

You will get a 512 KBytes ROM file "my_rom.img" if there is no error. In this example, the flash disk will boot with X-DOS and run autoexec.bat automatically.

Use Other DOS

If you want to use another DOS, you can use another utility "getdos" to get necessary file. For example, you want to use DR-DOS. Put DR-DOS boot disk into your floppy driver and type:


C:\MAKEROM>getdos a: drdos
mkdir : DRDOS
copy A:\IBMBIO.COM -> C:\MAKEROM\DATA\OS\DRDOS\IBMBIO.COM
copy A:\IBMDOS.COM -> C:\MAKEROM\DATA\OS\DRDOS\IBMDOS.COM
copy A:\COMMAND.COM -> C:\MAKEROM\DATA\OS\DRDOS\COMMAND.COM
ok

C:\MAKEROM>

"getdos" will make a directory named "drdos" in "C:\MAKEROM\DATA\OS". If you want use DR-DOS to replace X-DOS, type this:


C:\MAKEROM>makerom -s c:\app -d my_rom.img -o drdos

Make ROM Image for Vortex86 Serials

If you want to make Flash disk for Vortex86 serials, type this:


C:\MAKEROM>makerom -s c:\app -d my_rom.img -o xdos -vortex86

Write Image into Flash ROM

You can use EEPROM writer to write ROM image into SST-SF040 flash ROM. We also provide two utilities for programmer to write ROM image under DOS: dflash.exe (21 KB) and vflash.exe (21 KB). dflash.exe is ROM image writer for M6117D serials and vflash.exe is for Vortex86 serials. The usage of both files are the same:


C:\MAKEROM>dflash
DM&P SST28SF040(A) Programmer (for M6117D) Ver.Dec  4 2002
Copyright (C) 2002 by DM&P Group. All rights reserved.

usage::

     dflash.exe ROM_FILE_NAME [/y]

     ROM_FILE_NAME -- the rom file that you want to write.
     /y            -- always flash the ROM

C:\MAKEROM>

If you installed hard disk on Mity-Mite Module, run:


C:\MAKEROM>dflash my_rom.img /y

to write ROM image into SST-SF040 directly. Then, remove hard disk to boot from Flash disk.

Note for dflash.exe & vflash.exe

If you want to use dflash.exe to write ROM image into Flash memory, be sure that:
  1. Enable "GPCS Function" of "Advanced Chipset Setup" in BIOS.
  2. Set "GPCS0 Command" to "MEMR/W 8bit"
  3. Set "GPCS0 Start Address" to "0E000 HEX".
  4. Set "GPCS0 Size" to "64 KByte"
  5. If you use EMM386.EXE, we recommend user to disable it temporarily or use X=E000-EFFF to exclude those address range.

If you use vflash.exe for Vortex86 serials, you should exclude address E000:0000-E700:0000 that mapped by Flash disk driver.

Support

If you have any problem about MakeROM, feel free to mail to soc@dmp.com.tw


DMP Electronics Inc. All rights reserved. Email us: info@dmp.com.tw