[bsp] Add IAR EWARM project template for SCONS project auto generation.
This commit is contained in:
parent
d1a4f2e8fe
commit
b21c35df63
|
@ -61,6 +61,7 @@ extern void HardFault_Handler(void);
|
||||||
*/
|
*/
|
||||||
void rt_hw_board_init()
|
void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
|
MAP_IntMasterDisable();
|
||||||
IntRegister(FAULT_HARD, HardFault_Handler);
|
IntRegister(FAULT_HARD, HardFault_Handler);
|
||||||
IntRegister(FAULT_PENDSV, PendSV_Handler);
|
IntRegister(FAULT_PENDSV, PendSV_Handler);
|
||||||
IntRegister(FAULT_SYSTICK, SysTick_Handler);
|
IntRegister(FAULT_SYSTICK, SysTick_Handler);
|
||||||
|
@ -87,7 +88,7 @@ void rt_hw_board_init()
|
||||||
MAP_SysTickEnable();
|
MAP_SysTickEnable();
|
||||||
|
|
||||||
/* set pend exception priority */
|
/* set pend exception priority */
|
||||||
IntPrioritySet(FAULT_PENDSV, (1 << 5) - 1);
|
//IntPrioritySet(FAULT_PENDSV, (1 << 5) - 1);
|
||||||
|
|
||||||
/*init uart device*/
|
/*init uart device*/
|
||||||
rt_hw_uart_init();
|
rt_hw_uart_init();
|
||||||
|
|
|
@ -36,7 +36,7 @@ typedef struct hw_uart_device
|
||||||
|
|
||||||
static rt_err_t hw_configure(struct rt_serial_device *serial, struct serial_configure *cfg)
|
static rt_err_t hw_configure(struct rt_serial_device *serial, struct serial_configure *cfg)
|
||||||
{
|
{
|
||||||
uint32_t config;
|
uint32_t config = 0;
|
||||||
hw_uart_t* uart;
|
hw_uart_t* uart;
|
||||||
RT_ASSERT(serial != RT_NULL);
|
RT_ASSERT(serial != RT_NULL);
|
||||||
uart = mUartGetHwPtr(serial);
|
uart = mUartGetHwPtr(serial);
|
||||||
|
@ -206,7 +206,7 @@ int rt_hw_uart_init(void)
|
||||||
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||||
|
|
||||||
/* preemption = 1, sub-priority = 1 */
|
/* preemption = 1, sub-priority = 1 */
|
||||||
IntPrioritySet(INT_UART0, ((0x01 << 5) | 0x01));
|
//IntPrioritySet(INT_UART0, ((0x01 << 5) | 0x01));
|
||||||
|
|
||||||
/* Enable Interrupt for UART channel */
|
/* Enable Interrupt for UART channel */
|
||||||
UARTIntRegister(uart->hw_base, UART0_IRQHandler);
|
UARTIntRegister(uart->hw_base, UART0_IRQHandler);
|
||||||
|
|
|
@ -50,7 +50,10 @@ static void IntDefaultHandler(void);
|
||||||
//
|
//
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
extern void __iar_program_start(void);
|
extern void __iar_program_start(void);
|
||||||
|
extern void PendSV_Handler(void);
|
||||||
|
extern void SysTick_Handler(void);
|
||||||
|
extern void UART0_IRQHandler(void);
|
||||||
|
extern void HardFault_Handler(void);
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
//
|
//
|
||||||
// Reserve space for the system stack.
|
// Reserve space for the system stack.
|
||||||
|
@ -84,7 +87,7 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
|
||||||
// The initial stack pointer
|
// The initial stack pointer
|
||||||
ResetISR, // The reset handler
|
ResetISR, // The reset handler
|
||||||
NmiSR, // The NMI handler
|
NmiSR, // The NMI handler
|
||||||
FaultISR, // The hard fault handler
|
HardFault_Handler, // The hard fault handler
|
||||||
IntDefaultHandler, // The MPU fault handler
|
IntDefaultHandler, // The MPU fault handler
|
||||||
IntDefaultHandler, // The bus fault handler
|
IntDefaultHandler, // The bus fault handler
|
||||||
IntDefaultHandler, // The usage fault handler
|
IntDefaultHandler, // The usage fault handler
|
||||||
|
@ -95,14 +98,14 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
|
||||||
IntDefaultHandler, // SVCall handler
|
IntDefaultHandler, // SVCall handler
|
||||||
IntDefaultHandler, // Debug monitor handler
|
IntDefaultHandler, // Debug monitor handler
|
||||||
0, // Reserved
|
0, // Reserved
|
||||||
IntDefaultHandler, // The PendSV handler
|
PendSV_Handler, //IntDefaultHandler, // The PendSV handler
|
||||||
IntDefaultHandler, // The SysTick handler
|
SysTick_Handler,//IntDefaultHandler, // The SysTick handler
|
||||||
IntDefaultHandler, // GPIO Port A
|
IntDefaultHandler, // GPIO Port A
|
||||||
IntDefaultHandler, // GPIO Port B
|
IntDefaultHandler, // GPIO Port B
|
||||||
IntDefaultHandler, // GPIO Port C
|
IntDefaultHandler, // GPIO Port C
|
||||||
IntDefaultHandler, // GPIO Port D
|
IntDefaultHandler, // GPIO Port D
|
||||||
IntDefaultHandler, // GPIO Port E
|
IntDefaultHandler, // GPIO Port E
|
||||||
IntDefaultHandler, // UART0 Rx and Tx
|
UART0_IRQHandler, //IntDefaultHandler, // UART0 Rx and Tx
|
||||||
IntDefaultHandler, // UART1 Rx and Tx
|
IntDefaultHandler, // UART1 Rx and Tx
|
||||||
IntDefaultHandler, // SSI0 Rx and Tx
|
IntDefaultHandler, // SSI0 Rx and Tx
|
||||||
IntDefaultHandler, // I2C0 Master and Slave
|
IntDefaultHandler, // I2C0 Master and Slave
|
||||||
|
|
|
@ -45,6 +45,8 @@ extern int main(void);
|
||||||
|
|
||||||
extern void SysTick_Handler(void);
|
extern void SysTick_Handler(void);
|
||||||
extern void PendSV_Handler(void);
|
extern void PendSV_Handler(void);
|
||||||
|
extern void UART0_IRQHandler(void);
|
||||||
|
extern void HardFault_Handler(void);
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
//
|
//
|
||||||
// Reserve space for the system stack.
|
// Reserve space for the system stack.
|
||||||
|
@ -65,7 +67,7 @@ void (* const g_pfnVectors[])(void) =
|
||||||
// The initial stack pointer
|
// The initial stack pointer
|
||||||
ResetISR, // The reset handler
|
ResetISR, // The reset handler
|
||||||
NmiSR, // The NMI handler
|
NmiSR, // The NMI handler
|
||||||
FaultISR, // The hard fault handler
|
HardFault_Handler, // The hard fault handler
|
||||||
IntDefaultHandler, // The MPU fault handler
|
IntDefaultHandler, // The MPU fault handler
|
||||||
IntDefaultHandler, // The bus fault handler
|
IntDefaultHandler, // The bus fault handler
|
||||||
IntDefaultHandler, // The usage fault handler
|
IntDefaultHandler, // The usage fault handler
|
||||||
|
@ -83,7 +85,7 @@ void (* const g_pfnVectors[])(void) =
|
||||||
IntDefaultHandler, // GPIO Port C
|
IntDefaultHandler, // GPIO Port C
|
||||||
IntDefaultHandler, // GPIO Port D
|
IntDefaultHandler, // GPIO Port D
|
||||||
IntDefaultHandler, // GPIO Port E
|
IntDefaultHandler, // GPIO Port E
|
||||||
IntDefaultHandler, // UART0 Rx and Tx
|
UART0_IRQHandler, // UART0 Rx and Tx
|
||||||
IntDefaultHandler, // UART1 Rx and Tx
|
IntDefaultHandler, // UART1 Rx and Tx
|
||||||
IntDefaultHandler, // SSI0 Rx and Tx
|
IntDefaultHandler, // SSI0 Rx and Tx
|
||||||
IntDefaultHandler, // I2C0 Master and Slave
|
IntDefaultHandler, // I2C0 Master and Slave
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
|
||||||
|
<workspace>
|
||||||
|
<project>
|
||||||
|
<path>$WS_DIR$\template.ewp</path>
|
||||||
|
</project>
|
||||||
|
<batchBuild/>
|
||||||
|
</workspace>
|
||||||
|
|
||||||
|
|
|
@ -76,3 +76,5 @@ place at start of SRAM { section VTABLE };
|
||||||
// Place all read/write items into SRAM.
|
// Place all read/write items into SRAM.
|
||||||
//
|
//
|
||||||
place in SRAM { readwrite, block HEAP };
|
place in SRAM { readwrite, block HEAP };
|
||||||
|
keep { section FSymTab };
|
||||||
|
keep { section VSymTab };
|
Loading…
Reference in New Issue