File system and net for LM3S platform are available.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@181 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
bfc50209ae
commit
2cac413f95
|
@ -0,0 +1,34 @@
|
|||
#include <rtthread.h>
|
||||
|
||||
struct stack_contex
|
||||
{
|
||||
rt_uint32_t r0;
|
||||
rt_uint32_t r1;
|
||||
rt_uint32_t r2;
|
||||
rt_uint32_t r3;
|
||||
rt_uint32_t r12;
|
||||
rt_uint32_t lr;
|
||||
rt_uint32_t pc;
|
||||
rt_uint32_t psr;
|
||||
};
|
||||
|
||||
extern void rt_hw_interrupt_thread_switch(void);
|
||||
extern void list_thread(void);
|
||||
extern rt_thread_t rt_current_thread;
|
||||
void rt_hw_hard_fault_exception(struct stack_contex* contex)
|
||||
{
|
||||
rt_kprintf("hard fault on thread: %s\n", rt_current_thread->name);
|
||||
rt_kprintf("psr: 0x%08x\n", contex->psr);
|
||||
rt_kprintf(" pc: 0x%08x\n", contex->pc);
|
||||
rt_kprintf(" lr: 0x%08x\n", contex->lr);
|
||||
rt_kprintf("r12: 0x%08x\n", contex->r12);
|
||||
rt_kprintf("r03: 0x%08x\n", contex->r3);
|
||||
rt_kprintf("r02: 0x%08x\n", contex->r2);
|
||||
rt_kprintf("r01: 0x%08x\n", contex->r1);
|
||||
rt_kprintf("r00: 0x%08x\n", contex->r0);
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
list_thread();
|
||||
#endif
|
||||
while (1);
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
;/*
|
||||
; * File : context.S
|
||||
; * This file is part of RT-Thread RTOS
|
||||
; * COPYRIGHT (C) 2006, RT-Thread Development Team
|
||||
; *
|
||||
; * The license and distribution terms for this file may be
|
||||
; * found in the file LICENSE in this distribution or at
|
||||
; * http://www.rt-thread.org/license/LICENSE
|
||||
; *
|
||||
; * Change Logs:
|
||||
; * Date Author Notes
|
||||
; * 2009-01-17 Bernard first version
|
||||
; */
|
||||
|
||||
AREA |.text|, CODE, READONLY, ALIGN=2
|
||||
THUMB
|
||||
REQUIRE8
|
||||
PRESERVE8
|
||||
|
||||
IMPORT rt_hw_hard_fault_exception
|
||||
|
||||
rt_hw_hard_fault PROC
|
||||
EXPORT rt_hw_hard_fault
|
||||
|
||||
; get current context
|
||||
MRS r0, psp ; get fault thread stack pointer
|
||||
BL rt_hw_hard_fault_exception
|
||||
|
||||
ORR lr, lr, #0x04
|
||||
BX lr
|
||||
ENDP
|
||||
|
||||
END
|
|
@ -65,6 +65,8 @@ __heap_limit
|
|||
IMPORT rt_hw_pend_sv
|
||||
IMPORT rt_hw_timer_handler
|
||||
IMPORT rt_hw_uart_isr_1
|
||||
IMPORT luminaryif_isr
|
||||
IMPORT rt_hw_hard_fault
|
||||
|
||||
;******************************************************************************
|
||||
;
|
||||
|
@ -91,7 +93,7 @@ __Vectors
|
|||
DCD StackMem + Stack ; Top of Stack
|
||||
DCD Reset_Handler ; Reset Handler
|
||||
DCD NmiSR ; NMI Handler
|
||||
DCD FaultISR ; Hard Fault Handler
|
||||
DCD rt_hw_hard_fault ; Hard Fault Handler
|
||||
DCD IntDefaultHandler ; MPU Fault Handler
|
||||
DCD IntDefaultHandler ; Bus Fault Handler
|
||||
DCD IntDefaultHandler ; Usage Fault Handler
|
||||
|
@ -146,8 +148,8 @@ __Vectors
|
|||
DCD IntDefaultHandler ; CAN0
|
||||
DCD IntDefaultHandler ; CAN1
|
||||
DCD IntDefaultHandler ; CAN2
|
||||
DCD IntDefaultHandler ; Ethernet
|
||||
DCD IntDefaultHandler ; Hibernate
|
||||
DCD luminaryif_isr ; Ethernet
|
||||
DCD IntDefaultHandler ; Hibernate
|
||||
DCD IntDefaultHandler ; USB0
|
||||
DCD IntDefaultHandler ; PWM Generator 3
|
||||
DCD IntDefaultHandler ; uDMA Software Transfer
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
#define AUTOIP_DEBUG LWIP_DBG_OFF
|
||||
#define DHCP_DEBUG LWIP_DBG_OFF
|
||||
#define IP_DEBUG LWIP_DBG_OFF
|
||||
#define IP_REASS_DEBUG LWIP_DBG_ON
|
||||
#define ICMP_DEBUG LWIP_DBG_ON
|
||||
#define IP_REASS_DEBUG LWIP_DBG_OFF
|
||||
#define ICMP_DEBUG LWIP_DBG_OFF
|
||||
#define IGMP_DEBUG LWIP_DBG_OFF
|
||||
#define UDP_DEBUG LWIP_DBG_OFF
|
||||
#define TCP_DEBUG LWIP_DBG_OFF
|
||||
|
@ -142,6 +142,8 @@
|
|||
link level header. */
|
||||
#define PBUF_LINK_HLEN 16
|
||||
|
||||
#define ETH_PAD_SIZE 2 // default is 0
|
||||
|
||||
/** SYS_LIGHTWEIGHT_PROT
|
||||
* define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
|
||||
* for certain critical regions during buffer allocation, deallocation and memory
|
||||
|
|
|
@ -63,7 +63,7 @@ err_t eth_input(struct pbuf *p, struct netif *inp)
|
|||
{
|
||||
case ETHTYPE_IP:
|
||||
etharp_ip_input(inp, p);
|
||||
pbuf_header(p, -14);
|
||||
pbuf_header(p, -((rt_int16_t)sizeof(struct eth_hdr)));
|
||||
tcpip_input(p, inp);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue