Search:

Support for PowerPC C compiler toolset

Frequently Asked Questions

This page contains answers to common questions handled by our customer support staff, along with some tips and tricks that we have found useful and presented here as questions.

Please consult the generic EDE FAQ for questions related to the Embedded Development Environment.

Categories:

TASKING PowerPC C/C++ Compiler Toolset


Does the PowerPC Compiler support EC++?

Yes, Version 2.0 of the PowerPC compiler does support EC++.


Does the PPC C/C++ Compiler provide hardware and software floating point packages? Conform to IEEE754?

The PowerPC Compiler toolset contains libraries that handle complex mathematics, both hardware and software floating point which conform to IEEE754, and C++ Classes (I/O streams).


What industry standard object module formats are created by the PPC C/C++ Compiler Toolset?

ELF/DWARF is the industry standard object module formats created by the PPC Compiler.


Does the PPC C/C++ Compiler Toolset provide a utility to convert the format of the object modules?

A utility is provided that will convert the object module format from ELF into hexadecimal so the program can be downloaded to EPROM or flash.


Does the PPC C/C++ Compiler support #pragma interrupt and pack directive?

Yes, it supports both #pragma interrupt and pack directive.


How does the PPC C/C++ Compiler support interrupt handling?

The TASKING PPC C/C++ Compiler supports the '_Interrupt' keyword to define a function as an interrupt function. The difference between a normal function and an interrupt function is that all registers are saved, not only the volatile registers, and the 'rfi' instruction is generated to return from interrupt.

To reduce interrupt processing overhead, floating point registers are not saved in 'Interrupt' functions. This is allowed because FP registers are typically not used in interrupt functions. The 'Save_fpvr_on_interrupt pragma is available to save floating point volatile registers on interrupt when necessary.


What C++ libraries are shipped with the compiler?

The I/O Streams library is shipped with the C/C++ compiler. A stream is a way to perform high-level data transfer operations with a consistent interface, regardless of the low-level representation of the data. C++ classes and functions for controlling program input and output are collectively referred to as stream I/O.


Stream classes support data input, converting sequences of bytes to typed objects; and data output, converting typed objects to sequences of bytes. In addition to conversions between characters and C++ data types, stream classes provide:


  • formatting control
  • error checking
  • control over the mode of operation (for file I/O)
  • buffering and control over the use of buffers

Every stream operation has a source and destination. The source may be the keyboard, a file, or a specified region of memory. The destination may be an external device such as a printer or the screen; or it may be a file or a specified region of memory.


Is access to special purpose registers (SPRs) available at the C/C++ language level?

Yes, for each derivative a library and associated include file exist that contains typedefinitions and access functions for all SPRs and memory mapped resisters. The typedef specifies the bitfields that costitue the register. For example the typedef for the machine status register (MSR) is:


Is it necessary to write your own startup routines and implement systems call (open, read, write, ..) before you can compile and execute your application?

No, the default startup code included with the PPC C/C++ compiler provides the necessary functionality for most cases. If you run your application under control of the CrossView Pro debugger, system calls preformed on the target can be simulated by CrossView Pro on the host system.


What memory model are supported by the PPC C/C++ compiler?

The compiler supports two memory models. By default the compiler treats calls as near calls, which means that the called procedure must be located within + or - 16MB of the call. When you specify option -MB (big memory model) the compiler treats calls as far calls. Three instructions are required for the far call, however the whole 4Gbyte address space can now be accessed.


How can I handle a memory mapped peripheral that used a different endianess than the processor?

You must write additional code that changes the byteorder, or assign the _Reversed_Endian type qualifier to a C variable. Variables of opposite endianness are byte-reversed at the time of access.

TASKING PowerPC CrossView Pro Debugger


What hardware (cable) is used for the BDM/JTAG connection?

The hardware used for the BDM/JTAG connection is a "wiggler".


Does the wiggler use a parallel or serial port?

The wiggler uses a parallel port.


What is PDI?

PDI is a Peripheral Debug Interface which describes the interface between the PPC instruction set simulator and the peripherals. This interface enables developers to provide simulation for any peripherals used in their application.


Does the PPC CrossView Pro Debugger provide trace capabilities?

The type of tracing supported depends upon the execution environment. Non real-time trace capability is the processor being single stepped at high speed.

Execution Environment Type of Tracing
CrossView Pro Simulator non-real time trace
CrossView Pro-EST visionICE real time trace
CrossView Pro-EST visionCONTROL non-real time trace
CrossView Pro BDM non-real time trace
CrossView Pro ROM monitor no tracing


What is File System Simulation?

File System Simulation supports all low level I/O calls. It enables the application on the target board to use system calls (such as open, read, write) which are handled by the host system file I/O system. It supports reading and writing from a disk file or a terminal. FSS also supports all data formats including binary. This allows a programmer to fully simulate all I/O behavior within the application before the availability of any hardware.

Simulated I/O allows input and output via a terminal or file and does not allow use of all functions available in the C library.

The following chart provides a comparison of File System Simulation and Simulated I/O:

FSS Simulated I/O
Supports all data formats Y N
Can use all I/O functions in C library Y N
Read/write to data file Y Y
Read/write to terminal Y Y
Requires modification to application N Y
Available for all execution environments Y Y
Optimized for high I/O throughput Y N
Supported system calls:
Read Y Y
Write Y Y
Open Y N
Close Y N
Unlink Y N
Stat Y N
Lseek Y N
Getcwd Y N
Chdir Y N
Access Y N
Rename Y N