Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Running Demos with Command Line Tools Running Demos in Microsoft Visual Studio Running Demos in the Borland Delphi IDE Using a Standard PC as a Target Using a Standard PC as a Target for GUI Demos Using the AMD Élan SC400 Evaluation Board Using the AMD Élan SC520 Evaluation Board Using the RTOS32Win Virtual Target Using the Real-Time Hypervisor Target Program FTPLoader Compiling and Linking with On Time RTOS-32 |
Program FTPLoaderDemo program FTPLoader demonstrates using function RTBootPM. FTPLoader first checks whether a bootable application .bin file is present on the target. If so, this .bin file is loaded and execute through RTBootPM. Otherwise, an FTP server is started to allow a new boot image to be uploaded. Once such an image is present and all FTP sessions have terminated, the new image is loaded and executed. In this example, the child program to be invoked by FTPLoader is called Application.exe. It also includes the FTP server, so a new image of the application can also be uploaded while the application is running. In addition, program FTPLoader and Application maintain a boot status file (C:\BootState.ini) to keep track of whether the last boot attempt was successful. If not, FTPLoader will revert back to a previously saved "known good image" .bin file. In a real application scenario, program FTPLoader would be installed as the boot program using utility BootDisk. The actual application would reside in Application.bin which could be uploaded via FTP at any time to update the application. Through the help of the BootState.ini file, the target would never get into an unbootable state as the boot image of FTPLoader is never changed and the last good application image is always available, even if a buggy image is accidentally uploaded. This demo can be built in three different configurations:
The command line versions of this demo build configurations Debug Loader and Debug App. The Visual Studio workspace/solution/project files for this demo define 3 projects and 3 different configurations as described above. To build the complete workspace/solution, select project Target as the Startup/Active project. In the project settings of project Target, property Debugging, Command, enter Debug\FTPLoader.exe for configuration Debug Loader and Debug\Application.exe for configuration Debug App. This demo requires at least On Time RTOS-32 components RTTarget-32, RTKernel-32, RTFiles-32, RTIP-32, and FTP Client/Server.
|