Chapter 4 BIOS Setup
CoreModule 420 Reference Manual 55
On-Board Flash Access and Use
This section describes how to use the on-board flash memory and load an application in the available
lower 768kB region of the 1MB of Flash Memory. The application can boot directly from the on-board
flash memory.
The Flash memory can be accessed at 128MB intervals above the base address (with the exception of
256MB). For example, if the Flash address is set to 8MB, then the Flash memory can be accessed at
136MB, 392MB, 520MB etc.
CAUTION To prevent a system crash or unusable BIOS, do not overwrite the BIOS. The entire
1MB of Flash is accessible, but only the lower 768kB region is available for custom
applications. The higher 256kB region is used for the BIOS and can be overwritten,
rendering the CoreModule 420 unbootable!!

Flash Programming Requirements

To build an example application under DOS or in a Windows DOS pop-up screen, you need to have one
of the following tools.
Microsoft Visual C++ 7.0 – This is a commercial product and is available from Microsoft. It can
be downloaded as part of the .NET Framework from http://msdn.microsoft.com. The compiler is
part of the Microsoft .NET Framework V1.1 Software Development Kit and the NET Framework
Redistributable Package V1.1. Both of these need to be downloaded and installed.
Open Watcom C/C++32 1.1 – This is a commercial compiler product available from
http://www.openwatcom.org. It is also included on the CoreModule 420 Doc & SW CD-ROM in
the cm420\software\examples\flash\watcom directory.
Other versions of the above tools may also work.
The following example application is also necessary and is provided by Ampro.
Example application – This application can be found in the cm420\software\examples\
flash\watcom or cm420\software\examples\flash\msvc directory for the Watcom compiler or
Visual C++ compiler respectively. This example application will be described in more detail in
the following procedures.

Building the Example

Ampro provides an example for flash programming found on the CoreModule 420 Doc & SW CD-ROM
under Miscellaneous Source Code Examples in the Support Software directory. The example actually
consists of two parts:
Example application – The example application shows how a C++ compiler can be used to
generate a 32-bit application, which runs without an Operating System. First, build this
application using the make.bat file. The make.bat file will build app.exe.
Bootloader – The bootloader can be found in bootsec.asm and the final Flash image is built with
image.asm. You can use make.bat to build the bootloader and Flash image (in the
cm420\software\examples\flash.