提交 b21c35df 编写于 作者: A ArdaFu

[bsp] Add IAR EWARM project template for SCONS project auto generation.

上级 d1a4f2e8
......@@ -61,6 +61,7 @@ extern void HardFault_Handler(void);
*/
void rt_hw_board_init()
{
MAP_IntMasterDisable();
IntRegister(FAULT_HARD, HardFault_Handler);
IntRegister(FAULT_PENDSV, PendSV_Handler);
IntRegister(FAULT_SYSTICK, SysTick_Handler);
......@@ -87,7 +88,7 @@ void rt_hw_board_init()
MAP_SysTickEnable();
/* set pend exception priority */
IntPrioritySet(FAULT_PENDSV, (1 << 5) - 1);
//IntPrioritySet(FAULT_PENDSV, (1 << 5) - 1);
/*init uart device*/
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)
{
uint32_t config;
uint32_t config = 0;
hw_uart_t* uart;
RT_ASSERT(serial != RT_NULL);
uart = mUartGetHwPtr(serial);
......@@ -206,7 +206,7 @@ int rt_hw_uart_init(void)
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
/* preemption = 1, sub-priority = 1 */
IntPrioritySet(INT_UART0, ((0x01 << 5) | 0x01));
//IntPrioritySet(INT_UART0, ((0x01 << 5) | 0x01));
/* Enable Interrupt for UART channel */
UARTIntRegister(uart->hw_base, UART0_IRQHandler);
......
......@@ -50,7 +50,10 @@ static void IntDefaultHandler(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.
......@@ -84,7 +87,7 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
// The initial stack pointer
ResetISR, // The reset handler
NmiSR, // The NMI handler
FaultISR, // The hard fault handler
HardFault_Handler, // The hard fault handler
IntDefaultHandler, // The MPU fault handler
IntDefaultHandler, // The bus fault handler
IntDefaultHandler, // The usage fault handler
......@@ -95,14 +98,14 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
IntDefaultHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler
0, // Reserved
IntDefaultHandler, // The PendSV handler
IntDefaultHandler, // The SysTick handler
PendSV_Handler, //IntDefaultHandler, // The PendSV handler
SysTick_Handler,//IntDefaultHandler, // The SysTick handler
IntDefaultHandler, // GPIO Port A
IntDefaultHandler, // GPIO Port B
IntDefaultHandler, // GPIO Port C
IntDefaultHandler, // GPIO Port D
IntDefaultHandler, // GPIO Port E
IntDefaultHandler, // UART0 Rx and Tx
UART0_IRQHandler, //IntDefaultHandler, // UART0 Rx and Tx
IntDefaultHandler, // UART1 Rx and Tx
IntDefaultHandler, // SSI0 Rx and Tx
IntDefaultHandler, // I2C0 Master and Slave
......
......@@ -45,6 +45,8 @@ extern int main(void);
extern void SysTick_Handler(void);
extern void PendSV_Handler(void);
extern void UART0_IRQHandler(void);
extern void HardFault_Handler(void);
//*****************************************************************************
//
// Reserve space for the system stack.
......@@ -65,7 +67,7 @@ void (* const g_pfnVectors[])(void) =
// The initial stack pointer
ResetISR, // The reset handler
NmiSR, // The NMI handler
FaultISR, // The hard fault handler
HardFault_Handler, // The hard fault handler
IntDefaultHandler, // The MPU fault handler
IntDefaultHandler, // The bus fault handler
IntDefaultHandler, // The usage fault handler
......@@ -83,7 +85,7 @@ void (* const g_pfnVectors[])(void) =
IntDefaultHandler, // GPIO Port C
IntDefaultHandler, // GPIO Port D
IntDefaultHandler, // GPIO Port E
IntDefaultHandler, // UART0 Rx and Tx
UART0_IRQHandler, // UART0 Rx and Tx
IntDefaultHandler, // UART1 Rx and Tx
IntDefaultHandler, // SSI0 Rx and Tx
IntDefaultHandler, // I2C0 Master and Slave
......
此差异已折叠。
<?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 in SRAM { readwrite, block HEAP };
keep { section FSymTab };
keep { section VSymTab };
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册