diff --git a/demos/Win32-MinGW/chcore.h b/demos/Win32-MinGW/chcore.h index 276b935da..fdeb245fb 100644 --- a/demos/Win32-MinGW/chcore.h +++ b/demos/Win32-MinGW/chcore.h @@ -30,6 +30,11 @@ */ #define CH_ARCHITECTURE_WIN32SIM +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "WIN32 Simulator" + /** * 32 bit stack alignment. */ diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 3dfef7d80..541207eef 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -40,6 +40,11 @@ */ #define CH_ARCHITECTURE_ARM7 +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "ARM7TDMI" + /** * 32 bit stack alignment. */ diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index 5ef44a09f..e54f3ca64 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -88,6 +88,11 @@ */ #define CH_ARCHITECTURE_ARMCM3 +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "ARM Cortex-M3" + /** * 32 bit stack alignment. */ diff --git a/ports/AVR/chcore.h b/ports/AVR/chcore.h index 30eb905fc..c70c5307e 100644 --- a/ports/AVR/chcore.h +++ b/ports/AVR/chcore.h @@ -42,6 +42,11 @@ */ #define CH_ARCHITECTURE_AVR +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "AVR" + /** * 8 bit stack alignment. */ diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index b7998371d..313108cde 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -42,6 +42,11 @@ */ #define CH_ARCHITECTURE_MSP430 +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "MSP430" + /** * 16 bit stack alignment. */ diff --git a/readme.txt b/readme.txt index 3213f5122..dff88063a 100644 --- a/readme.txt +++ b/readme.txt @@ -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. diff --git a/src/templates/chcore.h b/src/templates/chcore.h index c5d750cfb..c8a0d8222 100644 --- a/src/templates/chcore.h +++ b/src/templates/chcore.h @@ -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 diff --git a/test/coverage/chcore.h b/test/coverage/chcore.h index 321bd816e..9347a7d5e 100644 --- a/test/coverage/chcore.h +++ b/test/coverage/chcore.h @@ -30,6 +30,11 @@ */ #define CH_ARCHITECTURE_WIN32SIM +/** + * Name of the implemented architecture. + */ +#define CH_ARCHITECTURE_NAME "WIN32 Simulator" + /** * 32 bit stack alignment. */ diff --git a/test/test.c b/test/test.c index 531928bbe..d64ec06bd 100644 --- a/test/test.c +++ b/test/test.c @@ -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)