Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Setting up a Project (Delphi 5/6/7) Setting up a Project (Delphi 2007) Compiling and Linking with On Time RTOS-32 |
Setting up a Project (Delphi 2007)On Time RTOS-32 programs are essentially Win32 console mode programs which are run through the locator RTLoc. Thus, setting up an On Time RTOS-32 project in Delphi is best done by creating a Win32 console project and running a "Make" command as a Post-Build-Event. The Make command will run locator RTLoc as well as any other commands required to build the project. A suitable makefile is included with all Delphi demos shipped with On Time RTOS-32. Here is an example from demo program Hello: # # Makefile to build the RTTarget-32 demo "Hello" # !ifndef RTTARGET RTTARGET_Not_Defined: @echo . @echo You must define environment variable RTTARGET to compile this example. @echo Run batch file VARSDEL.BAT in RTTarget-32's installation directory first !endif Hello: Hello.rtb Hello.exe: Hello.dpr DCC32 -v -GD -CC -M -U"$(RTTARGET)\Libdel" Hello.dpr Hello.rtb: Hello.exe Monitor.rtb Hello.rfg Demopc.cfg Rtloc Hello Demopc.cfg Hello.rfg Monitor.rtb: Monitor.cfg Demopc.cfg Rtloc -DBOOT Monitor Demopc.cfg Monitor.cfg BootDisk Monitor A: This makefile needs configuration files Hello.rfg, Demopc.cfg, and Monitor.cfg. To get started, it's easiest to copy these files from one of the Delphi demos shipped with On Time RTOS-32. For projects requiring a custom System DLL, that DLL should also be built by this make file. Please see the demo programs for examples. A sample main source file could look like this: PROGRAM Hello; {$APPTYPE CONSOLE} USES Rttarget, Windows; BEGIN WriteLn('Hello Delphi under RTTarget-32') END. In the project options, Directories/Conditionals, add Search Path $(RTTARGET)\Libdel. To start the Delphi IDE, invoke Delphi using RTTarget-32 utility Dbgshell: Dbgshell bsd.exe Hello.dproj Dbgshell will define environment variable RTTARGET, add $(RTTARGET)\Bin to the system Path, and configure the Delphi IDE integrated debugger to act as an RTTarget-32 cross debugger. Setting up a Project (Delphi 5/6/7)
|