Turbo-Locator :: Short Documentation / Getting Started

Turbo-Locator is a 16bit x86 Code Locator converting the regular output of Borland/Turbo C/C++, Borland/Turbo Pascal, TASM into directly executable EPROM, FLASH or RAM download images. Use cases: Embedded x86 development, Programming of industrial PC's, BIOS-Development.

>>TurboLocator Homepage

>>Newsletter Subscription
>>Order TurboLocator
>>Request a Trial Version


Document Contents


>>TurboLocator Installation

>>TurboLocator User Manual

>>Quick-Start

>>Introduction

 


Newsletter Subscription

Order the free TurboLocator & Embedded x86 newsletter to be informed about updates, tips & tricks. Your email address is not used for other purposes. 

E-mail:        

 

Order TurboLocator

After licensing TurboLocator you will receive a license key and the full version installer:
>>Order

Request Trial Version

The current release is V6.0. Request a trial version of TurboLocator (8k code size limit):  
>>Request Trial Version.


TurboLocator Installation

Installation:

  • Run TurboLocator-Setup.exe from CD or download
  • Add EXELOC.EXE to your DOS PATH if you plan direct command line usage:
    You can for example use the Windows Control Panel: Windows-Start-Menu / Settings / Control Panel / System / Advanced / Environment Variables / System Variables;  Add C:\Program Files\Turbo-Locator or appropriate)
  • Start the Turbo-Locator GUI Frontend
  • Do a locator test run on the example EXE-file hellolcd.exe by a click on the "Locate" button. If this works, the setup of TurboLocator is successfully accomplished.
  • Example source code and the x86/MT system library are in LIB.ZIP 
    ( Windows-Start-Menu / Programms/ TurboLocator / System Library ).
  • C/C++ only: 
    Usually the normal C-startup code of Borland C/C++ with version higher than 3.1 works directly on most systems with preconfigured system RAM assignement. 
    A C-startup source code template (C0.ASM) to be customized for special hardware is included in the licensed full version of TurboLocator. 
    Ready-made optimized startup code binaries (c0s.obj..c0l.obj) for NEC V25 are also included in LIB.ZIP of the distribution.

Using the GUI:

The Graphical Frontend TurboLocator/WinMT controls the Locator & the Download Tool. Also it provides a simple serial Terminal (attached Console window in background) and makes development easy by clear one-click execution of relocation and/or download jobs.

Screenshot of Graphical Frontend TurboLocator/WinMT:


TurboLocator User Manual

Quick-Start: Code Relocation to EPROM or FLASH

  1. Install TurboLocator
  2. Create a simple application as EXAMPLE.C or EXAMPLE.PAS
    (You can use code from lib.zip/C/EXAMPLES or lib.zip/PAS/EXAMPLE in the TurboLocator installation folder as template) 
  3. Switch on the creation of "MAP" files on in your (Borland) C/C++ or Pascal Compiler options.
    If correct, a file EXAMPLE.MAP will be created next to your application EXAMPLE.EXE
  4. Compile your code to EXAMPLE.EXE (key F9)
  5. Run at the command line prompt:
    EXELOC /ROM /C:F000 /D:0040 /HEX EXAMPLE  
    in order to relocate your exe-file as EPROM / FLASH image: The code & constant data of the example application will be located at 0xF0000..0xFFFFF (64k) in the memory of your system, and where variable data segments will start at 0x00400 (above interrupt vectors) in the in the memory layout of your system. A x86 processor boot vector will be inserted by default at 0xFFFF0 (can be suppressed with /ROMX )
  6. Take the output file EXAMPLE.HEX or EXAMPLE.BIN (64kB) and transfer it to your EPROM / FLASH / RAM. 
  7. Boot your system.

Additional Notes:

  1. On systems with DOS and Flash-Disk you can alternatively put the binary into the Flash-Disk of the system: Use the /ROMX switch in above EXAMPLE relocation to suppress creation of processor boot vector in the image. Then determine the start address of the EXAMPLE.BIN image in the Flash and boot the relocated EXAMPLE with:
    JMP imagesegmentaddress:0080
  2. In rare cases, only when your system doesn't boot with basic RAM access initialized, you have to add a memory initialization code to the regular startup code C0.ASM / C0[smcl].OBJ coming with TurboLocator; you also can order special custom startup code here: Support  

 

Introduction

The TurboLocator is a software development toolset for transferring the output of Borland 16bit PC Compilers (Borland C/C++, TurboPascal/BorlandPascal, Turbo C++, TASM,..) into directly executable EPROM, FLASH or RAM download images. Use cases: Embedded x86 systems, "raw" PC applications, x86 BIOS and OS development (where no BIOS, DOS or other operating system is present. Not support code is necessary other than your application code. Optionally a x86 boot vector can be created in the image to enable The applications can optionally directly boot from processor  EPROM/ROM/FLASH code can be created by inserting .

As example computer the MT25 measurement & control board ( NEC V25 ) is assumed in the following description. The system library parts for the MT25 are contained in LIB.ZIP and many parts of it can be re-used in arbitrary x86 systems.

The general proceeding for creating located x86 Code is:

  1. Compiling the software with one of the 16bit Borland compilers (BC/BC++, B/TPascal, TASM)

  2. Producing the EXE file and the MAP file

  3. If necessary (complex memory initialization, etc.), create specialized C startup code. Borlands C compilers are bundled with the startup code source. Simple embedded x86 geometries with fixed memory don't require adaptation of the startup code. Optimized startup code for MT25/NEC V25 is contained in LIB.ZIP (files c0x.obj)

  4. The TurboLocator relocation run: Apply EXELOC.EXE to the EXE file (+ map file). This can be done both using Console COMMAND LINE (syntax see below) or by using the comfortable WinMT/TurboLocator GUI frontend for Windows: Simply select the appropriate RAM and ROM geometries and the start segment addresses for code and data. The default start segment address for ROM code is "0x100000-ROMSIZE" (assuming that the ROM/FLASH is located at the top of the 1MB address space. The default start segment address for RAM code and/or variable data is 0x00040. The resulting addresses are reported by the locator log print. The output of the locator can be a flat ROM binary or a Intel .HEX-file for ROM/FLASH or a flat binary image for RAM/FLASH download.

  5. ROM code: Burn the binary or .HEX file to EPROM, ROM, FLASH using an EPROM burner etc.
    RAM code: Download .DLF files to the MT-computers or to other adapted target computers using the WinMT GUI Frontend.
    FLASH code: Download .FSH files using DLX/WinMT into the target computer
    (In case you need specialized download/debug firmware for your system cooperating with WinMT please contact us here: >>Services.)

The Locator EXELOC.EXE

The locator EXELOC processes a compiled and linked EXE-file, which was generated with the 16bit compilers Turbo C / Borland C, TurboPascal, TASM for usage in ROM or other flat memory geometries. EXELOC for ROM requires the MAP file in addition to the EXE file. Creation of the map file must be enabled on in your Compiler options for creating ROM/FLASH code. ROM and FLASH relocation: by default a reset vector is generated at FFFFH:0000H. The reset vector generation can be switch off by option /ROMX.
EXELOC recognizes automatically the type of compiler and treats the EXE file accordingly.
 

Usage of EXELOC (examples)

Most simple example for an EXELOC call:

     EXELOC TEST  

This uses the default parameters:

Target File type:    downloadable file  (.DLF)

EPROM Size:          32K                                    
RAM Size:            32K

Start seg. for code and data in RAM:     0040H

Output of successful EXELOC run:

C:\MT25\PAS\EXAMPLES>EXELOC TEST

EXELOC V2.0  TC++/BC++/TPascal Relocator for x86/NECVxx

relocating file  TEST.EXE -> TEST.DLF (Binary)

RAM Size    32K

Source is TPascal...

Code and Data segments start at     0040H     (para)

Code length (bytes):                 3040

Code + const data length (bytes):    3120     (required eprom size)

Data + min.stack lenght (bytes):     4784     (min. RAM size in eprom applic.)

Stack length (bytes):                4096

Remaining heap length (bytes):      23920

EXE-file relocation OK  

C:\MT25\PAS\EXAMPLES>

   

Other examples for calling EXELOC:

EXELOC myapp.exe

==> creates RAM download image "myapp.dlf" : RAM 32k: 0..0x7FFF ;  ROM:<DLX86 Loader>

EXELOC.EXE /ROM /HEX /ROMSIZE:512 /RAMSIZE:512 myapp.exe

==> creates ROM-Binary "myapp.BIN" and Intel HEX-File "myapp.HEX" ; RAM:0..0x7FFFF ;  ROM: 0x00008..0xFFFFF ; x86-Boot-Vector inserted at 0xFFFF0

EXELOC /ROMX /C:E000 /ROMSIZE:64 /D:1000 /RAMSIZE:64 myapp.exe

==> creates ROM-Binary myapp.BIN ; RAM:0x10000..0x1FFFF ; ROM: 0xE0000..0xEFFFF   No Boot-Vector inserted

     EXELOC demoA /ramsize:128

     EXELOC TEST /ROM /romsize:64 /ramsize:8  

     EXELOC TEST /FLASH /C:E000 /romsize:64 /ramsize:8  

==> creates FLASH dynamic downloadable binary for for <DLX86> Flash-Loader (which is located at 0xF0000..0xFFFFF); RAM:0x00000..0x01FFF ; User-FLASH-Area: 0xE0000..0xEFFFF No Boot-Vector

The Syntax of EXELOC

The syntax is:

  EXELOC exename [outputfile] [options]

options:

/ROM: ROM Code ( BIN or Intel HEX file ) will be created

/ROMSIZE: ROM-Size is set to x kB

/RAMSIZE: RAM-Size is set to x kB

/ROMX : Reset Vector is not inserted 

/HEX: Intel HEX file is created (default: BIN file)

/DLD:  DLF file is created (default)

/C: force code start segment to x

/D: force data start segment to x

/FLASH: Binary FlashRom download Code will be created

/V: verbose report for experts


<End of short documentation for TurboLocator>

>>TurboLocator Homepage.

 
>>Xellsoft Services
Custom Software Development

>>Xellsoft SynchronEX
Powerful File Synchronizer


Advertisement:

>>MT25: Embedded V25 
On board: 8xAD, RS485, ...
Optimized for measurement & control