Changeset 14f44a3 in ada-examples


Ignore:
Timestamp:
Oct 17, 2007, 8:55:06 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
ada-examples-4-10-branch, ada-examples-4-9-branch, master
Children:
36fcd41
Parents:
2059da6
Message:

2007-10-17 Joel Sherrill <joel.sherrill@…>

  • Makefile, Makefile.shared, rtems_init.c, irq_test/interrupt_pkg.adb, irq_test/interrupt_pkg.ads, irq_test/irqforce.c, irq_test/irqtest.adb, rootfs/etc/hosts: Adding new tests as improvements are made to the RTEMS port of the GNAT run-time.
  • empty/Makefile, empty/README, empty/empty.adb, hello_via_task/.cvsignore, hello_via_task/Makefile, hello_via_task/hello.adb, irq_test/.cvsignore, irq_test/Makefile, irq_test/README, irq_test_c/.cvsignore, irq_test_c/Makefile, irq_test_c/README, irq_test_c/init.c, irq_test_c/irqforce.c: New files.
Files:
14 added
9 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r2059da6 r14f44a3  
     12007-10-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile, Makefile.shared, rtems_init.c, irq_test/interrupt_pkg.adb,
     4        irq_test/interrupt_pkg.ads, irq_test/irqforce.c,
     5        irq_test/irqtest.adb, rootfs/etc/hosts: Adding new tests as
     6        improvements are made to the RTEMS port of the GNAT run-time.
     7        * empty/Makefile, empty/README, empty/empty.adb,
     8        hello_via_task/.cvsignore, hello_via_task/Makefile,
     9        hello_via_task/hello.adb, irq_test/.cvsignore, irq_test/Makefile,
     10        irq_test/README, irq_test_c/.cvsignore, irq_test_c/Makefile,
     11        irq_test_c/README, irq_test_c/init.c, irq_test_c/irqforce.c: New files.
     12
    1132007-09-28      Joel Sherrill <joel.sherrill@oarcorp.com>
    214
  • Makefile

    r2059da6 r14f44a3  
    77include $(RTEMS_ROOT)/make/directory.cfg
    88
    9 SUBDIRS=hello_world_ada delay_until stack_check
     9SUBDIRS=empty hello_world_ada hello_via_task delay_until stack_check
     10
     11ifeq ($(RTEMS_BSP),erc32)
     12  SUBDIRS += irq_test irq_test_c
     13endif
    1014
    1115ifeq ($(HAS_NETWORKING),yes)
    1216  SUBDIRS += dumpwebpage pingpong gen-soconn
    1317endif
    14 
  • Makefile.shared

    r2059da6 r14f44a3  
    44
    55# Tool helpers
    6 CARGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems $(CPU_CFLAGS)
     6CARGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs=bsp_specs -qrtems $(CPU_CFLAGS)
    77
    88# GEN5200 Specific Information
     
    2828endif
    2929
    30 all:  $(PROGRAM)
     30all:  $(PROGRAM).exe
    3131
    32 $(PROGRAM): rtems_init.o $(FILESYSTEM_OBJS) $(PROGRAM).adb
     32$(PROGRAM).exe: rtems_init.o $(FILESYSTEM_OBJS) $(PROGRAM).adb $(EXTRA_OBJS)
    3333        $(AS:as=gnatmake) -v $(EXTRA_GNATFLAGS) \
    34             -O -gnata -gnatE -gnato $(@) -g -I../src \
     34            -O -gnata -gnatE -gnato -g $(PROGRAM) -o $(@) \
    3535            -bargs -Mgnat_main \
    36             -largs $(CARGS) $(LINKARGS) rtems_init.o $(FILESYSTEM_OBJS)
     36            -largs $(CARGS) $(LINKARGS) rtems_init.o $(FILESYSTEM_OBJS) \
     37            $(EXTRA_OBJS)
    3738        $(SIZE) $(@)
    3839ifeq ($(RTEMS_BSP_FAMILY),pc386)
     
    4647        $(RTEMS_MAKEFILE_PATH)/build-tools/bin2boot -v $(@).bt $(HEADERADDR) \
    4748          $(START16FILE) $(START16ADDR) 0 $(@).bin $(RELOCADDR) 0
    48 else
     49        rm -f $(@).obj $(@).bin
    4950endif
    5051
    51 joel:
    52         echo $(NEED_ROOTFS_FOR_HOST_INFO)
    53 
    54 rtems_init.o: ../rtems_init.c $(FILESYSTEM_SRCS)
     52rtems_init.o: ../rtems_init.c ../networkconfig.h $(FILESYSTEM_SRCS)
    5553        $(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
    5654
  • irq_test/interrupt_pkg.adb

    r2059da6 r14f44a3  
    1313--  European Space Agency, 1999.
    1414--
     15--  The license and distribution terms for this file may be
     16--  found in the file LICENSE in this distribution or at
     17--  http://www.rtems.com/license/LICENSE.
     18--
     19--  $Id$
     20--
     21
    1522
    1623
     
    1825with System;
    1926with Ada.Text_IO;
     27with Ada.Real_Time; use Ada.Real_Time;
    2028
    2129package body Interrupt_pkg is
     
    2533   Protected_Priority : constant System.Interrupt_Priority :=
    2634     System.Interrupt_Priority'First;
     35
     36   Start_Time       : Ada.Real_Time.Time;
     37   Stop_Time        : Ada.Real_Time.Time;
    2738
    2839-- Protected object, including interrupt handler (Signal) and conditional entry.
     
    4253         BARRIER := LOW;
    4354      end Signal;
     55
    4456      entry Wait when (BARRIER = LOW) is
     57         Took : Time_Span;
    4558      begin
     59         Stop_Time := Ada.Real_Time.Clock;       
    4660         BARRIER := HIGH;
     61
     62         Took := Stop_Time - Start_Time;
     63         
     64         Ada.Text_IO.Put_line ( "Interrupt took: " &
     65          Duration'Image(To_Duration(Took)));
    4766      end Wait;
    4867   end Handler;
     
    5170
    5271   task sporadic is
    53       pragma Priority (8);
     72      pragma Priority (100);
    5473   end sporadic;
    5574
    5675   task body sporadic is
    57       Message : constant STRING :=
    58         "sporadic activated";
     76      Message : constant STRING := "sporadic activated";
    5977   begin
    6078      loop
    6179         Handler.Wait;
    62          Ada.Text_IO.Put_line (Message);
     80
    6381      end loop;
    6482   end sporadic;
     
    7088      pragma Import (C, irqforce, "irqforce");
    7189   begin
     90     
     91     Start_Time := Ada.Real_Time.Clock;       
     92     Stop_Time := Ada.Real_Time.Clock;       
     93     
     94     Ada.Text_IO.Put_line ( "Timer Overhead: " &
     95      Duration'Image(To_Duration(Stop_Time - Start_Time)));
     96
    7297     for i in 1..10 loop
     98       Start_Time := Ada.Real_Time.Clock;       
    7399       irqforce(1);
    74100       delay(0.05);
     
    81107begin
    82108
    83   itest;
     109  --  itest;
     110  NULL;
    84111
    85112end Interrupt_pkg;
  • irq_test/interrupt_pkg.ads

    r2059da6 r14f44a3  
     1--
     2--  The license and distribution terms for this file may be
     3--  found in the file LICENSE in this distribution or at
     4--  http://www.rtems.com/license/LICENSE.
     5--
     6--  $Id$
     7--
     8
    19package Interrupt_pkg is
    210  procedure itest;
  • irq_test/irqforce.c

    r2059da6 r14f44a3  
     1/*
     2 *  The license and distribution terms for this file may be
     3 *  found in the file LICENSE in this distribution or at
     4 *  http://www.rtems.com/license/LICENSE.
     5 *
     6 *  $Id$
     7 */
     8
    19#include <bsp.h>
    210
    3 irqforce(int irq)
     11void irqforce(int irq)
    412{
    513  ERC32_Unmask_interrupt(irq);
  • irq_test/irqtest.adb

    r2059da6 r14f44a3  
     1--
     2--  The license and distribution terms for this file may be
     3--  found in the file LICENSE in this distribution or at
     4--  http://www.rtems.com/license/LICENSE.
     5--
     6--  $Id$
     7--
     8
    19with Interrupt_pkg;
    210
    311procedure irqtest is
    412begin
    5   null;
     13  Interrupt_pkg.itest;
    614end irqtest;
    715
  • rootfs/etc/hosts

    r2059da6 r14f44a3  
    11127.0.0.1        localhost rtems
    2 192.168.1.244    rtems          # ip address of webserver
     2# 192.168.1.244  rtems          # ip address of webserver
  • rtems_init.c

    r2059da6 r14f44a3  
    176176    printk("Initializing Network\n");
    177177    rtems_bsdnet_initialize_network ();
     178    rtems_bsdnet_show_inet_routes ();
    178179  #endif
    179180
Note: See TracChangeset for help on using the changeset viewer.