From 79ca654e1362270c5994eba864a1ddcc78e6cbaa Mon Sep 17 00:00:00 2001 From: mbbill Date: Tue, 29 Dec 2009 07:17:58 +0000 Subject: [PATCH] ADD: Add abort handler, it will terminate current thread by default. ADD: Merged svc, abort and irq mode stack. ADD: Changed MDK project to new format. FIX: Removed the "static" qualifier of rt_thread_exit(). FIX: Change AT91SAM7X.h to the standard header(AT91SAM7X256.h) of RealView MDK. (not all of them are changed, e.g. sd.c) FIX: Moved some board-dependent files to bsp. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@257 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- .../arm/AT91SAM7X => bsp/sam7x}/AT91SAM7X.h | 0 bsp/sam7x/board.c | 42 +- bsp/sam7x/board.h | 80 +- {libcpu/arm/AT91SAM7X => bsp/sam7x}/mii.h | 0 bsp/sam7x/project.uvopt | 3166 +++++++++++++++++ bsp/sam7x/project.uvproj | 899 +++++ bsp/sam7x/rtconfig.h | 8 +- .../arm/AT91SAM7X => bsp/sam7x}/sam7x_emac.c | 0 .../arm/AT91SAM7X => bsp/sam7x}/sam7x_emac.h | 0 {libcpu/arm/AT91SAM7X => bsp/sam7x}/serial.c | 4 +- {libcpu/arm/AT91SAM7X => bsp/sam7x}/serial.h | 0 bsp/sam7x/startup.c | 1 - include/rtthread.h | 3 +- libcpu/arm/AT91SAM7X/cpu.c | 2 +- libcpu/arm/AT91SAM7X/interrupt.c | 16 +- libcpu/arm/AT91SAM7X/stack.c | 3 +- libcpu/arm/AT91SAM7X/start_rvds.S | 29 +- libcpu/arm/AT91SAM7X/trap.c | 14 +- src/thread.c | 3 +- 19 files changed, 4176 insertions(+), 94 deletions(-) rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/AT91SAM7X.h (100%) rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/mii.h (100%) create mode 100644 bsp/sam7x/project.uvopt create mode 100644 bsp/sam7x/project.uvproj rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/sam7x_emac.c (100%) rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/sam7x_emac.h (100%) rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/serial.c (99%) rename {libcpu/arm/AT91SAM7X => bsp/sam7x}/serial.h (100%) diff --git a/libcpu/arm/AT91SAM7X/AT91SAM7X.h b/bsp/sam7x/AT91SAM7X.h similarity index 100% rename from libcpu/arm/AT91SAM7X/AT91SAM7X.h rename to bsp/sam7x/AT91SAM7X.h diff --git a/bsp/sam7x/board.c b/bsp/sam7x/board.c index d3f97c4112..c9a0613cb6 100644 --- a/bsp/sam7x/board.c +++ b/bsp/sam7x/board.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include "board.h" static void rt_hw_board_led_init(void); @@ -34,18 +34,18 @@ static void rt_hw_board_led_init(void); */ void rt_hw_timer_handler(int vector) { - if (AT91C_PITC_PISR & 0x01) + if (AT91C_BASE_PITC->PITC_PISR & 0x01) { /* increase a tick */ rt_tick_increase(); /* ack interrupt */ - AT91C_AIC_EOICR = AT91C_PITC_PIVR; + AT91C_BASE_AIC->AIC_EOICR = AT91C_BASE_PITC->PITC_PIVR; } else { /* end of interrupt */ - AT91C_AIC_EOICR = 0; + AT91C_BASE_AIC->AIC_EOICR = 0; } } /* PIO Flash PA PB PIN */ @@ -63,11 +63,11 @@ int leds[] = {LED1, LED2, LED3, LED4}; static void rt_hw_board_led_init() { /* enable the clock of the PIO A, PIO B */ - AT91C_PMC_PCER = 1 << AT91C_ID_PIOA | 1 << AT91C_ID_PIOB; + AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOA | 1 << AT91C_ID_PIOB; /* configure PIO as output for led */ - AT91C_PIOB_PER = LED_MASK; - AT91C_PIOB_OER = LED_MASK; + AT91C_BASE_PIOB->PIO_PER = LED_MASK; + AT91C_BASE_PIOB->PIO_OER = LED_MASK; } /** @@ -79,7 +79,7 @@ void rt_hw_board_led_on(int n) { if (n >= 0 && n < 4) { - AT91C_PIOB_CODR = leds[n]; + AT91C_BASE_PIOB->PIO_CODR = leds[n]; } } @@ -92,7 +92,7 @@ void rt_hw_board_led_off(int n) { if (n >= 0 && n < 4) { - AT91C_PIOB_SODR = leds[n]; + AT91C_BASE_PIOB->PIO_SODR = leds[n]; } } @@ -111,14 +111,14 @@ void rt_hw_console_output(const char* str) { if (*str == '\n') { - while (!(AT91C_US0_CSR & AT91C_US_TXRDY)); - AT91C_US0_THR = '\r'; + while (!(AT91C_BASE_US0->US_CSR & AT91C_US_TXRDY)); + AT91C_BASE_US0->US_THR = '\r'; } /* Wait for Empty Tx Buffer */ - while (!(AT91C_US0_CSR & AT91C_US_TXRDY)); + while (!(AT91C_BASE_US0->US_CSR & AT91C_US_TXRDY)); /* Transmit Character */ - AT91C_US0_THR = *str; + AT91C_BASE_US0->US_THR = *str; str ++; } @@ -127,25 +127,25 @@ void rt_hw_console_output(const char* str) static void rt_hw_console_init() { /* Enable Clock for USART0 */ - AT91C_PMC_PCER = 1 << AT91C_ID_US0; + AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_US0; /* Enable RxD0 and TxDO Pin */ - AT91C_PIO_PDR = (1 << 5) | (1 << 6); + AT91C_BASE_PIOA->PIO_PDR = (1 << 5) | (1 << 6); - AT91C_US0_CR = AT91C_US_RSTRX | /* Reset Receiver */ + AT91C_BASE_US0->US_CR = AT91C_US_RSTRX | /* Reset Receiver */ AT91C_US_RSTTX | /* Reset Transmitter */ AT91C_US_RXDIS | /* Receiver Disable */ AT91C_US_TXDIS; /* Transmitter Disable */ - AT91C_US0_MR = AT91C_US_USMODE_NORMAL | /* Normal Mode */ + AT91C_BASE_US0->US_MR = AT91C_US_USMODE_NORMAL | /* Normal Mode */ AT91C_US_CLKS_CLOCK | /* Clock = MCK */ AT91C_US_CHRL_8_BITS | /* 8-bit Data */ AT91C_US_PAR_NONE | /* No Parity */ AT91C_US_NBSTOP_1_BIT; /* 1 Stop Bit */ /* set baud rate divisor */ - AT91C_US0_BRGR = BRD; + AT91C_BASE_US0->US_BRGR = BRD; - AT91C_US0_CR = AT91C_US_RXEN | /* Receiver Enable */ + AT91C_BASE_US0->US_CR = AT91C_US_RXEN | /* Receiver Enable */ AT91C_US_TXEN; /* Transmitter Enable */ } @@ -163,11 +163,11 @@ void rt_hw_board_init() rt_hw_board_led_init(); /* init PITC */ - AT91C_PITC_PIMR = (1 << 25) | (1 << 24) | PIV; + AT91C_BASE_PITC->PITC_PIMR = (1 << 25) | (1 << 24) | PIV; /* install timer handler */ rt_hw_interrupt_install(AT91C_ID_SYS, rt_hw_timer_handler, RT_NULL); - AT91C_AIC_SMR(AT91C_ID_SYS) = 0; + AT91C_BASE_AIC->AIC_SMR[AT91C_ID_SYS] = 0; rt_hw_interrupt_umask(AT91C_ID_SYS); } /*@}*/ diff --git a/bsp/sam7x/board.h b/bsp/sam7x/board.h index acaad92449..db4c456e4e 100644 --- a/bsp/sam7x/board.h +++ b/bsp/sam7x/board.h @@ -17,46 +17,46 @@ #include #include - -#define AT91C_US_RXRDY ((unsigned int) 0x1 << 0) /* US RXRDY Interrupt */ -#define AT91C_US_TXRDY ((unsigned int) 0x1 << 1) /* US TXRDY Interrupt */ -#define AT91C_US_RSTRX ((unsigned int) 0x1 << 2) /* US Reset Receiver */ -#define AT91C_US_RSTTX ((unsigned int) 0x1 << 3) /* US Reset Transmitter */ -#define AT91C_US_RXEN ((unsigned int) 0x1 << 4) /* US Receiver Enable */ -#define AT91C_US_RXDIS ((unsigned int) 0x1 << 5) /* US Receiver Disable */ -#define AT91C_US_TXEN ((unsigned int) 0x1 << 6) /* US Transmitter Enable */ -#define AT91C_US_TXDIS ((unsigned int) 0x1 << 7) /* US Transmitter Disable */ -#define AT91C_US_RSTSTA ((unsigned int) 0x1 << 8) /* US Reset Status Bits */ - -#define AT91C_US_USMODE_NORMAL ((unsigned int) 0x0) /* USAR) Normal */ -#define AT91C_US_USMODE_RS485 ((unsigned int) 0x1) /* USAR) RS485 */ -#define AT91C_US_USMODE_HWHSH ((unsigned int) 0x2) /* USAR) Hardware Handshaking */ -#define AT91C_US_USMODE_MODEM ((unsigned int) 0x3) /* USAR) Modem */ -#define AT91C_US_USMODE_ISO7816_0 ((unsigned int) 0x4) /* USAR) ISO7816 protocol: T = 0 */ -#define AT91C_US_USMODE_ISO7816_1 ((unsigned int) 0x6) /* USAR) ISO7816 protocol: T = 1 */ -#define AT91C_US_USMODE_IRDA ((unsigned int) 0x8) /* USAR) IrDA */ -#define AT91C_US_USMODE_SWHSH ((unsigned int) 0xC) /* USAR) Software Handshaking */ - -#define AT91C_US_CLKS_CLOCK ((unsigned int) 0x0 << 4) /* USAR) Clock */ -#define AT91C_US_CLKS_FDIV1 ((unsigned int) 0x1 << 4) /* USAR) fdiv1 */ -#define AT91C_US_CLKS_SLOW ((unsigned int) 0x2 << 4) /* USAR) slow_clock (ARM) */ -#define AT91C_US_CLKS_EXT ((unsigned int) 0x3 << 4) /* USAR) External (SCK) */ - -#define AT91C_US_CHRL_5_BITS ((unsigned int) 0x0 << 6) /* USAR) Character Length: 5 bits */ -#define AT91C_US_CHRL_6_BITS ((unsigned int) 0x1 << 6) /* USAR) Character Length: 6 bits */ -#define AT91C_US_CHRL_7_BITS ((unsigned int) 0x2 << 6) /* USAR) Character Length: 7 bits */ -#define AT91C_US_CHRL_8_BITS ((unsigned int) 0x3 << 6) /* USAR) Character Length: 8 bits */ - -#define AT91C_US_PAR_EVEN ((unsigned int) 0x0 << 9) /* DBGU Even Parity */ -#define AT91C_US_PAR_ODD ((unsigned int) 0x1 << 9) /* DBGU Odd Parity */ -#define AT91C_US_PAR_SPACE ((unsigned int) 0x2 << 9) /* DBGU Parity forced to 0 (Space) */ -#define AT91C_US_PAR_MARK ((unsigned int) 0x3 << 9) /* DBGU Parity forced to 1 (Mark) */ -#define AT91C_US_PAR_NONE ((unsigned int) 0x4 << 9) /* DBGU No Parity */ -#define AT91C_US_PAR_MULTI_DROP ((unsigned int) 0x6 << 9) /* DBGU Multi-drop mode */ - -#define AT91C_US_NBSTOP_1_BIT ((unsigned int) 0x0 << 12) /* USART 1 stop bit */ -#define AT91C_US_NBSTOP_15_BIT ((unsigned int) 0x1 << 12) /* USART Asynchronous (SYNC=0) 2 stop bits Synchronous (SYNC=1) 2 stop bits */ -#define AT91C_US_NBSTOP_2_BIT ((unsigned int) 0x2 << 12) /* USART 2 stop bits */ +// These are defined in standard header (at91sam7x256.h) of realview MDK. +//#define AT91C_US_RXRDY ((unsigned int) 0x1 << 0) /* US RXRDY Interrupt */ +//#define AT91C_US_TXRDY ((unsigned int) 0x1 << 1) /* US TXRDY Interrupt */ +//#define AT91C_US_RSTRX ((unsigned int) 0x1 << 2) /* US Reset Receiver */ +//#define AT91C_US_RSTTX ((unsigned int) 0x1 << 3) /* US Reset Transmitter */ +//#define AT91C_US_RXEN ((unsigned int) 0x1 << 4) /* US Receiver Enable */ +//#define AT91C_US_RXDIS ((unsigned int) 0x1 << 5) /* US Receiver Disable */ +//#define AT91C_US_TXEN ((unsigned int) 0x1 << 6) /* US Transmitter Enable */ +//#define AT91C_US_TXDIS ((unsigned int) 0x1 << 7) /* US Transmitter Disable */ +//#define AT91C_US_RSTSTA ((unsigned int) 0x1 << 8) /* US Reset Status Bits */ +// +//#define AT91C_US_USMODE_NORMAL ((unsigned int) 0x0) /* USAR) Normal */ +//#define AT91C_US_USMODE_RS485 ((unsigned int) 0x1) /* USAR) RS485 */ +//#define AT91C_US_USMODE_HWHSH ((unsigned int) 0x2) /* USAR) Hardware Handshaking */ +//#define AT91C_US_USMODE_MODEM ((unsigned int) 0x3) /* USAR) Modem */ +//#define AT91C_US_USMODE_ISO7816_0 ((unsigned int) 0x4) /* USAR) ISO7816 protocol: T = 0 */ +//#define AT91C_US_USMODE_ISO7816_1 ((unsigned int) 0x6) /* USAR) ISO7816 protocol: T = 1 */ +//#define AT91C_US_USMODE_IRDA ((unsigned int) 0x8) /* USAR) IrDA */ +//#define AT91C_US_USMODE_SWHSH ((unsigned int) 0xC) /* USAR) Software Handshaking */ +// +//#define AT91C_US_CLKS_CLOCK ((unsigned int) 0x0 << 4) /* USAR) Clock */ +//#define AT91C_US_CLKS_FDIV1 ((unsigned int) 0x1 << 4) /* USAR) fdiv1 */ +//#define AT91C_US_CLKS_SLOW ((unsigned int) 0x2 << 4) /* USAR) slow_clock (ARM) */ +//#define AT91C_US_CLKS_EXT ((unsigned int) 0x3 << 4) /* USAR) External (SCK) */ +// +//#define AT91C_US_CHRL_5_BITS ((unsigned int) 0x0 << 6) /* USAR) Character Length: 5 bits */ +//#define AT91C_US_CHRL_6_BITS ((unsigned int) 0x1 << 6) /* USAR) Character Length: 6 bits */ +//#define AT91C_US_CHRL_7_BITS ((unsigned int) 0x2 << 6) /* USAR) Character Length: 7 bits */ +//#define AT91C_US_CHRL_8_BITS ((unsigned int) 0x3 << 6) /* USAR) Character Length: 8 bits */ +// +//#define AT91C_US_PAR_EVEN ((unsigned int) 0x0 << 9) /* DBGU Even Parity */ +//#define AT91C_US_PAR_ODD ((unsigned int) 0x1 << 9) /* DBGU Odd Parity */ +//#define AT91C_US_PAR_SPACE ((unsigned int) 0x2 << 9) /* DBGU Parity forced to 0 (Space) */ +//#define AT91C_US_PAR_MARK ((unsigned int) 0x3 << 9) /* DBGU Parity forced to 1 (Mark) */ +//#define AT91C_US_PAR_NONE ((unsigned int) 0x4 << 9) /* DBGU No Parity */ +//#define AT91C_US_PAR_MULTI_DROP ((unsigned int) 0x6 << 9) /* DBGU Multi-drop mode */ +// +//#define AT91C_US_NBSTOP_1_BIT ((unsigned int) 0x0 << 12) /* USART 1 stop bit */ +//#define AT91C_US_NBSTOP_15_BIT ((unsigned int) 0x1 << 12) /* USART Asynchronous (SYNC=0) 2 stop bits Synchronous (SYNC=1) 2 stop bits */ +//#define AT91C_US_NBSTOP_2_BIT ((unsigned int) 0x2 << 12) /* USART 2 stop bits */ #define MCK 48054857 #define BR 115200 /* Baud Rate */ diff --git a/libcpu/arm/AT91SAM7X/mii.h b/bsp/sam7x/mii.h similarity index 100% rename from libcpu/arm/AT91SAM7X/mii.h rename to bsp/sam7x/mii.h diff --git a/bsp/sam7x/project.uvopt b/bsp/sam7x/project.uvopt new file mode 100644 index 0000000000..ffe2f990b8 --- /dev/null +++ b/bsp/sam7x/project.uvopt @@ -0,0 +1,3166 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + RT-Thread/AT91SAM7X + 0x4 + ARM-ADS + + 18432000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\objs\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 0 + + SARM.DLL + -cAT91SAM7X + DARMATS.DLL + -p91SAM7X256 + SARM.DLL + + TARMATS.DLL + -p91SAM7X256 + + + 1 + 0 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 2 + + + + + + + + + + + Segger\JLTAgdi.dll + + + + 0 + DLGDARM + (117=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(130=150,182,741,760,0)(131=-1,-1,-1,-1,0)(191=-1,-1,-1,-1,0)(192=-1,-1,-1,-1,0)(140=165,198,843,668,0)(3010=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(125=-1,-1,-1,-1,0)(3006=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(120=-1,-1,-1,-1,0) + + + 0 + DLGTARM + (117=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(191=-1,-1,-1,-1,0)(192=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(3010=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(125=-1,-1,-1,-1,0)(3006=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(120=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + -T5F + + + 0 + JLTAgdi + -O1070 -J1 -Y1000 -Z1 -FO7 -FD200000 -FC800 -FN0 + + + 0 + JLTDLG + + + + + + 1 + 2 + 0x200508 + + + + + 2 + 0 + 0x103da0 + + + + 0 + 0 + 1 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + Startup + 1 + 0 + 0 + + 1 + 4 + 5 + 0 + 0 + 2 + 0 + 55 + 69 + 0 + .\rtconfig.h + rtconfig.h + + + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 69 + 83 + 0 + .\application.c + application.c + + + 1 + 2 + 1 + 0 + 0 + 37 + 0 + 127 + 132 + 0 + .\board.c + board.c + + + 1 + 3 + 1 + 0 + 0 + 18 + 0 + 53 + 59 + 0 + .\startup.c + startup.c + + 44 + 0 + 1 + + -1 + -1 + + + -4 + -30 + + + 0 + 0 + 698 + 198 + + + + + 1 + 5 + 1 + 0 + 0 + 22 + 0 + 1 + 6 + 0 + .\sd.c + sd.c + + 44 + 2 + 3 + + -1 + -1 + + + -4 + -30 + + + 87 + 66 + 730 + 330 + + + + + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + .\serial.c + serial.c + + + 1 + 0 + 1 + 0 + 0 + 26 + 0 + 31 + 51 + 0 + .\sam7x_emac.c + sam7x_emac.c + + + + + Kernel + 1 + 0 + 0 + + 2 + 6 + 1 + 0 + 0 + 5 + 0 + 55 + 56 + 0 + ..\..\src\clock.c + clock.c + + + 2 + 7 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\idle.c + idle.c + + + 2 + 8 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\ipc.c + ipc.c + + + 2 + 9 + 1 + 0 + 0 + 0 + 0 + 52 + 67 + 0 + ..\..\src\irq.c + irq.c + + + 2 + 10 + 1 + 0 + 0 + 47 + 0 + 41 + 57 + 0 + ..\..\src\kservice.c + kservice.c + + + 2 + 11 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\mem.c + mem.c + + + 2 + 12 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\mempool.c + mempool.c + + + 2 + 13 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\object.c + object.c + + + 2 + 14 + 1 + 0 + 0 + 5 + 0 + 349 + 349 + 0 + ..\..\src\timer.c + timer.c + + + 2 + 15 + 1 + 0 + 0 + 0 + 0 + 177 + 192 + 0 + ..\..\src\scheduler.c + scheduler.c + + + 2 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\src\slab.c + slab.c + + + 2 + 17 + 1 + 0 + 0 + 28 + 0 + 208 + 228 + 0 + ..\..\src\thread.c + thread.c + + + 2 + 18 + 1 + 0 + 0 + 0 + 0 + 81 + 81 + 0 + ..\..\src\device.c + device.c + + + + + AT91SAM7X + 0 + 0 + 0 + + 3 + 19 + 1 + 0 + 0 + 5 + 0 + 82 + 82 + 0 + ..\..\libcpu\arm\AT91SAM7X\interrupt.c + interrupt.c + + + 3 + 21 + 1 + 0 + 0 + 0 + 0 + 44 + 54 + 0 + ..\..\libcpu\arm\AT91SAM7X\stack.c + stack.c + + + 3 + 22 + 1 + 0 + 0 + 0 + 0 + 26 + 26 + 0 + ..\..\libcpu\arm\AT91SAM7X\trap.c + trap.c + + + 3 + 23 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\libcpu\arm\AT91SAM7X\cpu.c + cpu.c + + + 3 + 24 + 2 + 0 + 0 + 16 + 0 + 421 + 439 + 0 + ..\..\libcpu\arm\AT91SAM7X\start_rvds.S + start_rvds.S + + + 3 + 25 + 2 + 0 + 0 + 0 + 0 + 56 + 81 + 0 + ..\..\libcpu\arm\AT91SAM7X\context_rvds.S + context_rvds.S + + + + + finsh + 0 + 0 + 0 + + 4 + 27 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\cmd.c + cmd.c + + + 4 + 28 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_compiler.c + finsh_compiler.c + + + 4 + 29 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_error.c + finsh_error.c + + + 4 + 30 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_heap.c + finsh_heap.c + + + 4 + 31 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_init.c + finsh_init.c + + + 4 + 32 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_node.c + finsh_node.c + + + 4 + 33 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_ops.c + finsh_ops.c + + + 4 + 34 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_parser.c + finsh_parser.c + + + 4 + 35 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_token.c + finsh_token.c + + + 4 + 36 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_var.c + finsh_var.c + + + 4 + 37 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\finsh_vm.c + finsh_vm.c + + + 4 + 38 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\shell.c + shell.c + + + 4 + 39 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\finsh\symbol.c + symbol.c + + + + + LwIP + 0 + 0 + 0 + + 5 + 40 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\dhcp.c + dhcp.c + + + 5 + 41 + 1 + 0 + 0 + 31 + 0 + 148 + 156 + 0 + ..\..\net\lwip\src\core\dns.c + dns.c + + + 5 + 42 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\init.c + init.c + + + 5 + 43 + 1 + 0 + 0 + 0 + 0 + 81 + 90 + 0 + ..\..\net\lwip\src\core\netif.c + netif.c + + + 5 + 44 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\pbuf.c + pbuf.c + + + 5 + 45 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\raw.c + raw.c + + + 5 + 46 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\stats.c + stats.c + + + 5 + 47 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\sys.c + sys.c + + + 5 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\tcp.c + tcp.c + + + 5 + 49 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\tcp_in.c + tcp_in.c + + + 5 + 50 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\tcp_out.c + tcp_out.c + + + 5 + 51 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\udp.c + udp.c + + + 5 + 52 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\autoip.c + autoip.c + + + 5 + 53 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\icmp.c + icmp.c + + + 5 + 54 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\igmp.c + igmp.c + + + 5 + 55 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\inet.c + inet.c + + + 5 + 56 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\inet_chksum.c + inet_chksum.c + + + 5 + 57 + 1 + 0 + 0 + 0 + 0 + 158 + 166 + 0 + ..\..\net\lwip\src\core\ipv4\ip.c + ip.c + + + 5 + 58 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\ip_addr.c + ip_addr.c + + + 5 + 59 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\ipv4\ip_frag.c + ip_frag.c + + + 5 + 60 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\asn1_dec.c + asn1_dec.c + + + 5 + 61 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\asn1_enc.c + asn1_enc.c + + + 5 + 62 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\mib2.c + mib2.c + + + 5 + 63 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\mib_structs.c + mib_structs.c + + + 5 + 64 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\msg_in.c + msg_in.c + + + 5 + 65 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\snmp\msg_out.c + msg_out.c + + + 5 + 66 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\api_lib.c + api_lib.c + + + 5 + 67 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\api_msg.c + api_msg.c + + + 5 + 68 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\err.c + err.c + + + 5 + 69 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\netbuf.c + netbuf.c + + + 5 + 70 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\netdb.c + netdb.c + + + 5 + 71 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\netifapi.c + netifapi.c + + + 5 + 72 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\tcpip.c + tcpip.c + + + 5 + 73 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\netif\etharp.c + etharp.c + + + 5 + 74 + 1 + 0 + 0 + 9 + 0 + 207 + 216 + 0 + ..\..\net\lwip\src\netif\ethernetif.c + ethernetif.c + + + 5 + 75 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\netif\loopif.c + loopif.c + + + 5 + 76 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\arch\sys_arch_init.c + sys_arch_init.c + + + 5 + 77 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\arch\sys_arch.c + sys_arch.c + + + 5 + 78 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\api\sockets.c + sockets.c + + + 5 + 79 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\net\lwip\src\core\memp_tiny.c + memp_tiny.c + + + + + Filesystem + 0 + 0 + 0 + + 6 + 80 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_util.c + dfs_util.c + + + 6 + 81 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_cache.c + dfs_cache.c + + + 6 + 82 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_fs.c + dfs_fs.c + + + 6 + 83 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_init.c + dfs_init.c + + + 6 + 84 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_raw.c + dfs_raw.c + + + 6 + 85 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\src\dfs_posix.c + dfs_posix.c + + + 6 + 86 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\base\plibc.c + plibc.c + + + 6 + 87 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\base\efs.c + efs.c + + + 6 + 88 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\base\extract.c + extract.c + + + 6 + 89 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\base\partition.c + partition.c + + + 6 + 90 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ui.c + ui.c + + + 6 + 91 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\dir.c + dir.c + + + 6 + 92 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fat.c + fat.c + + + 6 + 93 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\file.c + file.c + + + 6 + 94 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c + fs.c + + + 6 + 95 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ls.c + ls.c + + + 6 + 96 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\time.c + time.c + + + + + F:\nf\rt-thread@googlecode\libcpu\arm\AT91SAM7X\start_gcc.S + 22 + 22 + 0 + + 0 + 0 + 0 + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + + + + F:\nf\rt-thread@googlecode\include\rtdef.h + 122 + 122 + 0 + + 0 + 0 + 0 + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + + + + Default + 1 + Build + 0 + + Default + 1 + + 35824 + 1 + Logic Analyzer + 0 + + 0 + + 1 + 6 + 0 + 0 + 0 + 0 + 210 + 600 + 0 + 0 + 250 + 600 + 1 + 0 + 0 + 0 + + + 59392 + 2 + File + 0 + + 0 + + 1 + 2 + 3 + 0 + 24 + 0 + 50 + 893 + 0 + 0 + 0 + 0 + 100 + 0 + 1 + 0 + + + 59398 + 3 + Build + 0 + + 0 + + 1 + 2 + 3 + 0 + 50 + 0 + 76 + 384 + 0 + 0 + 0 + 0 + 100 + 0 + 0 + 0 + + + 59399 + 4 + Debug + 0 + + 0 + + 1 + 2 + 3 + 0 + 50 + 0 + 76 + 626 + 0 + 0 + 0 + 0 + 100 + 0 + 1 + 0 + + + 197 + 5 + Build Output + 0 + + 0 + + 1 + 2 + 4 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 198 + 6 + Command + 197 + Build Output + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 199 + 7 + Find in Files + 198 + Command + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 1 + 0 + + + 38007 + 8 + Browse + 199 + Find in Files + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1939 + 9 + UART #1 + 38007 + Browser + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 1 + 1 + 0 + + + 1940 + 10 + UART #2 + 1939 + UART #1 + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1941 + 11 + UART #3 + 1940 + UART #2 + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1942 + 12 + UART #4 + 1941 + UART #3 + 0 + + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 250 + 600 + 100 + 0 + 0 + 0 + + + 1944 + 13 + Call Stack + 197 + Build Output + 197 + Build Output + 1 + 2 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 0 + 0 + + + 1507 + 14 + Call Stack + 1944 + Call Stack + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1935 + 15 + Locals + 1507 + Call Stack + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1936 + 16 + Watch 1 + 1935 + Locals + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1937 + 17 + Watch 2 + 1936 + Watch 1 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 0 + 0 + + + 1465 + 18 + Memory 1 + 1937 + Watch 2 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1466 + 19 + Memory 2 + 1465 + Memory 1 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 1 + 1 + 0 + + + 1467 + 20 + Memory 3 + 1466 + Memory 2 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 0 + 0 + + + 1468 + 21 + Memory 4 + 1467 + Memory 3 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 0 + 0 + + + 1506 + 22 + Symbols + 1468 + Memory 4 + 197 + Build Output + 1 + 4 + 2 + 0 + 599 + 0 + 834 + 1440 + 0 + 0 + 600 + 250 + 50 + 0 + 1 + 0 + + + 1005 + 23 + Project + 0 + + 0 + + 1 + 2 + 1 + 0 + 76 + 0 + 595 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 1 + 0 + + + 109 + 24 + Books + 1005 + Project + 0 + + 1 + 4 + 2 + 0 + 76 + 0 + 595 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 195 + 25 + Functions + 109 + Books + 0 + + 1 + 4 + 2 + 0 + 76 + 0 + 595 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 196 + 26 + Templates + 195 + Functions + 0 + + 1 + 4 + 2 + 0 + 76 + 0 + 595 + 210 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 38003 + 27 + Registers + 196 + Templates + 0 + + 1 + 4 + 2 + 0 + 76 + 0 + 595 + 210 + 0 + 0 + 600 + 250 + 100 + 1 + 1 + 0 + + + 35885 + 28 + not set + 0 + + 0 + + 1 + 2 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35886 + 29 + not set + 35885 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35887 + 30 + not set + 35886 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35888 + 31 + not set + 35887 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35889 + 32 + not set + 35888 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35890 + 33 + not set + 35889 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35891 + 34 + not set + 35890 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35892 + 35 + not set + 35891 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35893 + 36 + not set + 35892 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35894 + 37 + not set + 35893 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35895 + 38 + not set + 35894 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35896 + 39 + not set + 35895 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35897 + 40 + not set + 35896 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35898 + 41 + not set + 35897 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35899 + 42 + not set + 35898 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35900 + 43 + not set + 35899 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35901 + 44 + not set + 35900 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35902 + 45 + not set + 35901 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35903 + 46 + not set + 35902 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35904 + 47 + not set + 35903 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 35905 + 48 + not set + 35904 + ??? + 0 + + 1 + 4 + 2 + 0 + 76 + 1230 + 595 + 1440 + 0 + 0 + 600 + 250 + 100 + 0 + 0 + 0 + + + 203 + 49 + Disassembly + 0 + + 0 + + 1 + 2 + 2 + 0 + 76 + 924 + 595 + 1440 + 352 + 700 + 602 + 1300 + 100 + 1 + 1 + 0 + + + 1913 + 50 + Instruction Trace + 203 + Disassembly + 0 + + 1 + 4 + 2 + 0 + 76 + 924 + 595 + 1440 + 352 + 700 + 602 + 1300 + 100 + 0 + 0 + 0 + + + 343 + 51 + Performance Analyzer + 1913 + Instruction Trace + 0 + + 1 + 4 + 2 + 0 + 76 + 924 + 595 + 1440 + 352 + 700 + 602 + 1300 + 100 + 0 + 0 + 0 + + + 204 + 52 + Performance Analyzer + 343 + Performance Analyzer + 0 + + 1 + 4 + 2 + 0 + 76 + 924 + 595 + 1440 + 352 + 700 + 602 + 1300 + 100 + 0 + 0 + 0 + + + 346 + 53 + Code Coverage + 204 + Performance Analyzer + 0 + + 1 + 4 + 2 + 0 + 76 + 924 + 595 + 1440 + 352 + 700 + 602 + 1300 + 100 + 0 + 0 + 0 + + + + + + 1 + 0 + + 100 + 0 + + + ..\..\net\lwip\src\core\netif.c + 0 + 81 + 90 + + + ..\..\src\thread.c + 28 + 208 + 228 + + + .\sam7x_emac.c + 26 + 31 + 51 + + + .\serial.c + 0 + 1 + 1 + + + .\sd.c + 22 + 1 + 6 + + + .\startup.c + 18 + 53 + 59 + + + .\application.c + 1 + 69 + 83 + + + .\board.c + 37 + 127 + 132 + + + ..\..\net\lwip\src\core\ipv4\ip.c + 0 + 158 + 166 + + + ..\..\net\lwip\src\netif\ethernetif.c + 9 + 207 + 216 + + + ..\..\include\rtdef.h + 8 + 122 + 122 + + + ..\..\libcpu\arm\AT91SAM7X\start_rvds.S + 16 + 421 + 439 + + + F:\nf\rt-thread@googlecode\libcpu\arm\AT91SAM7X\start_gcc.S + 11 + 22 + 22 + + + ..\..\libcpu\arm\AT91SAM7X\stack.c + 0 + 44 + 54 + + + ..\..\libcpu\arm\AT91SAM7X\trap.c + 0 + 26 + 26 + + + ..\..\src\kservice.c + 47 + 41 + 57 + + + ..\..\src\irq.c + 0 + 52 + 67 + + + ..\..\libcpu\arm\AT91SAM7X\context_rvds.S + 0 + 56 + 81 + + + .\rtconfig.h + 0 + 55 + 69 + + + ..\..\src\device.c + 0 + 81 + 81 + + + ..\..\net\lwip\src\core\dns.c + 31 + 148 + 156 + + + ..\..\src\clock.c + 5 + 55 + 56 + + + ..\..\src\timer.c + 5 + 349 + 349 + + + ..\..\libcpu\arm\AT91SAM7X\interrupt.c + 5 + 82 + 82 + + + ..\..\src\scheduler.c + 0 + 177 + 192 + + + + + +
diff --git a/bsp/sam7x/project.uvproj b/bsp/sam7x/project.uvproj new file mode 100644 index 0000000000..71d2e3874b --- /dev/null +++ b/bsp/sam7x/project.uvproj @@ -0,0 +1,899 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + + RT-Thread/AT91SAM7X + 0x4 + ARM-ADS + + + AT91SAM7X256 + Atmel + IRAM(0x200000-0x20FFFF) IROM(0x100000-0x13FFFF) CLOCK(18432000) CPUTYPE(ARM7TDMI) + + "STARTUP\Atmel\SAM7.s" ("Atmel AT91SAM7 Startup Code") + UL2ARM(-U56240812 -O15 -S0 -C0 -FO7 -FD200000 -FC800 -FN1 -FF0AT91SAM7_256 -FS0100000 -FL040000) + 4081 + AT91SAM7X256.H + + + + + + + + + + 0 + + + + Atmel\SAM7X\ + Atmel\SAM7X\ + + 0 + 0 + 0 + 0 + 1 + + .\objs\ + rtthread-sam7x + 1 + 0 + 0 + 1 + 1 + .\objs\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARM.DLL + -cAT91SAM7X + DARMATS.DLL + -p91SAM7X256 + SARM.DLL + + TARMATS.DLL + -p91SAM7X256 + + + + 1 + 0 + 0 + 0 + 16 + + + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + + + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + + 0 + 2 + + + + + + + + + + + + + + Segger\JLTAgdi.dll + + + + + 1 + 0 + 0 + 0 + 1 + 4100 + + Segger\JLTAgdi.dll + "" () + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + ARM7TDMI + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 3 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x200000 + 0x10000 + + + 1 + 0x100000 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x100000 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x200000 + 0x10000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + + + + + .;..\..\include;..\sam7x;..\..\finsh;..\..\net\lwip\src\include;..\..\net\lwip\src;..\..\net\lwip\src\arch\include;..\..\net\lwip\src\include\ipv4;;..\..\filesystem\dfs;..\..\filesystem\dfs\include;..\..\filesystem\dfs\filesystems\efsl\src\include;..\..\filesystem\dfs\filesystems\efsl\src\base\include;..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\include + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00100000 + 0x00200000 + + + + --keep __fsym_* --keep __vsym_* + + + + + + + + Startup + + + rtconfig.h + 5 + .\rtconfig.h + + + application.c + 1 + .\application.c + + + board.c + 1 + .\board.c + + + startup.c + 1 + .\startup.c + + + sd.c + 1 + .\sd.c + + + serial.c + 1 + .\serial.c + + + sam7x_emac.c + 1 + .\sam7x_emac.c + + + + + Kernel + + + clock.c + 1 + ..\..\src\clock.c + + + idle.c + 1 + ..\..\src\idle.c + + + ipc.c + 1 + ..\..\src\ipc.c + + + irq.c + 1 + ..\..\src\irq.c + + + kservice.c + 1 + ..\..\src\kservice.c + + + mem.c + 1 + ..\..\src\mem.c + + + mempool.c + 1 + ..\..\src\mempool.c + + + object.c + 1 + ..\..\src\object.c + + + timer.c + 1 + ..\..\src\timer.c + + + scheduler.c + 1 + ..\..\src\scheduler.c + + + slab.c + 1 + ..\..\src\slab.c + + + thread.c + 1 + ..\..\src\thread.c + + + device.c + 1 + ..\..\src\device.c + + + + + AT91SAM7X + + + interrupt.c + 1 + ..\..\libcpu\arm\AT91SAM7X\interrupt.c + + + stack.c + 1 + ..\..\libcpu\arm\AT91SAM7X\stack.c + + + trap.c + 1 + ..\..\libcpu\arm\AT91SAM7X\trap.c + + + cpu.c + 1 + ..\..\libcpu\arm\AT91SAM7X\cpu.c + + + start_rvds.S + 2 + ..\..\libcpu\arm\AT91SAM7X\start_rvds.S + + + context_rvds.S + 2 + ..\..\libcpu\arm\AT91SAM7X\context_rvds.S + + + + + finsh + + + cmd.c + 1 + ..\..\finsh\cmd.c + + + finsh_compiler.c + 1 + ..\..\finsh\finsh_compiler.c + + + finsh_error.c + 1 + ..\..\finsh\finsh_error.c + + + finsh_heap.c + 1 + ..\..\finsh\finsh_heap.c + + + finsh_init.c + 1 + ..\..\finsh\finsh_init.c + + + finsh_node.c + 1 + ..\..\finsh\finsh_node.c + + + finsh_ops.c + 1 + ..\..\finsh\finsh_ops.c + + + finsh_parser.c + 1 + ..\..\finsh\finsh_parser.c + + + finsh_token.c + 1 + ..\..\finsh\finsh_token.c + + + finsh_var.c + 1 + ..\..\finsh\finsh_var.c + + + finsh_vm.c + 1 + ..\..\finsh\finsh_vm.c + + + shell.c + 1 + ..\..\finsh\shell.c + + + symbol.c + 1 + ..\..\finsh\symbol.c + + + + + LwIP + + + dhcp.c + 1 + ..\..\net\lwip\src\core\dhcp.c + + + dns.c + 1 + ..\..\net\lwip\src\core\dns.c + + + init.c + 1 + ..\..\net\lwip\src\core\init.c + + + netif.c + 1 + ..\..\net\lwip\src\core\netif.c + + + pbuf.c + 1 + ..\..\net\lwip\src\core\pbuf.c + + + raw.c + 1 + ..\..\net\lwip\src\core\raw.c + + + stats.c + 1 + ..\..\net\lwip\src\core\stats.c + + + sys.c + 1 + ..\..\net\lwip\src\core\sys.c + + + tcp.c + 1 + ..\..\net\lwip\src\core\tcp.c + + + tcp_in.c + 1 + ..\..\net\lwip\src\core\tcp_in.c + + + tcp_out.c + 1 + ..\..\net\lwip\src\core\tcp_out.c + + + udp.c + 1 + ..\..\net\lwip\src\core\udp.c + + + autoip.c + 1 + ..\..\net\lwip\src\core\ipv4\autoip.c + + + icmp.c + 1 + ..\..\net\lwip\src\core\ipv4\icmp.c + + + igmp.c + 1 + ..\..\net\lwip\src\core\ipv4\igmp.c + + + inet.c + 1 + ..\..\net\lwip\src\core\ipv4\inet.c + + + inet_chksum.c + 1 + ..\..\net\lwip\src\core\ipv4\inet_chksum.c + + + ip.c + 1 + ..\..\net\lwip\src\core\ipv4\ip.c + + + ip_addr.c + 1 + ..\..\net\lwip\src\core\ipv4\ip_addr.c + + + ip_frag.c + 1 + ..\..\net\lwip\src\core\ipv4\ip_frag.c + + + asn1_dec.c + 1 + ..\..\net\lwip\src\core\snmp\asn1_dec.c + + + asn1_enc.c + 1 + ..\..\net\lwip\src\core\snmp\asn1_enc.c + + + mib2.c + 1 + ..\..\net\lwip\src\core\snmp\mib2.c + + + mib_structs.c + 1 + ..\..\net\lwip\src\core\snmp\mib_structs.c + + + msg_in.c + 1 + ..\..\net\lwip\src\core\snmp\msg_in.c + + + msg_out.c + 1 + ..\..\net\lwip\src\core\snmp\msg_out.c + + + api_lib.c + 1 + ..\..\net\lwip\src\api\api_lib.c + + + api_msg.c + 1 + ..\..\net\lwip\src\api\api_msg.c + + + err.c + 1 + ..\..\net\lwip\src\api\err.c + + + netbuf.c + 1 + ..\..\net\lwip\src\api\netbuf.c + + + netdb.c + 1 + ..\..\net\lwip\src\api\netdb.c + + + netifapi.c + 1 + ..\..\net\lwip\src\api\netifapi.c + + + tcpip.c + 1 + ..\..\net\lwip\src\api\tcpip.c + + + etharp.c + 1 + ..\..\net\lwip\src\netif\etharp.c + + + ethernetif.c + 1 + ..\..\net\lwip\src\netif\ethernetif.c + + + loopif.c + 1 + ..\..\net\lwip\src\netif\loopif.c + + + sys_arch_init.c + 1 + ..\..\net\lwip\src\arch\sys_arch_init.c + + + sys_arch.c + 1 + ..\..\net\lwip\src\arch\sys_arch.c + + + sockets.c + 1 + ..\..\net\lwip\src\api\sockets.c + + + memp_tiny.c + 1 + ..\..\net\lwip\src\core\memp_tiny.c + + + + + Filesystem + + + dfs_util.c + 1 + ..\..\filesystem\dfs\src\dfs_util.c + + + dfs_cache.c + 1 + ..\..\filesystem\dfs\src\dfs_cache.c + + + dfs_fs.c + 1 + ..\..\filesystem\dfs\src\dfs_fs.c + + + dfs_init.c + 1 + ..\..\filesystem\dfs\src\dfs_init.c + + + dfs_raw.c + 1 + ..\..\filesystem\dfs\src\dfs_raw.c + + + dfs_posix.c + 1 + ..\..\filesystem\dfs\src\dfs_posix.c + + + plibc.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\base\plibc.c + + + efs.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\base\efs.c + + + extract.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\base\extract.c + + + partition.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\base\partition.c + + + ui.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ui.c + + + dir.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\dir.c + + + fat.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fat.c + + + file.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\file.c + + + fs.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c + + + ls.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ls.c + + + time.c + 1 + ..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\time.c + + + + + + + +
diff --git a/bsp/sam7x/rtconfig.h b/bsp/sam7x/rtconfig.h index 4d41525990..6a47581def 100644 --- a/bsp/sam7x/rtconfig.h +++ b/bsp/sam7x/rtconfig.h @@ -81,7 +81,7 @@ /* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* Using lighweight TCP/IP protocol stack*/ -#define RT_USING_LWIP +//#define RT_USING_LWIP /* Trace LwIP protocol*/ /* #define RT_LWIP_DEBUG */ @@ -139,12 +139,12 @@ #define RT_LWIP_MSKADDR3 0 /* SECTION: DFS options */ -#define RT_USING_DFS +//#define RT_USING_DFS /* the max number of mounted filesystem */ #define DFS_FILESYSTEMS_MAX 1 /* the max number of opened files */ #define DFS_FD_MAX 2 /* the max number of cached sector */ -#define DFS_CACHE_MAX_NUM 4 - +#define DFS_CACHE_MAX_NUM 4 + #endif diff --git a/libcpu/arm/AT91SAM7X/sam7x_emac.c b/bsp/sam7x/sam7x_emac.c similarity index 100% rename from libcpu/arm/AT91SAM7X/sam7x_emac.c rename to bsp/sam7x/sam7x_emac.c diff --git a/libcpu/arm/AT91SAM7X/sam7x_emac.h b/bsp/sam7x/sam7x_emac.h similarity index 100% rename from libcpu/arm/AT91SAM7X/sam7x_emac.h rename to bsp/sam7x/sam7x_emac.h diff --git a/libcpu/arm/AT91SAM7X/serial.c b/bsp/sam7x/serial.c similarity index 99% rename from libcpu/arm/AT91SAM7X/serial.c rename to bsp/sam7x/serial.c index 68fcfb392d..afc61c8165 100644 --- a/libcpu/arm/AT91SAM7X/serial.c +++ b/bsp/sam7x/serial.c @@ -78,8 +78,8 @@ static void rt_hw_serial_isr(int irqno) { rt_base_t level; struct rt_device* device; - struct rt_at91serial* serial = RT_NULL; - + struct rt_at91serial* serial = RT_NULL; + #ifdef RT_USING_UART1 if (irqno == AT91C_ID_US0) { diff --git a/libcpu/arm/AT91SAM7X/serial.h b/bsp/sam7x/serial.h similarity index 100% rename from libcpu/arm/AT91SAM7X/serial.h rename to bsp/sam7x/serial.h diff --git a/bsp/sam7x/startup.c b/bsp/sam7x/startup.c index c2ba230687..7945a55c5e 100644 --- a/bsp/sam7x/startup.c +++ b/bsp/sam7x/startup.c @@ -15,7 +15,6 @@ #include #include -#include #include "board.h" #ifdef RT_USING_DFS diff --git a/include/rtthread.h b/include/rtthread.h index e2654496b0..ae619f4a31 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -112,6 +112,7 @@ rt_err_t rt_thread_control(rt_thread_t thread, rt_uint8_t cmd, void* arg); rt_err_t rt_thread_suspend(rt_thread_t thread); rt_err_t rt_thread_resume(rt_thread_t thread); void rt_thread_timeout(void* parameter); +void rt_thread_exit(void); /* * idle thread interface @@ -175,7 +176,7 @@ void rt_free (void *ptr); void* rt_realloc(void *ptr, rt_size_t nbytes); void *rt_calloc(rt_size_t count, rt_size_t size); -void rt_memory_info(rt_uint32_t *total, +void rt_memory_info(rt_uint32_t *total, rt_uint32_t *used, rt_uint32_t *max_used); diff --git a/libcpu/arm/AT91SAM7X/cpu.c b/libcpu/arm/AT91SAM7X/cpu.c index 679fddc454..1905da812e 100644 --- a/libcpu/arm/AT91SAM7X/cpu.c +++ b/libcpu/arm/AT91SAM7X/cpu.c @@ -13,7 +13,7 @@ */ #include -#include "AT91SAM7X.h" + /** * @addtogroup AT91SAM7X diff --git a/libcpu/arm/AT91SAM7X/interrupt.c b/libcpu/arm/AT91SAM7X/interrupt.c index 014451a1ff..f5e6157dbd 100644 --- a/libcpu/arm/AT91SAM7X/interrupt.c +++ b/libcpu/arm/AT91SAM7X/interrupt.c @@ -13,7 +13,7 @@ */ #include -#include "AT91SAM7X.h" +#include "AT91SAM7X256.h" #define MAX_HANDLERS 32 @@ -41,7 +41,7 @@ void rt_hw_interrupt_init() for (index = 0; index < MAX_HANDLERS; index ++) { - AT91C_AIC_SVR(index) = (rt_uint32_t)rt_hw_interrupt_handler; + AT91C_BASE_AIC->AIC_SVR[index] = (rt_uint32_t)rt_hw_interrupt_handler; } /* init interrupt nest, and context in thread sp */ @@ -58,10 +58,10 @@ void rt_hw_interrupt_init() void rt_hw_interrupt_mask(int vector) { /* disable interrupt */ - AT91C_AIC_IDCR = 1 << vector; - + AT91C_BASE_AIC->AIC_IDCR = 1 << vector; + /* clear interrupt */ - AT91C_AIC_ICCR = 1 << vector; + AT91C_BASE_AIC->AIC_ICCR = 1 << vector; } /** @@ -70,7 +70,7 @@ void rt_hw_interrupt_mask(int vector) */ void rt_hw_interrupt_umask(int vector) { - AT91C_AIC_IECR = 1 << vector; + AT91C_BASE_AIC->AIC_IECR = 1 << vector; } /** @@ -83,8 +83,8 @@ void rt_hw_interrupt_install(int vector, rt_isr_handler_t new_handler, rt_isr_ha { if(vector >= 0 && vector < MAX_HANDLERS) { - if (*old_handler != RT_NULL) *old_handler = (rt_isr_handler_t)AT91C_AIC_SVR(vector); - if (new_handler != RT_NULL) AT91C_AIC_SVR(vector) = (rt_uint32_t)new_handler; + if (*old_handler != RT_NULL) *old_handler = (rt_isr_handler_t)AT91C_BASE_AIC->AIC_SVR[vector]; + if (new_handler != RT_NULL) AT91C_BASE_AIC->AIC_SVR[vector] = (rt_uint32_t)new_handler; } } diff --git a/libcpu/arm/AT91SAM7X/stack.c b/libcpu/arm/AT91SAM7X/stack.c index 4f3b2c3976..6060b63722 100644 --- a/libcpu/arm/AT91SAM7X/stack.c +++ b/libcpu/arm/AT91SAM7X/stack.c @@ -12,7 +12,8 @@ * 2006-08-23 Bernard the first version */ #include -#include "AT91SAM7X.h" + +#define SVCMODE 0x13 /** * @addtogroup AT91SAM7 diff --git a/libcpu/arm/AT91SAM7X/start_rvds.S b/libcpu/arm/AT91SAM7X/start_rvds.S index 28ab8aefa0..453d8beea2 100644 --- a/libcpu/arm/AT91SAM7X/start_rvds.S +++ b/libcpu/arm/AT91SAM7X/start_rvds.S @@ -27,6 +27,7 @@ ; Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs ; 2009-12-28 MingBai Bug fix (USR mode stack removed). +; 2009-12-29 MingBai Merge svc and irq stack, add abort handler. Mode_USR EQU 0x10 Mode_FIQ EQU 0x11 @@ -55,7 +56,7 @@ RAM_BASE EQU 0x00200000 ;// UND_Stack_Size EQU 0x00000000 -SVC_Stack_Size EQU 0x00000100 +SVC_Stack_Size EQU 0x00000000 ABT_Stack_Size EQU 0x00000000 FIQ_Stack_Size EQU 0x00000000 IRQ_Stack_Size EQU 0x00000100 @@ -238,8 +239,8 @@ FIQ_Addr DCD FIQ_Handler Undef_Handler B Undef_Handler SWI_Handler B SWI_Handler -PAbt_Handler B PAbt_Handler -DAbt_Handler B DAbt_Handler +PAbt_Handler B Abort_Handler +DAbt_Handler B Abort_Handler FIQ_Handler B FIQ_Handler @@ -365,22 +366,22 @@ MC_RCR EQU 0x00 ; MC_RCR Offset ; Enter Undefined Instruction Mode and set its Stack Pointer MSR CPSR_c, #Mode_UND:OR:I_Bit:OR:F_Bit MOV SP, R0 - SUB R0, R0, #UND_Stack_Size + ;SUB R0, R0, #UND_Stack_Size ; Enter Abort Mode and set its Stack Pointer MSR CPSR_c, #Mode_ABT:OR:I_Bit:OR:F_Bit MOV SP, R0 - SUB R0, R0, #ABT_Stack_Size + ;SUB R0, R0, #ABT_Stack_Size ; Enter FIQ Mode and set its Stack Pointer MSR CPSR_c, #Mode_FIQ:OR:I_Bit:OR:F_Bit MOV SP, R0 - SUB R0, R0, #FIQ_Stack_Size + ;SUB R0, R0, #FIQ_Stack_Size ; Enter IRQ Mode and set its Stack Pointer MSR CPSR_c, #Mode_IRQ:OR:I_Bit:OR:F_Bit MOV SP, R0 - SUB R0, R0, #IRQ_Stack_Size + ;SUB R0, R0, #IRQ_Stack_Size ; Enter Supervisor Mode and set its Stack Pointer MSR CPSR_c, #Mode_SVC:OR:I_Bit:OR:F_Bit @@ -414,6 +415,16 @@ MC_RCR EQU 0x00 ; MC_RCR Offset IMPORT rt_interrupt_from_thread IMPORT rt_interrupt_to_thread IMPORT rt_hw_trap_irq + IMPORT rt_hw_trap_abort + +Abort_Handler PROC + EXPORT Abort_Handler + stmfd sp!, {r0-r12,lr} + bl rt_interrupt_enter + bl rt_hw_trap_abort + bl rt_interrupt_leave + b SWITCH + ENDP IRQ_Handler PROC EXPORT IRQ_Handler @@ -424,7 +435,7 @@ IRQ_Handler PROC ; if rt_thread_switch_interrput_flag set, jump to ; rt_hw_context_switch_interrupt_do and don't return - LDR r0, =rt_thread_switch_interrput_flag +SWITCH LDR r0, =rt_thread_switch_interrput_flag LDR r1, [r0] CMP r1, #1 BEQ rt_hw_context_switch_interrupt_do @@ -492,7 +503,7 @@ rt_hw_context_switch_interrupt_do PROC __user_initial_stackheap LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + SVC_Stack_Size) + LDR R1, = (Stack_Mem + IRQ_Stack_Size) LDR R2, = (Heap_Mem + Heap_Size) LDR R3, = Stack_Mem BX LR diff --git a/libcpu/arm/AT91SAM7X/trap.c b/libcpu/arm/AT91SAM7X/trap.c index 62346cb32d..513871a462 100644 --- a/libcpu/arm/AT91SAM7X/trap.c +++ b/libcpu/arm/AT91SAM7X/trap.c @@ -15,7 +15,7 @@ #include #include -#include "AT91SAM7X.h" +#include "AT91SAM7X256.h" /** * @addtogroup AT91SAM7 @@ -24,12 +24,12 @@ void rt_hw_trap_irq() { - rt_isr_handler_t hander = (rt_isr_handler_t)AT91C_AIC_IVR; + rt_isr_handler_t hander = (rt_isr_handler_t)AT91C_BASE_AIC->AIC_IVR; - hander(AT91C_AIC_ISR); + hander(AT91C_BASE_AIC->AIC_ISR); /* end of interrupt */ - AT91C_AIC_EOICR = 0; + AT91C_BASE_AIC->AIC_EOICR = 0; } void rt_hw_trap_fiq() @@ -37,4 +37,10 @@ void rt_hw_trap_fiq() rt_kprintf("fast interrupt request\n"); } +extern void rt_thread_exit(void); +void rt_hw_trap_abort() +{ + rt_thread_exit(); + rt_kprintf("Abort occured, thread terminated.\n"); +} /*@}*/ diff --git a/src/thread.c b/src/thread.c index a9bfd91144..e678b06946 100644 --- a/src/thread.c +++ b/src/thread.c @@ -34,7 +34,6 @@ extern rt_uint8_t rt_current_priority; extern rt_list_t rt_thread_defunct; #endif -static void rt_thread_exit(void); void rt_thread_timeout(void* parameter); static rt_err_t _rt_thread_init(struct rt_thread* thread, @@ -223,7 +222,7 @@ rt_err_t rt_thread_startup (rt_thread_t thread) return RT_EOK; } -static void rt_thread_exit() +void rt_thread_exit() { struct rt_thread* thread; register rt_base_t temp; -- GitLab