LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Wed Mar 28 23:30:28 CEST 2007
    Subject: [cvs-checkins] MODIFIED: openfire2 ...
    Top
    Date: 00/07/03 28:23:30

    Added: openfire2/sw/crt Makefile crt-bram.s crt-sram-with-int.s
    crt-sram.s
    Log:



    Revision Changes Path
    1.1 openfire2/sw/crt/Makefile

    http://www.opencores.org/cvsweb.shtml/openfire2/sw/crt/Makefile?rev=1.1&content-type=text/x-cvsweb-markup

    Index: Makefile
    ===================================================================
    all:
    mb-as -a=crt-bram.lst -o crt-bram.o crt-bram.s
    mb-as -a=crt-sram.lst -o crt-sram.o crt-sram.s
    mb-as -a=crt-sram-with-int.lst -o crt-sram-with-int.o crt-sram-with-int.s

    clean:
    -rm *.o
    -rm *.out
    -rm *.bin
    -rm *.v
    -rm *.map
    -rm *.lst
    -rm *.bak
    -rm *.srec
    -rm *.prom
    -rm *.rom



    1.1 openfire2/sw/crt/crt-bram.s

    http://www.opencores.org/cvsweb.shtml/openfire2/sw/crt/crt-bram.s?rev=1.1&content-type=text/x-cvsweb-markup

    Index: crt-bram.s
    ===================================================================
    # crt.asm
    # C RunTime:
    # Used for initialization of small data
    # anchors and stack for programs compiled using
    # Xilinx Gnu Tools.
    # Used for initialization of user's bss area
    # All external and static variables are initialized

    /* Vector map (Interrupts, Exceptions, Breakpoints) */
    # # 0x00 # Jump to Start (reset vector)
    # # 0x04 # nop
    # # 0x08 # Imm instr for soft exception address [Hi halfword]
    # # 0x0c # Jump to sof Exception handler [Lo halfword]
    # # 0x10 # Imm instr for interrupt address [Hi halfword]
    # # 0x14 # Jump to interrupt handler [Lo halfword]
    # # 0x18 # nop - Reserved for breakpoint vector
    # # 0x1C # nop - Reserved for breakpoint vector
    # # 0x20 # Imm instr for hw exception address [Hi halfword]
    # # 0x24 # Jump instr to hw exception handler [Lo halfword]

    .globl _start

    .align 2
    .ent _start
    _start:
    bri _start1 # 0x00 # reset vector
    nop # 0x04
    nop # 0x08 # Reserve space for software exception vector
    nop # 0x0c
    nop # 0x10 # Reserve space for interrupt vector
    nop # 0x14
    nop # 0x18 # Reserve space for breakpoint vector
    nop # 0x1c
    nop # 0x18 # Reserve space for hw exception vector
    nop # 0x1c

    _start1: /* Set the Small Data Anchors and the Stack pointer */
    la r13, r0, _SDA_BASE_
    la r2, r0, _SDA2_BASE_
    la r1, r0, _STACK_START # stack is at end of block-ram

    _crtinit: /* clear sbss */
    addi r6,r0,__sbss_start /* SBSS beginning */
    addi r7,r0,__sbss_end /* SBSS end */
    rsub r18,r6,r7 /* Compare */
    blei r18,.Lendsbss
    .Lloopsbss:
    sw r0,r6,r0
    addi r6,r6,4
    rsub r18,r6,r7
    bgti r18,.Lloopsbss
    .Lendsbss: /* clear bss */
    addi r6,r0,__bss_start /* BSS beginning */
    addi r7,r0,__bss_end /* BSS end */
    rsub r18,r6,r7 /* Compare */
    blei r18,.Lendbss
    .Lloopbss:
    sw r0,r6,r0
    addi r6,r6,4
    rsub r18,r6,r7
    bgti r18,.Lloopbss
    .Lendbss:
    brlid r15,main # enter main program (ignoring parameters: r5, r6 & r7) nop # fall throught to exit .end _start .globl exit # exit library call .ent exit exit: bri exit .end exit 1.1 openfire2/sw/crt/crt-sram-with-int.s http://www.opencores.org/cvsweb.shtml/openfire2/sw/crt/crt-sram-with-int.s?rev=1.1&content-type=text/x-cvsweb-markup Index: crt-sram-with-int.s =================================================================== # crt.asm # C RunTime: # Used for initialization of small data # anchors and stack for programs compiled using # Xilinx Gnu Tools. # Used for initialization of user's bss area # All external and static variables are initialized .globl _start .align 2 .ent _start _start: la r1,r0,__interrupt_vector_reload /* move interrupt vector call */ lwi r2,r1,0 /* to the vector position in block ram */ swi r2,r0,0x10 lwi r2,r1,4 swi r2,r0,0x14 /* Set the Small Data Anchors and the Stack pointer */ la r13, r0, _SDA_BASE_ la r2, r0, _SDA2_BASE_ la r1, r0, 0x040e2000 # stack is at end of sram (before video ram) _crtinit: /* clear sbss */ addi r6,r0,__sbss_start /* SBSS beginning */ addi r7,r0,__sbss_end /* SBSS end */ rsub r18,r6,r7 /* Compare */ blei r18,.Lendsbss .Lloopsbss: sw r0,r6,r0 addi r6,r6,4 rsub r18,r6,r7 bgti r18,.Lloopsbss .Lendsbss: /* clear bss */ addi r6,r0,__bss_start /* BSS beginning */ addi r7,r0,__bss_end /* BSS end */ rsub r18,r6,r7 /* Compare */ blei r18,.Lendbss .Lloopbss: sw r0,r6,r0 addi r6,r6,4 rsub r18,r6,r7 bgti r18,.Lloopbss .Lendbss: brlid r15,main # enter main program (ignoring parameters: r5, r6 & r7) nop # fall throught to exit .end _start .globl exit # exit library call .ent exit exit: brai 0x0 # enter monitor again... .end exit __interrupt_vector_reload: brai interrupt_handler 1.1 openfire2/sw/crt/crt-sram.s http://www.opencores.org/cvsweb.shtml/openfire2/sw/crt/crt-sram.s?rev=1.1&content-type=text/x-cvsweb-markup Index: crt-sram.s =================================================================== # crt.asm # C RunTime: # Used for initialization of small data # anchors and stack for programs compiled using # Xilinx Gnu Tools. # Used for initialization of user's bss area # All external and static variables are initialized .globl _start .align 2 .ent _start _start: /* todo : initialize system vectors */ /* Set the Small Data Anchors and the Stack pointer */ la r13, r0, _SDA_BASE_ la r2, r0, _SDA2_BASE_ la r1, r0, _stack # stack is at end of heap _crtinit: /* clear sbss */ addi r6,r0,__sbss_start /* SBSS beginning */ addi r7,r0,__sbss_end /* SBSS end */ rsub r18,r6,r7 /* Compare */ blei r18,.Lendsbss .Lloopsbss: sw r0,r6,r0 addi r6,r6,4 rsub r18,r6,r7 bgti r18,.Lloopsbss .Lendsbss: /* clear bss */ addi r6,r0,__bss_start /* BSS beginning */ addi r7,r0,__bss_end /* BSS end */ rsub r18,r6,r7 /* Compare */ blei r18,.Lendbss .Lloopbss: sw r0,r6,r0 addi r6,r6,4 rsub r18,r6,r7 bgti r18,.Lloopbss .Lendbss: brlid r15,main # enter main program (ignoring parameters: r5, r6 & r7) nop # fall throught to exit .end _start .globl exit # exit library call .ent exit exit: brai 0x0 # enter monitor again... .end exit

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.