diff --git a/bsp/tm4c129x/applications/board.c b/bsp/tm4c129x/applications/board.c index cb3cf92eb65a5038df55e1d975214aeced9c03d6..c638369a5ad28aa6520faa73b5dacf68eea2c83c 100644 --- a/bsp/tm4c129x/applications/board.c +++ b/bsp/tm4c129x/applications/board.c @@ -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(); diff --git a/bsp/tm4c129x/drivers/drv_uart.c b/bsp/tm4c129x/drivers/drv_uart.c index 7f87083999e7a37c1212b6a31162e6793555e025..20ce0db22495f8d231b8a011e7c569c8e7b66481 100644 --- a/bsp/tm4c129x/drivers/drv_uart.c +++ b/bsp/tm4c129x/drivers/drv_uart.c @@ -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); diff --git a/bsp/tm4c129x/libraries/startup/startup_ewarm.c b/bsp/tm4c129x/libraries/startup/startup_ewarm.c index eb852f59a2bd1bc2234e5858126be051a4cc0c6b..cbcbda31e576f7292ef6b9d6f338d6247cc4c944 100644 --- a/bsp/tm4c129x/libraries/startup/startup_ewarm.c +++ b/bsp/tm4c129x/libraries/startup/startup_ewarm.c @@ -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 diff --git a/bsp/tm4c129x/libraries/startup/startup_gcc.c b/bsp/tm4c129x/libraries/startup/startup_gcc.c index 8bba1ae36d31d85af5677465b076b18fd1c70eb3..ae10bf8e6c59b3c7474b1fa670c073b95abff0a0 100644 --- a/bsp/tm4c129x/libraries/startup/startup_gcc.c +++ b/bsp/tm4c129x/libraries/startup/startup_gcc.c @@ -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 diff --git a/bsp/tm4c129x/template.ewp b/bsp/tm4c129x/template.ewp new file mode 100644 index 0000000000000000000000000000000000000000..97696050b618e1c9fde229b38b39125f738c0889 --- /dev/null +++ b/bsp/tm4c129x/template.ewp @@ -0,0 +1,1889 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + diff --git a/bsp/tm4c129x/template.eww b/bsp/tm4c129x/template.eww new file mode 100644 index 0000000000000000000000000000000000000000..bd036bb4c98c1598f04b85f64b0dff37f6ec6028 --- /dev/null +++ b/bsp/tm4c129x/template.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\template.ewp + + + + + diff --git a/bsp/tm4c129x/tm4c_rom.icf b/bsp/tm4c129x/tm4c_rom.icf index 38c73c9e2814ef00391fcb1c0cfc6be6350a8369..b09595243de9075c614a190ae3372505c6cfa0fc 100644 --- a/bsp/tm4c129x/tm4c_rom.icf +++ b/bsp/tm4c129x/tm4c_rom.icf @@ -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