[platform][stellaris] create a more standard vectab
This commit is contained in:
@@ -31,7 +31,7 @@ MODULE_SRCS += \
|
||||
$(LOCAL_DIR)/init.c \
|
||||
$(LOCAL_DIR)/debug.c \
|
||||
$(LOCAL_DIR)/timer.c \
|
||||
$(LOCAL_DIR)/startup_gcc.c \
|
||||
$(LOCAL_DIR)/vectab.c \
|
||||
|
||||
|
||||
# $(LOCAL_DIR)/debug.c \
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
//*****************************************************************************
|
||||
//
|
||||
// startup_gcc.c - Startup code for use with GNU tools.
|
||||
//
|
||||
// Copyright (c) 2012 Texas Instruments Incorporated. All rights reserved.
|
||||
// Software License Agreement
|
||||
//
|
||||
// Texas Instruments (TI) is supplying this software for use solely and
|
||||
// exclusively on TI's microcontroller products. The software is owned by
|
||||
// TI and/or its suppliers, and is protected under applicable copyright
|
||||
// laws. You may not combine this software with "viral" open-source
|
||||
// software in order to form a larger program.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
|
||||
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
|
||||
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
|
||||
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
|
||||
// DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
//
|
||||
// This is part of revision 9453 of the EK-LM4F120XL Firmware Package.
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
#include "inc/hw_nvic.h"
|
||||
#include "inc/hw_types.h"
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Forward declaration of the default fault handlers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
static void IntDefaultHandler(void);
|
||||
|
||||
extern void stellaris_uart_irq(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The vector table. Note that the proper constructs must be placed on this to
|
||||
// ensure that it ends up at physical address 0x0000.0000.
|
||||
//
|
||||
//*****************************************************************************
|
||||
__attribute__ ((section(".text.boot.vectab2")))
|
||||
void (* const g_pfnVectors[])(void) = {
|
||||
IntDefaultHandler, // GPIO Port A
|
||||
IntDefaultHandler, // GPIO Port B
|
||||
IntDefaultHandler, // GPIO Port C
|
||||
IntDefaultHandler, // GPIO Port D
|
||||
IntDefaultHandler, // GPIO Port E
|
||||
stellaris_uart_irq, // UART0 Rx and Tx
|
||||
IntDefaultHandler, // UART1 Rx and Tx
|
||||
IntDefaultHandler, // SSI0 Rx and Tx
|
||||
IntDefaultHandler, // I2C0 Master and Slave
|
||||
IntDefaultHandler, // PWM Fault
|
||||
IntDefaultHandler, // PWM Generator 0
|
||||
IntDefaultHandler, // PWM Generator 1
|
||||
IntDefaultHandler, // PWM Generator 2
|
||||
IntDefaultHandler, // Quadrature Encoder 0
|
||||
IntDefaultHandler, // ADC Sequence 0
|
||||
IntDefaultHandler, // ADC Sequence 1
|
||||
IntDefaultHandler, // ADC Sequence 2
|
||||
IntDefaultHandler, // ADC Sequence 3
|
||||
IntDefaultHandler, // Watchdog timer
|
||||
IntDefaultHandler, // Timer 0 subtimer A
|
||||
IntDefaultHandler, // Timer 0 subtimer B
|
||||
IntDefaultHandler, // Timer 1 subtimer A
|
||||
IntDefaultHandler, // Timer 1 subtimer B
|
||||
IntDefaultHandler, // Timer 2 subtimer A
|
||||
IntDefaultHandler, // Timer 2 subtimer B
|
||||
IntDefaultHandler, // Analog Comparator 0
|
||||
IntDefaultHandler, // Analog Comparator 1
|
||||
IntDefaultHandler, // Analog Comparator 2
|
||||
IntDefaultHandler, // System Control (PLL, OSC, BO)
|
||||
IntDefaultHandler, // FLASH Control
|
||||
IntDefaultHandler, // GPIO Port F
|
||||
IntDefaultHandler, // GPIO Port G
|
||||
IntDefaultHandler, // GPIO Port H
|
||||
IntDefaultHandler, // UART2 Rx and Tx
|
||||
IntDefaultHandler, // SSI1 Rx and Tx
|
||||
IntDefaultHandler, // Timer 3 subtimer A
|
||||
IntDefaultHandler, // Timer 3 subtimer B
|
||||
IntDefaultHandler, // I2C1 Master and Slave
|
||||
IntDefaultHandler, // Quadrature Encoder 1
|
||||
IntDefaultHandler, // CAN0
|
||||
IntDefaultHandler, // CAN1
|
||||
IntDefaultHandler, // CAN2
|
||||
IntDefaultHandler, // Ethernet
|
||||
IntDefaultHandler, // Hibernate
|
||||
IntDefaultHandler, // USB0
|
||||
IntDefaultHandler, // PWM Generator 3
|
||||
IntDefaultHandler, // uDMA Software Transfer
|
||||
IntDefaultHandler, // uDMA Error
|
||||
IntDefaultHandler, // ADC1 Sequence 0
|
||||
IntDefaultHandler, // ADC1 Sequence 1
|
||||
IntDefaultHandler, // ADC1 Sequence 2
|
||||
IntDefaultHandler, // ADC1 Sequence 3
|
||||
IntDefaultHandler, // I2S0
|
||||
IntDefaultHandler, // External Bus Interface 0
|
||||
IntDefaultHandler, // GPIO Port J
|
||||
IntDefaultHandler, // GPIO Port K
|
||||
IntDefaultHandler, // GPIO Port L
|
||||
IntDefaultHandler, // SSI2 Rx and Tx
|
||||
IntDefaultHandler, // SSI3 Rx and Tx
|
||||
IntDefaultHandler, // UART3 Rx and Tx
|
||||
IntDefaultHandler, // UART4 Rx and Tx
|
||||
IntDefaultHandler, // UART5 Rx and Tx
|
||||
IntDefaultHandler, // UART6 Rx and Tx
|
||||
IntDefaultHandler, // UART7 Rx and Tx
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
IntDefaultHandler, // I2C2 Master and Slave
|
||||
IntDefaultHandler, // I2C3 Master and Slave
|
||||
IntDefaultHandler, // Timer 4 subtimer A
|
||||
IntDefaultHandler, // Timer 4 subtimer B
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
IntDefaultHandler, // Timer 5 subtimer A
|
||||
IntDefaultHandler, // Timer 5 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 0 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 0 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 1 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 1 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 2 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 2 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 3 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 3 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 4 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 4 subtimer B
|
||||
IntDefaultHandler, // Wide Timer 5 subtimer A
|
||||
IntDefaultHandler, // Wide Timer 5 subtimer B
|
||||
IntDefaultHandler, // FPU
|
||||
IntDefaultHandler, // PECI 0
|
||||
IntDefaultHandler, // LPC 0
|
||||
IntDefaultHandler, // I2C4 Master and Slave
|
||||
IntDefaultHandler, // I2C5 Master and Slave
|
||||
IntDefaultHandler, // GPIO Port M
|
||||
IntDefaultHandler, // GPIO Port N
|
||||
IntDefaultHandler, // Quadrature Encoder 2
|
||||
IntDefaultHandler, // Fan 0
|
||||
0, // Reserved
|
||||
IntDefaultHandler, // GPIO Port P (Summary or P0)
|
||||
IntDefaultHandler, // GPIO Port P1
|
||||
IntDefaultHandler, // GPIO Port P2
|
||||
IntDefaultHandler, // GPIO Port P3
|
||||
IntDefaultHandler, // GPIO Port P4
|
||||
IntDefaultHandler, // GPIO Port P5
|
||||
IntDefaultHandler, // GPIO Port P6
|
||||
IntDefaultHandler, // GPIO Port P7
|
||||
IntDefaultHandler, // GPIO Port Q (Summary or Q0)
|
||||
IntDefaultHandler, // GPIO Port Q1
|
||||
IntDefaultHandler, // GPIO Port Q2
|
||||
IntDefaultHandler, // GPIO Port Q3
|
||||
IntDefaultHandler, // GPIO Port Q4
|
||||
IntDefaultHandler, // GPIO Port Q5
|
||||
IntDefaultHandler, // GPIO Port Q6
|
||||
IntDefaultHandler, // GPIO Port Q7
|
||||
IntDefaultHandler, // GPIO Port R
|
||||
IntDefaultHandler, // GPIO Port S
|
||||
IntDefaultHandler, // PWM 1 Generator 0
|
||||
IntDefaultHandler, // PWM 1 Generator 1
|
||||
IntDefaultHandler, // PWM 1 Generator 2
|
||||
IntDefaultHandler, // PWM 1 Generator 3
|
||||
IntDefaultHandler // PWM 1 Fault
|
||||
};
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// This is the code that gets called when the processor receives an unexpected
|
||||
// interrupt. This simply enters an infinite loop, preserving the system state
|
||||
// for examination by a debugger.
|
||||
//
|
||||
//*****************************************************************************
|
||||
static void
|
||||
IntDefaultHandler(void)
|
||||
{
|
||||
//
|
||||
// Go into an infinite loop.
|
||||
//
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
179
platform/stellaris/vectab.c
Normal file
179
platform/stellaris/vectab.c
Normal file
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Travis Geiselbrecht
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <debug.h>
|
||||
#include <compiler.h>
|
||||
#include <arch/arm/cm.h>
|
||||
|
||||
/* un-overridden irq handler */
|
||||
void stellaris_dummy_irq(void)
|
||||
{
|
||||
arm_cm_irq_entry();
|
||||
|
||||
panic("unhandled irq\n");
|
||||
}
|
||||
|
||||
extern void stellaris_uart_irq(void);
|
||||
|
||||
const void * const __SECTION(".text.boot.vectab2") vectab2[] = {
|
||||
stellaris_dummy_irq, // GPIO Port A
|
||||
stellaris_dummy_irq, // GPIO Port B
|
||||
stellaris_dummy_irq, // GPIO Port C
|
||||
stellaris_dummy_irq, // GPIO Port D
|
||||
stellaris_dummy_irq, // GPIO Port E
|
||||
stellaris_uart_irq, // UART0 Rx and Tx
|
||||
stellaris_dummy_irq, // UART1 Rx and Tx
|
||||
stellaris_dummy_irq, // SSI0 Rx and Tx
|
||||
stellaris_dummy_irq, // I2C0 Master and Slave
|
||||
stellaris_dummy_irq, // PWM Fault
|
||||
stellaris_dummy_irq, // PWM Generator 0
|
||||
stellaris_dummy_irq, // PWM Generator 1
|
||||
stellaris_dummy_irq, // PWM Generator 2
|
||||
stellaris_dummy_irq, // Quadrature Encoder 0
|
||||
stellaris_dummy_irq, // ADC Sequence 0
|
||||
stellaris_dummy_irq, // ADC Sequence 1
|
||||
stellaris_dummy_irq, // ADC Sequence 2
|
||||
stellaris_dummy_irq, // ADC Sequence 3
|
||||
stellaris_dummy_irq, // Watchdog timer
|
||||
stellaris_dummy_irq, // Timer 0 subtimer A
|
||||
stellaris_dummy_irq, // Timer 0 subtimer B
|
||||
stellaris_dummy_irq, // Timer 1 subtimer A
|
||||
stellaris_dummy_irq, // Timer 1 subtimer B
|
||||
stellaris_dummy_irq, // Timer 2 subtimer A
|
||||
stellaris_dummy_irq, // Timer 2 subtimer B
|
||||
stellaris_dummy_irq, // Analog Comparator 0
|
||||
stellaris_dummy_irq, // Analog Comparator 1
|
||||
stellaris_dummy_irq, // Analog Comparator 2
|
||||
stellaris_dummy_irq, // System Control (PLL, OSC, BO)
|
||||
stellaris_dummy_irq, // FLASH Control
|
||||
stellaris_dummy_irq, // GPIO Port F
|
||||
stellaris_dummy_irq, // GPIO Port G
|
||||
stellaris_dummy_irq, // GPIO Port H
|
||||
stellaris_dummy_irq, // UART2 Rx and Tx
|
||||
stellaris_dummy_irq, // SSI1 Rx and Tx
|
||||
stellaris_dummy_irq, // Timer 3 subtimer A
|
||||
stellaris_dummy_irq, // Timer 3 subtimer B
|
||||
stellaris_dummy_irq, // I2C1 Master and Slave
|
||||
stellaris_dummy_irq, // Quadrature Encoder 1
|
||||
stellaris_dummy_irq, // CAN0
|
||||
stellaris_dummy_irq, // CAN1
|
||||
stellaris_dummy_irq, // CAN2
|
||||
stellaris_dummy_irq, // Ethernet
|
||||
stellaris_dummy_irq, // Hibernate
|
||||
stellaris_dummy_irq, // USB0
|
||||
stellaris_dummy_irq, // PWM Generator 3
|
||||
stellaris_dummy_irq, // uDMA Software Transfer
|
||||
stellaris_dummy_irq, // uDMA Error
|
||||
stellaris_dummy_irq, // ADC1 Sequence 0
|
||||
stellaris_dummy_irq, // ADC1 Sequence 1
|
||||
stellaris_dummy_irq, // ADC1 Sequence 2
|
||||
stellaris_dummy_irq, // ADC1 Sequence 3
|
||||
stellaris_dummy_irq, // I2S0
|
||||
stellaris_dummy_irq, // External Bus Interface 0
|
||||
stellaris_dummy_irq, // GPIO Port J
|
||||
stellaris_dummy_irq, // GPIO Port K
|
||||
stellaris_dummy_irq, // GPIO Port L
|
||||
stellaris_dummy_irq, // SSI2 Rx and Tx
|
||||
stellaris_dummy_irq, // SSI3 Rx and Tx
|
||||
stellaris_dummy_irq, // UART3 Rx and Tx
|
||||
stellaris_dummy_irq, // UART4 Rx and Tx
|
||||
stellaris_dummy_irq, // UART5 Rx and Tx
|
||||
stellaris_dummy_irq, // UART6 Rx and Tx
|
||||
stellaris_dummy_irq, // UART7 Rx and Tx
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
stellaris_dummy_irq, // I2C2 Master and Slave
|
||||
stellaris_dummy_irq, // I2C3 Master and Slave
|
||||
stellaris_dummy_irq, // Timer 4 subtimer A
|
||||
stellaris_dummy_irq, // Timer 4 subtimer B
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
stellaris_dummy_irq, // Timer 5 subtimer A
|
||||
stellaris_dummy_irq, // Timer 5 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 0 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 0 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 1 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 1 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 2 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 2 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 3 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 3 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 4 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 4 subtimer B
|
||||
stellaris_dummy_irq, // Wide Timer 5 subtimer A
|
||||
stellaris_dummy_irq, // Wide Timer 5 subtimer B
|
||||
stellaris_dummy_irq, // FPU
|
||||
stellaris_dummy_irq, // PECI 0
|
||||
stellaris_dummy_irq, // LPC 0
|
||||
stellaris_dummy_irq, // I2C4 Master and Slave
|
||||
stellaris_dummy_irq, // I2C5 Master and Slave
|
||||
stellaris_dummy_irq, // GPIO Port M
|
||||
stellaris_dummy_irq, // GPIO Port N
|
||||
stellaris_dummy_irq, // Quadrature Encoder 2
|
||||
stellaris_dummy_irq, // Fan 0
|
||||
0, // Reserved
|
||||
stellaris_dummy_irq, // GPIO Port P (Summary or P0)
|
||||
stellaris_dummy_irq, // GPIO Port P1
|
||||
stellaris_dummy_irq, // GPIO Port P2
|
||||
stellaris_dummy_irq, // GPIO Port P3
|
||||
stellaris_dummy_irq, // GPIO Port P4
|
||||
stellaris_dummy_irq, // GPIO Port P5
|
||||
stellaris_dummy_irq, // GPIO Port P6
|
||||
stellaris_dummy_irq, // GPIO Port P7
|
||||
stellaris_dummy_irq, // GPIO Port Q (Summary or Q0)
|
||||
stellaris_dummy_irq, // GPIO Port Q1
|
||||
stellaris_dummy_irq, // GPIO Port Q2
|
||||
stellaris_dummy_irq, // GPIO Port Q3
|
||||
stellaris_dummy_irq, // GPIO Port Q4
|
||||
stellaris_dummy_irq, // GPIO Port Q5
|
||||
stellaris_dummy_irq, // GPIO Port Q6
|
||||
stellaris_dummy_irq, // GPIO Port Q7
|
||||
stellaris_dummy_irq, // GPIO Port R
|
||||
stellaris_dummy_irq, // GPIO Port S
|
||||
stellaris_dummy_irq, // PWM 1 Generator 0
|
||||
stellaris_dummy_irq, // PWM 1 Generator 1
|
||||
stellaris_dummy_irq, // PWM 1 Generator 2
|
||||
stellaris_dummy_irq, // PWM 1 Generator 3
|
||||
stellaris_dummy_irq // PWM 1 Fault
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user