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:
parent
a2a8822648
commit
756658a69a
|
@ -30,6 +30,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_WIN32SIM
|
#define CH_ARCHITECTURE_WIN32SIM
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "WIN32 Simulator"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 32 bit stack alignment.
|
* 32 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,6 +40,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_ARM7
|
#define CH_ARCHITECTURE_ARM7
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "ARM7TDMI"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 32 bit stack alignment.
|
* 32 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -88,6 +88,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_ARMCM3
|
#define CH_ARCHITECTURE_ARMCM3
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "ARM Cortex-M3"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 32 bit stack alignment.
|
* 32 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_AVR
|
#define CH_ARCHITECTURE_AVR
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "AVR"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 8 bit stack alignment.
|
* 8 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_MSP430
|
#define CH_ARCHITECTURE_MSP430
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "MSP430"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 16 bit stack alignment.
|
* 16 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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
|
- NEW: Added a new "naked" context switch benchmark that better defines the
|
||||||
real context switch time, previous benchmarks introduced too much overhead
|
real context switch time, previous benchmarks introduced too much overhead
|
||||||
to the measurement. The STM32 performs the context switch in under 1.48uS.
|
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
|
- CHANGE: Removed the chMsgSendWithEvent() function. It is rarely used and
|
||||||
the functionality can be re-created with a compound atomic operation. Also
|
the functionality can be re-created with a compound atomic operation. Also
|
||||||
removed the CH_USE_MESSAGES_EVENT configuration option.
|
removed the CH_USE_MESSAGES_EVENT configuration option.
|
||||||
|
|
|
@ -32,6 +32,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_XXX
|
#define CH_ARCHITECTURE_XXX
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME ""
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base type for stack alignment.
|
* Base type for stack alignment.
|
||||||
* This type is used only for stack alignment reasons thus can be anything from
|
* This type is used only for stack alignment reasons thus can be anything from
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
*/
|
*/
|
||||||
#define CH_ARCHITECTURE_WIN32SIM
|
#define CH_ARCHITECTURE_WIN32SIM
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the implemented architecture.
|
||||||
|
*/
|
||||||
|
#define CH_ARCHITECTURE_NAME "WIN32 Simulator"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 32 bit stack alignment.
|
* 32 bit stack alignment.
|
||||||
*/
|
*/
|
||||||
|
|
22
test/test.c
22
test/test.c
|
@ -228,14 +228,26 @@ static void execute_test(const struct testcase *tcp) {
|
||||||
test_wait_threads();
|
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) {
|
msg_t TestThread(void *p) {
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
comp = p;
|
comp = p;
|
||||||
test_println("");
|
test_println("");
|
||||||
test_println("*****************************");
|
test_println("*** ChibiOS/RT test suite");
|
||||||
test_println("*** ChibiOS/RT test suite ***");
|
test_println("***");
|
||||||
test_println("*****************************");
|
test_print("*** Kernel: ");
|
||||||
|
test_println(CH_KERNEL_VERSION);
|
||||||
|
test_print("*** Architecture: ");
|
||||||
|
test_println(CH_ARCHITECTURE_NAME);
|
||||||
test_println("");
|
test_println("");
|
||||||
|
|
||||||
global_fail = FALSE;
|
global_fail = FALSE;
|
||||||
|
@ -246,7 +258,7 @@ msg_t TestThread(void *p) {
|
||||||
#if DELAY_BETWEEN_TESTS > 0
|
#if DELAY_BETWEEN_TESTS > 0
|
||||||
chThdSleepMilliseconds(DELAY_BETWEEN_TESTS);
|
chThdSleepMilliseconds(DELAY_BETWEEN_TESTS);
|
||||||
#endif
|
#endif
|
||||||
test_println("---------------------------------------------------------------------------");
|
print_line();
|
||||||
test_print("--- Test Case ");
|
test_print("--- Test Case ");
|
||||||
test_printn(i + 1);
|
test_printn(i + 1);
|
||||||
test_print(".");
|
test_print(".");
|
||||||
|
@ -268,7 +280,7 @@ msg_t TestThread(void *p) {
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
test_println("---------------------------------------------------------------------------");
|
print_line();
|
||||||
test_println("");
|
test_println("");
|
||||||
test_print("Final result: ");
|
test_print("Final result: ");
|
||||||
if (global_fail)
|
if (global_fail)
|
||||||
|
|
Loading…
Reference in New Issue