Improved test code, architecture names added to the port code.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@918 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2009-04-25 14:56:16 +00:00
parent a2a8822648
commit 756658a69a
9 changed files with 53 additions and 5 deletions

View File

@ -30,6 +30,11 @@
*/
#define CH_ARCHITECTURE_WIN32SIM
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "WIN32 Simulator"
/**
* 32 bit stack alignment.
*/

View File

@ -40,6 +40,11 @@
*/
#define CH_ARCHITECTURE_ARM7
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "ARM7TDMI"
/**
* 32 bit stack alignment.
*/

View File

@ -88,6 +88,11 @@
*/
#define CH_ARCHITECTURE_ARMCM3
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "ARM Cortex-M3"
/**
* 32 bit stack alignment.
*/

View File

@ -42,6 +42,11 @@
*/
#define CH_ARCHITECTURE_AVR
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "AVR"
/**
* 8 bit stack alignment.
*/

View File

@ -42,6 +42,11 @@
*/
#define CH_ARCHITECTURE_MSP430
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "MSP430"
/**
* 16 bit stack alignment.
*/

View File

@ -93,6 +93,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
- NEW: Added a new "naked" context switch benchmark that better defines the
real context switch time, previous benchmarks introduced too much overhead
to the measurement. The STM32 performs the context switch in under 1.48uS.
- NEW: Added architecture name strings to the port code.
- CHANGE: Removed the chMsgSendWithEvent() function. It is rarely used and
the functionality can be re-created with a compound atomic operation. Also
removed the CH_USE_MESSAGES_EVENT configuration option.

View File

@ -32,6 +32,11 @@
*/
#define CH_ARCHITECTURE_XXX
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME ""
/**
* Base type for stack alignment.
* This type is used only for stack alignment reasons thus can be anything from

View File

@ -30,6 +30,11 @@
*/
#define CH_ARCHITECTURE_WIN32SIM
/**
* Name of the implemented architecture.
*/
#define CH_ARCHITECTURE_NAME "WIN32 Simulator"
/**
* 32 bit stack alignment.
*/

View File

@ -228,14 +228,26 @@ static void execute_test(const struct testcase *tcp) {
test_wait_threads();
}
static void print_line(void) {
unsigned i;
for (i = 0; i < 76; i++)
chFDDPut(comp, '-');
chFDDPut(comp, '\r');
chFDDPut(comp, '\n');
}
msg_t TestThread(void *p) {
int i, j;
comp = p;
test_println("");
test_println("*****************************");
test_println("*** ChibiOS/RT test suite ***");
test_println("*****************************");
test_println("*** ChibiOS/RT test suite");
test_println("***");
test_print("*** Kernel: ");
test_println(CH_KERNEL_VERSION);
test_print("*** Architecture: ");
test_println(CH_ARCHITECTURE_NAME);
test_println("");
global_fail = FALSE;
@ -246,7 +258,7 @@ msg_t TestThread(void *p) {
#if DELAY_BETWEEN_TESTS > 0
chThdSleepMilliseconds(DELAY_BETWEEN_TESTS);
#endif
test_println("---------------------------------------------------------------------------");
print_line();
test_print("--- Test Case ");
test_printn(i + 1);
test_print(".");
@ -268,7 +280,7 @@ msg_t TestThread(void *p) {
}
i++;
}
test_println("---------------------------------------------------------------------------");
print_line();
test_println("");
test_print("Final result: ");
if (global_fail)