OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [uIP_Demo_Rowley_ARM7/] [uip/] [crt0.asm] - Blame information for rev 583

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 583 jeremybenn
// Rowley C Compiler, runtime support.
2
//
3
// Copyright (c) 2001, 2002, 2003 Rowley Associates Limited.
4
//
5
// This file may be distributed under the terms of the License Agreement
6
// provided with this software.
7
//
8
// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
9
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10
 
11
; Create sections
12
        .data
13
        .bss
14
 
15
; Go to code section.
16
        .code
17
 
18
; Executed upon reset
19
__reset proc
20
 
21
; Turn off watchdog.  You can enable it in main() if required.
22
        mov.w   #0x5a80, &0x120
23
 
24
; Set up stack.
25
        mov.w   #RAM_Start_Address+RAM_Size, sp
26
 
27
; Copy from initialised data section to data section.
28
        mov.w   #SFB(IDATA0), r15
29
        mov.w   #data_init_begin, r14
30
        mov.w   #data_init_end-data_init_begin, r13
31
        call    #_memcpy
32
 
33
; Zero the bss.  Ensure the stack is not allocated in the bss!
34
        mov.w   #SFB(UDATA0), r15
35
        mov.w   #0, r14
36
        mov.w   #SFE(UDATA0)-SFB(UDATA0), r13
37
        call    #_memset
38
 
39
; Call user entry point void main(void).
40
        call    #_main
41
 
42
; If main() returns, kick off again.
43
        jmp     __reset
44
        endproc
45
 
46
; Heap data structures; removed by the linker if the heap isn't used.
47
        .break
48
        .data
49
        align   WORD
50
___heap_start__::
51
        DW      0
52
        DW      heap_size
53
        DS      heap_size-4
54
 
55
; Reset vector
56
        .vectors
57
        .keep
58
        org     0x1e
59
        dw      __reset
60
 
61
; Initialise the IDATA0 section by duplicating the contents into the
62
; CONST section and copying them on startup.
63
        .const
64
data_init_begin:
65
        .init  "IDATA0"
66
data_init_end:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.