LPC1xxx board files and demos updated.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2498 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2010-12-19 09:36:44 +00:00
parent 7d7d9727f9
commit ada9fb82aa
8 changed files with 42 additions and 44 deletions

View File

@ -34,25 +34,18 @@ const PALConfig pal_default_config = {
/* /*
* Early initialization code. * Early initialization code.
* This initialization is performed just after reset before BSS and DATA * This initialization must be performed just after stack setup and before
* segments initialization. * any other initialization.
*/ */
void hwinit0(void) { void __early_init(void) {
lpc111x_clock_init(); lpc111x_clock_init();
} }
/* /*
* Late initialization code. * Board-specific initialization code.
* This initialization is performed after BSS and DATA segments initialization
* and before invoking the main() function.
*/ */
void hwinit1(void) { void boardInit(void) {
/*
* HAL initialization.
*/
halInit();
/* /*
* Extra, board-specific, initializations. * Extra, board-specific, initializations.
@ -64,9 +57,4 @@ void hwinit1(void) {
and makes it GPIO1_2. */ and makes it GPIO1_2. */
LPC_IOCON->PIO1_9 = 0xC0; /* Disables pull-up on LED3R output.*/ LPC_IOCON->PIO1_9 = 0xC0; /* Disables pull-up on LED3R output.*/
LPC_IOCON->PIO1_10 = 0xC0; /* Disables pull-up on LED3G output.*/ LPC_IOCON->PIO1_10 = 0xC0; /* Disables pull-up on LED3G output.*/
/*
* ChibiOS/RT initialization.
*/
chSysInit();
} }

View File

@ -86,12 +86,14 @@
#define GPIO1_LED3G 10 #define GPIO1_LED3G 10
#define GPIO1_SPI0SEL 11 #define GPIO1_SPI0SEL 11
#if !defined(_FROM_ASM_)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void hwinit(void); void boardInit(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */ #endif /* _BOARD_H_ */

View File

@ -34,25 +34,18 @@ const PALConfig pal_default_config = {
/* /*
* Early initialization code. * Early initialization code.
* This initialization is performed just after reset before BSS and DATA * This initialization must be performed just after stack setup and before
* segments initialization. * any other initialization.
*/ */
void hwinit0(void) { void __early_init(void) {
LPC13xx_clock_init(); LPC13xx_clock_init();
} }
/* /*
* Late initialization code. * Board-specific initialization code.
* This initialization is performed after BSS and DATA segments initialization
* and before invoking the main() function.
*/ */
void hwinit1(void) { void boardInit(void) {
/*
* HAL initialization.
*/
halInit();
/* /*
* Extra, board-specific, initializations. * Extra, board-specific, initializations.
@ -64,9 +57,4 @@ void hwinit1(void) {
and makes it GPIO1_2. */ and makes it GPIO1_2. */
LPC_IOCON->PIO1_9 = 0xC0; /* Disables pull-up on LED3R output.*/ LPC_IOCON->PIO1_9 = 0xC0; /* Disables pull-up on LED3R output.*/
LPC_IOCON->PIO1_10 = 0xC0; /* Disables pull-up on LED3G output.*/ LPC_IOCON->PIO1_10 = 0xC0; /* Disables pull-up on LED3G output.*/
/*
* ChibiOS/RT initialization.
*/
chSysInit();
} }

View File

@ -81,12 +81,14 @@
#define GPIO1_LED3G 10 #define GPIO1_LED3G 10
#define GPIO1_SPI0SEL 11 #define GPIO1_SPI0SEL 11
#if !defined(_FROM_ASM_)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void hwinit(void); void boardInit(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */ #endif /* _BOARD_H_ */

View File

@ -92,8 +92,7 @@ static msg_t Thread2(void *arg) {
} }
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
uint8_t i; uint8_t i;
@ -101,6 +100,16 @@ int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)argv; (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 SD1 and SPI1 drivers. * Activates the SD1 and SPI1 drivers.
*/ */

View File

@ -92,8 +92,7 @@ static msg_t Thread2(void *arg) {
} }
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
uint8_t i; uint8_t i;
@ -101,6 +100,16 @@ int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)argv; (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 SD1 and SPI1 drivers. * Activates the SD1 and SPI1 drivers.
*/ */

View File

@ -5,7 +5,7 @@ Settings: CLK=48, (3 wait states)
*** ChibiOS/RT test suite *** ChibiOS/RT test suite
*** ***
*** Kernel: 2.1.5unstable *** Kernel: 2.1.6unstable
*** GCC Version: 4.3.3 *** GCC Version: 4.3.3
*** Architecture: ARMv6-M *** Architecture: ARMv6-M
*** Core Variant: Cortex-M0 *** Core Variant: Cortex-M0

View File

@ -5,7 +5,7 @@ Settings: CLK=72, (3 wait states)
*** ChibiOS/RT test suite *** ChibiOS/RT test suite
*** ***
*** Kernel: 2.1.5unstable *** Kernel: 2.1.6unstable
*** GCC Version: 4.3.3 *** GCC Version: 4.3.3
*** Architecture: ARMv7-M *** Architecture: ARMv7-M
*** Core Variant: Cortex-M3 *** Core Variant: Cortex-M3
@ -98,7 +98,7 @@ Settings: CLK=72, (3 wait states)
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1) --- Test Case 11.1 (Benchmark, messages #1)
--- Score : 241880 msgs/S, 483760 ctxswc/S --- Score : 241881 msgs/S, 483762 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2) --- Test Case 11.2 (Benchmark, messages #2)
@ -126,7 +126,7 @@ Settings: CLK=72, (3 wait states)
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching) --- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 473396 ctxswc/S --- Score : 473392 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput) --- Test Case 11.9 (Benchmark, I/O Queues throughput)