summaryrefslogtreecommitdiff
path: root/ports/cortex_a12/gnu/example_build/reset.S
blob: f2e0522b46c8daf71310d31babdbe4e2fa20ded2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/***************************************************************************
 * Copyright (c) 2024 Microsoft Corporation
 * Copyright (c) 2026-present Eclipse ThreadX contributors
 *
 * This program and the accompanying materials are made available under the
 * terms of the MIT License which is available at
 * https://opensource.org/licenses/MIT.
 *
 * SPDX-License-Identifier: MIT
 **************************************************************************/


/**************************************************************************/
/**************************************************************************/
/**                                                                       */
/** ThreadX Component                                                     */
/**                                                                       */
/**   Initialize                                                          */
/**                                                                       */
/**************************************************************************/
/**************************************************************************/

    .arm

    .global      _start
    .global      __tx_undefined
    .global      __tx_swi_interrupt
    .global      __tx_prefetch_handler
    .global      __tx_abort_handler
    .global      __tx_reserved_handler
    .global      __tx_irq_handler
    .global      __tx_fiq_handler

/* Define the vector area.  This should be located or copied to 0.  */

    .text
    .global __vectors
__vectors:

    LDR     pc, STARTUP                     // Reset goes to startup function
    LDR     pc, UNDEFINED                   // Undefined handler
    LDR     pc, SWI                         // Software interrupt handler
    LDR     pc, PREFETCH                    // Prefetch exception handler
    LDR     pc, ABORT                       // Abort exception handler
    LDR     pc, RESERVED                    // Reserved exception handler
    LDR     pc, IRQ                         // IRQ interrupt handler
    LDR     pc, FIQ                         // FIQ interrupt handler

STARTUP:
    .word  _start                           // Reset goes to C startup function
UNDEFINED:
    .word  __tx_undefined                   // Undefined handler
SWI:
    .word  __tx_swi_interrupt               // Software interrupt handler
PREFETCH:
    .word  __tx_prefetch_handler            // Prefetch exception handler
ABORT:
    .word  __tx_abort_handler               // Abort exception handler
RESERVED:
    .word  __tx_reserved_handler            // Reserved exception handler
IRQ:
    .word  __tx_irq_handler                 // IRQ interrupt handler
FIQ:
    .word  __tx_fiq_handler                 // FIQ interrupt handler