1/***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the MIT License which is available at
6 * https://opensource.org/licenses/MIT.
7 *
8 * SPDX-License-Identifier: MIT
9 **************************************************************************/
10
11
12/**************************************************************************/
13/**************************************************************************/
14/**                                                                       */
15/** ThreadX Component                                                     */
16/**                                                                       */
17/**   Initialize                                                          */
18/**                                                                       */
19/**************************************************************************/
20/**************************************************************************/
21
22    .arm
23
24    .global      _start
25    .global      __tx_undefined
26    .global      __tx_swi_interrupt
27    .global      __tx_prefetch_handler
28    .global      __tx_abort_handler
29    .global      __tx_reserved_handler
30    .global      __tx_irq_handler
31    .global      __tx_fiq_handler
32
33/* Define the vector area.  This should be located or copied to 0.  */
34
35    .text
36    .global __vectors
37__vectors:
38
39    LDR     pc, STARTUP                     // Reset goes to startup function
40    LDR     pc, UNDEFINED                   // Undefined handler
41    LDR     pc, SWI                         // Software interrupt handler
42    LDR     pc, PREFETCH                    // Prefetch exception handler
43    LDR     pc, ABORT                       // Abort exception handler
44    LDR     pc, RESERVED                    // Reserved exception handler
45    LDR     pc, IRQ                         // IRQ interrupt handler
46    LDR     pc, FIQ                         // FIQ interrupt handler
47
48STARTUP:
49    .word  _start                           // Reset goes to C startup function
50UNDEFINED:
51    .word  __tx_undefined                   // Undefined handler
52SWI:
53    .word  __tx_swi_interrupt               // Software interrupt handler
54PREFETCH:
55    .word  __tx_prefetch_handler            // Prefetch exception handler
56ABORT:
57    .word  __tx_abort_handler               // Abort exception handler
58RESERVED:
59    .word  __tx_reserved_handler            // Reserved exception handler
60IRQ:
61    .word  __tx_irq_handler                 // IRQ interrupt handler
62FIQ:
63    .word  __tx_fiq_handler                 // FIQ interrupt handler
64