NIL e200z0 report.

Added "volatile" to NIL system time variable.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8071 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2015-07-09 08:37:27 +00:00
parent 5ff1c429f8
commit a566fb49fa
8 changed files with 228 additions and 10 deletions

View File

@ -88,7 +88,7 @@ include $(CHIBIOS)/os/hal/ports/SPC5/SPC560Dxx/platform.mk
include $(CHIBIOS)/os/hal/osal/nil/osal.mk
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/nil/ports/e200/compilers/GCC/mk/port_spc560dxx.mk
#include $(CHIBIOS)/test/nil/test.mk
include $(CHIBIOS)/test/nil/test.mk
# Define linker script file here
LDSCRIPT= $(PORTLD)/SPC560D40.ld

View File

@ -16,7 +16,7 @@
#include "nil.h"
#include "hal.h"
//#include "test.h"
#include "ch_test.h"
/*
* LEDs blinker thread, times are in milliseconds.
@ -34,8 +34,6 @@ static THD_FUNCTION(Thread1, arg) {
while (true) {
unsigned i;
chnWriteTimeout(&SD1, (uint8_t *)"Hello World!\r\n", 14, TIME_INFINITE);
for (i = 0; i < 4; i++) {
palClearPad(PORT_E, PE_LED1);
chThdSleepMilliseconds(100);
@ -93,12 +91,38 @@ static THD_FUNCTION(Thread1, arg) {
}
}
/*
* Tester thread.
*/
THD_WORKING_AREA(waThread2, 128);
THD_FUNCTION(Thread2, arg) {
(void)arg;
/*
* Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD1, NULL);
/* Welcome message.*/
chnWriteTimeout(&SD1, (uint8_t *)"Hello World!\r\n", 14, TIME_INFINITE);
/* Waiting for button push and activation of the test suite.*/
while (true) {
if (palReadPad(PORT_E, PE_BUTTON1))
test_execute((BaseSequentialStream *)&SD1);
chThdSleepMilliseconds(500);
}
}
/*
* Threads static table, one entry per thread. The number of entries must
* match NIL_CFG_NUM_THREADS.
*/
THD_TABLE_BEGIN
THD_TABLE_ENTRY(waThread1, "blinker", Thread1, NULL)
THD_TABLE_ENTRY(waThread1, "blinker", Thread1, NULL)
THD_TABLE_ENTRY(wa_test_support, "test_support", test_support, (void *)&nil.threads[2])
THD_TABLE_ENTRY(waThread2, "tester", Thread2, NULL)
THD_TABLE_END
/*

View File

@ -40,7 +40,7 @@
* @note This number is not inclusive of the idle thread which is
* Implicitly handled.
*/
#define NIL_CFG_NUM_THREADS 1
#define NIL_CFG_NUM_THREADS 3
/** @} */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
*** ChibiOS/NIL Test Suite
***
*** Compiled: Jul 9 2015 - 10:31:29
*** Platform: SPC560Dxx Car Body and Convenience
*** Test Board: EVB with SPC560Dxx Mini Module
----------------------------------------------------------------------------
--- Test Case 1.1 (System Tick Counter functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Thread Sleep functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.1 (semaphore primitives, no state change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (semaphore primitives, with state change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (semaphores timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (suspend and resume functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.5 (events functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
Final result: SUCCESS

View File

@ -0,0 +1,164 @@
*** ChibiOS/RT test suite
***
*** Kernel: 3.0.0
*** Compiled: Jul 9 2015 - 10:10:38
*** Compiler: GCC 4.6.3 build on 2013-01-07
*** Architecture: Power Architecture
*** Core Variant: e200z0
*** Port Info: VLE mode
*** Platform: SPC560Dxx Car Body and Convenience
*** Test Board: EVB with SPC560Dxx Mini Module
----------------------------------------------------------------------------
--- Test Case 1.1 (System, critical zones)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (System, interrupts handling)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (System, integrity)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.1 (Threads, enqueuing test #1)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Threads, enqueuing test #2)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Threads, priority change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (Threads, delays)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.1 (Semaphores, enqueuing)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Semaphores, timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Semaphores, atomic signal-wait)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (Binary Semaphores, functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.1 (Mutexes, priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.2 (Mutexes, priority return)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.3 (Mutexes, status)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.4 (CondVar, signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.5 (CondVar, broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.6 (CondVar, boost test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.1 (Messages, loop)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.1 (Mailboxes, queuing and timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.1 (Events, registration and dispatch)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Events, wait and broadcast)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Events, timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.1 (Heap, allocation and fragmentation test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.1 (Memory Pools, queue/dequeue)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.1 (Dynamic APIs, threads creation from heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Dynamic APIs, threads creation from memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.3 (Dynamic APIs, registry and references)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Queues, input queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Queues, output queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.1 (Benchmark, messages #1)
--- Score : 152789 msgs/S, 305578 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.2 (Benchmark, messages #2)
--- Score : 128902 msgs/S, 257804 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.3 (Benchmark, messages #3)
--- Score : 128898 msgs/S, 257796 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.4 (Benchmark, context switch)
--- Score : 452752 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.5 (Benchmark, threads, full cycle)
--- Score : 102399 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.6 (Benchmark, threads, create only)
--- Score : 145797 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.7 (Benchmark, mass reschedule, 5 threads)
--- Score : 40187 reschedules/S, 241122 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.8 (Benchmark, round robin context switching)
--- Score : 315140 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.9 (Benchmark, I/O Queues throughput)
--- Score : 400616 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.10 (Benchmark, virtual timers set/reset)
--- Score : 637904 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.11 (Benchmark, semaphores wait/signal)
--- Score : 637644 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.12 (Benchmark, mutexes lock/unlock)
--- Score : 503400 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.13 (Benchmark, RAM footprint)
--- System: 640 bytes
--- Thread: 68 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- Queue : 36 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------
Final result: SUCCESS

View File

@ -402,7 +402,7 @@ struct nil_system {
/**
* @brief System time.
*/
systime_t systime;
volatile systime_t systime;
#endif
#if (NIL_CFG_ST_TIMEDELTA > 0) || defined(__DOXYGEN__)
/**

View File

@ -502,9 +502,7 @@ static inline void port_enable(void) {
*/
static inline void port_wait_for_interrupt(void) {
#if PPC_ENABLE_WFI_IDLE
asm volatile ("wait" : : : "memory");
#endif
}
/**