AT91SAM7x board files and demos updated.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2500 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-12-19 10:25:31 +00:00
parent f131e4297d
commit 35c315a77a
12 changed files with 105 additions and 54 deletions

View File

@ -60,10 +60,10 @@ static CH_IRQ_HANDLER(SYSIrqHandler) {
/*
* Early initialization code.
* This initialization is performed just after reset before BSS and DATA
* segments initialization.
* This initialization must be performed just after stack setup and before
* any other initialization.
*/
void hwinit0(void) {
void __early_init(void) {
/* Watchdog disabled.*/
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDDIS;
@ -72,16 +72,9 @@ void hwinit0(void) {
}
/*
* Late initialization code.
* This initialization is performed after BSS and DATA segments initialization
* and before invoking the main() function.
* Board-specific initialization code.
*/
void hwinit1(void) {
/*
* HAL initialization.
*/
halInit();
void boardInit(void) {
/*
* LCD pins setup.
@ -124,9 +117,4 @@ void hwinit1(void) {
AT91C_BASE_PIOA->PIO_PDR = AT91C_PA3_RTS0 | AT91C_PA4_CTS0;
AT91C_BASE_PIOA->PIO_ASR = AT91C_PIO_PA3 | AT91C_PIO_PA4;
AT91C_BASE_PIOA->PIO_PPUDR = AT91C_PIO_PA3 | AT91C_PIO_PA4;
/*
* ChibiOS/RT initialization.
*/
chSysInit();
}

View File

@ -91,4 +91,14 @@
#define PIOB_PHY_IRQ 26
#define PIOB_PHY_IRQ_MASK (1 << PIOB_PHY_IRQ)
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */

View File

@ -54,10 +54,10 @@ static CH_IRQ_HANDLER(SYSIrqHandler) {
/*
* Early initialization code.
* This initialization is performed just after reset before BSS and DATA
* segments initialization.
* This initialization must be performed just after stack setup and before
* any other initialization.
*/
void hwinit0(void) {
void __early_init(void) {
/* Watchdog disabled.*/
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDDIS;
@ -66,16 +66,9 @@ void hwinit0(void) {
}
/*
* Late initialization code.
* This initialization is performed after BSS and DATA segments initialization
* and before invoking the main() function.
* Board-specific initialization code.
*/
void hwinit1(void) {
/*
* HAL initialization.
*/
halInit();
void boardInit(void) {
/*
* LED pins setup.
@ -106,9 +99,4 @@ void hwinit1(void) {
AIC_EnableIT(AT91C_ID_SYS);
AT91C_BASE_PITC->PITC_PIMR = (MCK / 16 / CH_FREQUENCY) - 1;
AT91C_BASE_PITC->PITC_PIMR |= AT91C_PITC_PITEN | AT91C_PITC_PITIEN;
/*
* ChibiOS/RT initialization.
*/
chSysInit();
}

View File

@ -71,4 +71,14 @@
#define PIOA_MMC_NPCS0 11
#define PIOA_MMC_NPCS0_MASK (1 << PIOA_MMC_NPCS0_MASK)
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */

View File

@ -291,8 +291,7 @@ static void RemoveHandler(eventid_t id) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
static const evhandler_t evhndl[] = {
@ -305,6 +304,16 @@ int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/

View File

@ -35,13 +35,23 @@ static msg_t Thread1(void *p) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/

View File

@ -274,8 +274,7 @@ static void RemoveHandler(eventid_t id) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
static const evhandler_t evhndl[] = {
@ -288,6 +287,16 @@ int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/

View File

@ -35,13 +35,22 @@ static msg_t Thread1(void *p) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/

View File

@ -38,14 +38,23 @@ static msg_t Thread1(void *p) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/

View File

@ -39,14 +39,23 @@ static msg_t Thread1(void *p) {
}
/*
* Entry point, note, the main() function is already a thread in the system
* on entry.
* Application entry point.
*/
int main(int argc, char **argv) {
(void)argc;
(void)argv;
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 2 using the driver default configuration.
*/

View File

@ -5,7 +5,7 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
*** ChibiOS/RT test suite
***
*** Kernel: 2.1.4unstable
*** Kernel: 2.1.6unstable
*** GCC Version: 4.5.1
*** Architecture: ARM7
*** Core Variant: ARM7TDMI
@ -114,11 +114,11 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 67349 threads/S
--- Score : 65956 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 96994 threads/S
--- Score : 95636 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
@ -126,7 +126,7 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 211344 ctxswc/S
--- Score : 211348 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)

View File

@ -5,7 +5,7 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
*** ChibiOS/RT test suite
***
*** Kernel: 2.1.4unstable
*** Kernel: 2.1.6unstable
*** GCC Version: 4.5.1
*** Architecture: ARM7
*** Core Variant: ARM7TDMI
@ -98,7 +98,7 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
--- Score : 106526 msgs/S, 213052 ctxswc/S
--- Score : 106525 msgs/S, 213050 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
@ -114,11 +114,11 @@ Settings: MCK=48.054857, MC_FMR = AT91C_MC_FWS_1FWS (1 wait state)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 70339 threads/S
--- Score : 68821 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 105584 threads/S
--- Score : 104432 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)