Rational Apex Embedded Solaris to PowerPC Family Release Note for LynxOS This release note applies to Release 4.0.0 B of Rational Apex Ada 95/83 for LynxOS. Full instructions for using this product are provided in Programming for LynxOS.
This document contains only release notes specific to LynxOS cross-development. Release notes for the parts of this product that are also applicable to the native Apex product are provided in the Rational Apex Release Note.
Note: Starting with the 4.0.0 releases, the rada executable used to code Apex Embedded Ada views is the same executable shipped with the native product (Please check the native Apex patch descriptions for possible newer versions of rada).
Latest Release NoteThe "latest" Release Notes for LynxOS can be viewed on–line.
- Host and Target Specifications
- Documentation
- New Features in Release 4.0.0B
- Introduction to Cross-Development for LynxOS
- Special Considerations
- Installation Requirements
- Installing the LynxOS Cross Development System
- Installation For C/C++
- Installation For AXI Bindings
- Known Limitations
- Defects Resolved
Host and Target SpecificationsHost: Sun SPARC workstations running Solaris 2.6, Solaris 7, or Solaris 8.
Target: LynxOS 3.1.0, PowerPC CPU with patch set 010.
DocumentationDocuments specific to this product are:
Embedded Programming Guide for LynxOS
Release Note for LynxOS (this document)
Command Reference
Utilities GuideThese documents are available in online format. They can be accessed through the Help > Manuals command. Postscript versions of the documents can be printed using the Help > Print Manuals command.
New Features in Release 4.0.0BApex GUI and Command Line Features
Single Rada and apex_compiler_tool
Starting with the 4.0.0 releases, the rada executable used to code Apex Embedded Ada views is the same executable shipped with the native product (Please check the native Apex patch descriptions for possible newer versions of rada). The code generator apex_ada_cg_phase and optimizer apex_ada_optim_phase executables are not shared. The location of the rada, apex_ada_cg_phase and apex_ada_optim_phase executables are determined from the view the user is coding in. The apex_compiler_tool script can be used to determine the location of these tools. For example:
% apex_compiler_tool -show_tools /tools/rational/releases/apex.4.0.0b/sun4_solaris2/bin/rada /tools/rational/releases/apex_embedded.4.0/bin/power/lx/apex_ada_cg_phase /tools/rational/releases/apex_embedded.4.0/bin/power/lx/apex_ada_optim_phaseModel Description Files
Apex Embedded provides many $APEX_BASE/ada/model.ss views with each release. The view names can be long and their meaning can be obscure. To help make sense of the information encoded in the view name, each model is now shipped with a description file. The description files explain what the cryptic portions of the view name mean.
This description can be viewed from the command line by invoking the properties command with the -model_info option. The properties command can specify a model.ss view directly, or another view modeled on a model.ss view.
The description can also be viewed from the GUI. Dialogs that ask the user to select a model (e.g. File > New > New View) have a navigation icon next to the text field. Clicking the navigation icon displays the Model Navigator dialog. Once a specific model has been selected within the Model Navigator dialog, the model description file will be displayed in the "Information on selected model" section.
Run, Debug, Download, and Targets Dialogs
The following four dialogs have been combined into a single dialog.
- File > Run
- File > Debug
- File > Download
- Tools > Targets
Each function is still accessed via the menus above. Once the dialog appears, users can switch between the four functions by selecting tabs within the dialog.
Upgrade Release
The Control > Maintenance > Upgrade To New Release dialog and corresponding apex_upgrade script are part of the Apex Native product. Starting with the 4.0.0B Native Apex release, this dialog and script now work for Apex Embedded.
ClearCase Integration
Users can now link, run, and debug programs from within Clearcase.
New Source Release and apex_create_runtimes
Customers can purchase source releases of Apex Embedded products. These source releases include full source to $APEX_BASE/ada/*.ss/*.rel views (no API's) including the views used to create the runtime archives.
The File > New > New Source Release dialog can be used to make a copy of the entire set of views so that development work will not alter the installed product.
When doing development that effects the runtime archives, it can be difficult to determine what views need recoding, and what runtimes need re-linking after source code changes have been made. To simplify this process, we have created the apex_create_libraries command. The syntax of this command is simple. You point it at the directory containing links to all the runtimes archives (i.e. the directory identified by a model's RUNTIMES switch) and it takes care of coding views, and re-linking archives.
Ada Compilation System
Alignment of Types and Objects
The default alignment of types and objects has changed in Apex 4.0.0. Be aware that in the absence of representation clauses specifying the alignment of a type or object, the compiler is free to choose the optimal alignment with respect to performance. See the Apex native Release Notes for more details.
Runtime
POSIX_THREAD_PRIO_PROTECT
The Ada Runtime for Apex 4.0.0 has been migrated to POSIX 1.c under LynxOS 3.1.0.
The Rational Apex 3.2.0 Embedded Solaris to PowerPC for LynxOS product supports LynxOS 3.0.1. This version of LynxOS does not support the POSIX_THREAD_PRIO_PROTECT mutex locking protocol. As a result, Apex 3.2.0 implements protected objects compiled with pragma Locking_Policy (Ceiling_Locking) with a combination of PTHREAD_PRIO_NONE mutexes, which have no effect on thread (and therefore task) priority, and explicit priority change using pthread_setschedparam(). This is not fully compliant with the Ada real-time scheduling as specified by pragma Task_Dispatching_Policy (Fifo_Within_Priority), since explicit priority changes move the thread to the back of the scheduling queue for its priority, where loss of ceiling priority should leave it at the front of the queue. The result is that a task incorrectly yields the processor to other tasks of the same priority when completing a protected action.
The corresponding Apex 4.0.0B product supports LynxOS 3.1.0a which does support POSIX_THREAD_PRIO_PROTECT mutexes. The Apex 4.0.0 runtime for LynxOS has been modified to use these mutexes, eliminating explicit priority changes when completing a protected action. Loss of ceiling priority when unlocking a mutex using this policy leaves the thread at the head of the queue for its priority, as required by the Ada Fifo_Within_Priorities scheduling policy.
Asynchronous Task Control
Ada.Asynchronous_Task_Control, previously found in views in the Real_Time_Systems subsystem has been removed because it cannot be fully supported on a LynxOS target.
New Features in Release 3.2.0BAda Compiler
Apex 3.0.1 for embedded platforms included the package Language in the rational.ss subsystem. This package provides constants useful for interfacing to other language implementations on those platforms. For example, the prefix character added to link names by those language implementations.
The function of this package has been superseded by the Apex implementation of the Import, Export, Convention, and Calling_Convention pragmas. In particular, the compiler will treat the External_Name argument to the Import and Export pragmas as a name in the target language and perform the necessary modifications to that name to create the corresponding link name. Note that no modifications are made if the Link_Name parameter is used instead of External_Name.
These features make the Language package obsolete for the Apex embedded products. It has therefore been removed from 3.2.0 and later embedded releases.
Address Clauses
In embedded VADS programs Ada address clauses for with static addresses were represented by a linker group to prevent overlapping use of the memory associated with address clause variables. This feature is no longer supported by the Apex compiler. The Apex compiler allocates a pointer to the address specified in the address clause and all accesses to the variable are implemented as indirect references through this pointer.
In some circumstances the optimizer is able to optimize away the pointer and make references directly to the specified address. There is no mechanism to assure that the specified memory address isn't allocated by the linker to some other part of the user program.
Command-line Interface
For a complete description of the following commands see the Programmer's Guide.
New commands
Changed commands
The new version of apex_execute differs as follows:
- It has a -help option.
- It can take a -logical_target parameter (though if this parameter is not specified, the LOGICAL_TARGET_NAME switch for the enclosing view).
- It is written in apex shell, not cshell.
The new version of apex_simulator differs as follows:
- has a -help option.
- is written in apex shell, not cshell.
- has a -sim_file option which allows you to override the default selection.
- has a -logical option which allows you to map the simulator to a logical target as part of the apex_simulator command.
Removed commands
apex_add_target and apex_target_control have been replaced with the new commands mentioned above.
Debugger
The following debugger enhancements are now available:
- Target initiated debugger connection simplifies target configuration (removes the gdbserver port field in the target dialogs).
- Program Input/output that is identical to the rest of the Apex embedded product line.
- Asynchronous attach to a running program.
- Less intrusive debugging of tasking applications due to less interaction between the target and the debugger during normal operation.
- Serial debugging.
- Proxy debugging.
Attaching task entries to interrupts has been made operational on all architectures.
The LynxOS debugger can now attach onto a running process.
To use this feature you must first obtain the thread id of the running process. Logon to your LynxOS target and execute the following command.
> px xat
Now from the debugger dialog, specify the tid of your thread in the attach field provided.
You can also run the debugger from the command-line
$ apex_debug -a 15 hello
Runtime
The runtime for LynxOS is internally compatible with the other pthreads implementations. Although not user visible, this internal sharing provides a more reliable implementation of LynxOS with many bug fixes that have been leveraged from the other pthread environments (Solaris, HP, SGI, OSF, and AIX)
All of the runtime archive and predefined components have been compiled at optimization level 2 with the optimization objective set to space (instead of time). This provides the smallest footprint for embedded applications as well as the best performance.
Target Control
Target Control has been restructured for the 3.2.0B release. New target control gui implementation allows physical targets to be globally visible resources for a development team yet still allow individuals to reserve individual physical targets. Multiple targets can be manipulated from the same Apex session.
Please read the Target Control Chapter in the Programming Guide and refer to Getting Started.
Validation Testing
ACVC validation test suites are certified at optimization levels 0, 1 and 2 with optimization objective of SPACE.
Introduction to Cross-Development for LynxOSWith Apex, cross-development for a LynxOS target is almost identical to native Apex development. The primary difference is that the resulting executable code runs on a target machine which is different than the development machine.
The same Apex user interface is used for both native and cross development. Thus, editing, navigation, compiling, and even linking proceed using the same key and mouse sequences.
In order to run the target program, it must be copied to the target machine and executed there. Fortunately, Apex automates these steps, so the run and debug commands operate in virtually the same manner as they do for native development. Internally, of course, the commands perform additional steps.
When running your executable, Apex opens two xterms: one shows the progress of the steps required for execution, and the second logs in to the target. When the program has completed, you must enter Exit on the target xterm. You can then close the first xterm by entering Control-C.
Special ConsiderationsThere are some special considerations for LynxOS cross-development. These considerations arise from the fact that developing for LynxOS is cross-development, but the target is a full-featured OS with most UNIX features, rather than a processor board. LynxOS development shares characteristics of native and cross development.
- 1 . When running Apex tools, especially the debugger, remember that while the tool runs on the host, the resulting executable program runs on a different machine.
The most obvious instance of this is standard input and output. When using the debugger, the program actually writes its output on the target.
- 2 . Similarly, with LynxOS, the file system is on the target. For example, if your program opens and writes to a file named temp.tmp, the file is on the target.
For native development, the host is the same as the target, so the file ends up on the host system itself. For most versions of Apex cross, the target is a separate machine but the file system is simulated on the host. (This feature makes it easier to develop test software or diagnostic tools.) In either case, if you are used to developing with Apex, you may be used to having file I/O end up on the host system.
- 3 . The final link step uses the LynxOS cross-linker.
A third-party linker is invoked for LynxOS cross development. This technique allows the Apex user to use the target linker developed by the vendor and thereby maximize the compatibility with third-party and OS-specific libraries which are typically targeted to that linker. This is different from most Apex crosses, where Rational supplies an embedded linker.
The downside of this strategy is that some third-party linkers are not very helpful in diagnosing link-time problems. The Lynx cross-linker is no exception. Apex is able to diagnose problems only through the prelinking phase. The tools $APEX_LYNX_ROOT/usr/bin/nm and objdump are especially helpful in diagnosing link problems.
- 4 . Apex uses rcp to copy the executable to the LynxOS target. Thus, each developer must have a login on this target, along with rcp privileges.
- 5 . Apex logs onto your target machine using expect. This tool assumes that your login prompt on the target is "% ". If it does not recognize your prompt, run and debug will probably work, but with long delays. Setting your prompt to end in "% " will avoid delays.
Installation RequirementsTo develop code for a LynxOS target, you must have the following installed. Specific versions for these can be found in Host and Target Specifications
On the Host Machine
- Apex Ada 95/83 Sun SPARC Solaris.
- Apex Ada 95/83, Sun SPARC Solaris to LynxOS PowerPC (this product). This product is installed as an add-on to the native product.
- LynxOS Cross Development System for Sun SPARC Solaris, PowerPC target.
On the Target Machine
- LynxOS.
Debugger Daemon
In order to debug programs running under LynxOS, a special debug daemon must first be downloaded to your Lynx target. This daemon is called gdbserver.
Note: When upgrading to a new version of Apex a new gdbserver must be downloaded to your target. Apex/gdbserver's are version dependent.
The blueprint for copying gdbserver to your Lynx target is:
% apex_load_gdbserver LYNX_TARGET:REMOTE_SERVER_LOC/gdbserver
Replace LYNX_TARGET with the name (or IP address) of your Lynx target. Replace REMOTE_SERVER_LOC with a fully rooted path to the existing directory where you want to put the gdbserver. Then execute the command from an Apex shell.
Instructions for installing Apex tools are provided in the Installation Guide.
Note: You must have the Apex Solaris native product installed to use the LynxOS cross-development system. Install Apex native first.
When Apex for LynxOS is installed, the value for the environment variable $APEX_LYNX_ROOT is defined. Apex uses this variable to find components of the LynxOS Cross Development System. On LynxOS3.0.0, the usual value for $APEX_LYNX_ROOT is:
/usr/lynx/3.0.0/ppc/cdk/sunos-xcoff-ppc
Installing the LynxOS Cross Development SystemThere is one additional step specific to LynxOS development which must be completed. This step is the installation of the LynxOS Cross Development System. Apex uses its linker and the LynxOS system libraries.
Follow the instructions in the LynxOS documentation for doing this.
Remember that you are installing this on the Solaris host, not the LynxOS target. The Solaris host is the machine that the Lynx Guide calls the "Cross Development Machine." Install for the "ppc" target.
The root for installing the files is /usr/lynx/version/ppc -- the same as $APEX_LYNX_ROOT/../..
Install both the "LynxOS Development Image" (*.devos_tape.tar.gz) and the "Cross Development Image" (*.cdksol1.tar.gz) for SunOS on the host machine.
Installation For C/C++Apex supports the development of C/C++ code for LynxOS as a separately licensed feature
The optional C/C++ views and tools are selected during the installation dialog. No additional setup is necessary.
Installation For AXI BindingsAXI Bindings are provided to support development of X-Windows Applications. This is a separately licensed feature.
To install the bindings, select the optional Ada X Interface (AXI) product during the installation dialog.
One additional step is necessary. The LynxOS X11 libraries are required on the host in order to link. These can be copied from the Lynx distribution CD. On the CD, the support files for X-Windows development are found in:
/cdrom
/tar_images/*.x11r6_tape.tar.gz /cdrom
/tar_images/*.motif_tape.tar.gz
Expand the tar files (using gunzip or a similar utility) and then use tar to extract the libraries.
% cd /usr/lynx/3.0.1/ppc % tar xvfx11r6_file
\ usr/lib/libXmu.a \ usr/lib/libXext.a \ usr/lib/libX11.a \ usr/lib/libXt.a \ usr/lib/libSM.a \ usr/lib/libICE.a % tar xvfmotif_file
\ usr/lib/libMrm.a \ usr/lib/libXm.a \ usr/lib/libUil.a
Known LimitationsDue to a limitation introduced in LynxOS 3.1.0a, a predefined Ada exception such as Constraint_Error or Program_Error may cause corruption of nonvolatile floating point registers. We anticipate that a future patch to LynxOS will resolve this problem.
Control-C (^C) does not work from within the debugger.
In the Rational Apex 4.0 Embedded Solaris to PowerPC for LynxOS product, for loops may fail to terminate in certain situations. Bcopy, a subprogram internal to the runtime, does not preserve the value of the CTR register, which is used in optimized for loops. Calls to Bcopy are generated by the compiler to copy large objects, e.g. for record or array assignment. If one of these calls is made in the body of an optimized for loop, it may zero CTR, which prevents the loop from terminating.
The circumstances under which this will occur have not been completely characterized. They are rare, and have only been observed at optimization level two. The runtime fix addressing this problem was not available at the time of the release, and will be included in the first patch to this product.
Debugger
When using File > Debug, output is directed to an xterm. Make sure that you have an xterm executable on your path before starting your Apex session.
When debugging, the Input/Output window is replaced by a new one immediately upon program exit. Put a break at the last line of the program to preserve program output.
(Defect 127507) Running the debugger without first selecting a target under target control causes the debugger to fail. Workaround: Always run Tools > Target Control first.
Defects ResolvedProblems fixed in the base Apex product are listed in the release notes for the base product.
Refer to your product online documentation, Help > Manuals for the very latest updates to release notes.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |