On-board flash access and use, Flash programming requirements, Building the example – Ampro Corporation 420 User Manual

Page 63

Advertising
background image

Chapter 4

BIOS Setup

CoreModule 420

57

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 768 kB region of the 1 MB of flash memory. The application can boot directly from the on-board
flash memory.

The flash memory can be accessed at 128 MB intervals above the base address (with the exception of
256 MB). For example, if the flash address is set to 8 MB, then the flash memory can be accessed at 136
MB, 392 MB, 520 MB etc.

CAUTION

To prevent a system crash or unusable BIOS, do not overwrite the BIOS.
The entire 1 MB of flash is accessible, but only the lower 768 kB region is
available for custom applications. The higher 256 kB 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 CD-ROM\Software\Misc\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 CD-ROM\Software\Misc\

Flash\Watcom or CD-ROM\Software\Misc\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 CD-
ROM\Software\Misc\Flash)
.

Advertising