ARM TMS570 Runtimes
-------------------

Runtimes Supported

   ZFP
   Ravenscar-SFP
   Ravenscar-Full

Targets Supported

   Hercules ARM Cortex-R4F 

System Clocks

   Clocks Configuration

   See package System.BB.Parameters (s-bbpara.ads) in the gnat directory for 
   the clock frequency. Note the system clock frequency must be between 100 KHz 
   and 1 GHz. 

Startup Code

   There are two assembly language files for the startup code, one each for 
   executing from RAM or ROM, plus a common file shared by both (e.g., that 
   starts the FPU). These are start-ram.S, start-rom.S, and common.S, 
   respectively. 

   When starting from ROM, the file sys_startup.S is used, and branches to an 
   entry defined in start-rom.S. The file sys_startup.S is generated from the 
   Ada file sys_startup_simple.adb and manually modified to issue the branch 
   instruction. 

   For the ZFP runtime the crt0.S file is used to initialize the vector table. 
   For the ravenscar-* runtimes, the code in package System.BB.CPU_Primitives 
   (gnat/s-bbcppr.adb) then installs GNAT-specific handlers that raise 
   exceptions for the traps. 

Interrupts

   The package Ada.Interrupts.Names is located in the gnat directory 
   (a-intnam.ads). 

   See the package body for System.BB.Board_Support (s-bbbosu.adb) in the gnat 
   directory for board configuration for interrupts. 

Memory Layout

   The memory layout is controlled by linker scripts selected by a scenario 
   variable named "Loader". This scenario variable is declared in an xml file 
   (runtime.xml) read by gprbuild automatically and used to define linker 
   switches. These switches specify the linker script corresponding to the 
   scenario value, as follows: 

       PROBE   : tms570.ld
       FLASH   : flash.ld
       MONITOR : monitor.ld
       HIRAM   : hiram.ld
       LORAM   : loram.ld

   That there is also a shared linker script named common.ld, used by the 
   flash.ld, hiram.ld, and monitor.ld scripts. 

   Note that the Ravenscar-SFP and Ravenscar-Full runtimes have slightly 
   different runtime.xml file content, for the sake of the libraries included 
   in the Ravenscar-Full runtime. 

   You can modify all of these scripts as required. Alternatively, these 
   scripts can be overridden at link time using the LDSCRIPT environment 
   variable. 

Resources Used

   The Ravenscar runtime libraries use RTI_Compare_Interrupt_3 interrupt to 
   implement Ada semantics for time, i.e., delay statements and package 
   Ada.Real_Time. See the package body for System.BB.Board_Support in the file 
   s-bbbosu.adb. 

   The runtime libraries provide a minimal version of package Ada.Text_IO 
   supporting character- and string-based input and output routines. The bodies 
   of the Ada.Text_IO routines call through to a device-specific I/O package 
   named System.Text_IO. See the package body in s-textio.adb. I/O goes through 
   the ARM Debug Control Channel (DCC) to the JTAG connector. 
