diff --git a/docs/Doxyfile b/docs/Doxyfile
index d6c461d6c..a7ee51445 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -573,10 +573,11 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../src/include \
+INPUT = ../docs/src \
+ ../src/include \
../src/templates \
../src \
- ../docs/src \
+ ../test \
../src/lib \
../ports/ARM7 \
../ports/ARM7/crt0.s \
@@ -637,7 +638,7 @@ FILE_PATTERNS = *.c \
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
-RECURSIVE = YES
+RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
@@ -1298,17 +1299,12 @@ PREDEFINED = __DOXYGEN__ \
CH_USE_CONDVARS_TIMEOUT=1 \
CH_USE_EVENTS=1 \
CH_USE_EVENTS_TIMEOUT=1 \
- CH_USE_EXIT_EVENT=1 \
CH_USE_QUEUES=1 \
- CH_USE_QUEUES_TIMEOUT=1 \
- CH_USE_QUEUES_HALFDUPLEX=1 \
CH_USE_SERIAL_FULLDUPLEX=1 \
- CH_USE_SERIAL_HALFDUPLEX=1 \
CH_USE_HEAP=1 \
CH_USE_MEMPOOLS=1 \
CH_USE_MESSAGES=1 \
CH_USE_MAILBOXES=1 \
- CH_USE_MESSAGES_EVENT=1 \
CH_USE_DYNAMIC=1 \
CH_DBG_ENABLE_ASSERTS=1 \
CH_DBG_ENABLE_CHECKS=1 \
diff --git a/docs/src/articles.dox b/docs/src/articles.dox
index 66268f9d7..e9849782c 100644
--- a/docs/src/articles.dox
+++ b/docs/src/articles.dox
@@ -19,7 +19,6 @@
/**
* @page articles Articles
- * @{
* ChibiOS/RT Articles and Code Examples:
* - @subpage article_stacks
* - @subpage article_mutual_exclusion
@@ -32,4 +31,3 @@
* - @subpage article_design
* .
*/
-/** @} */
diff --git a/docs/src/atomic.dox b/docs/src/atomic.dox
index 5fb0bc628..5e2fb58cd 100644
--- a/docs/src/atomic.dox
+++ b/docs/src/atomic.dox
@@ -19,7 +19,6 @@
/**
* @page article_atomic Invoking multiple primitives as a single atomic operation
- * @{
* It is often necessary to invoke multiple operations involving a
* reschedulation as a single atomic operation.
* ChibiOS/RT already implements APIs that perform complex operations, as
@@ -56,4 +55,3 @@
* API. An extra @p chSchRescheduleS() can be present at the very end of the
* block, it only reschedules if a reschedulation is still required.
*/
-/** @} */
diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox
index ed37ed349..8a7418b53 100644
--- a/docs/src/concepts.dox
+++ b/docs/src/concepts.dox
@@ -19,7 +19,6 @@
/**
* @page concepts Concepts and Architecture
- * @{
* @brief ChibiOS/RT Concepts and Architecture
* - @ref naming
* - @ref api_suffixes
@@ -261,4 +260,3 @@
* extra layers, this is just not part of the kernel architecture but part of
* the overall system design.
*/
-/** @} */
diff --git a/docs/src/design.dox b/docs/src/design.dox
index 4b6780a7a..bc88edf6f 100644
--- a/docs/src/design.dox
+++ b/docs/src/design.dox
@@ -19,7 +19,6 @@
/**
* @page article_design Designing an embedded application
- * @{
* ChibiOS/RT offers a variety of mechanisms and primitives, often it is
* better to focus on a single approach for the system design and use only
* part of the available subsystems.
@@ -109,4 +108,3 @@
* it. The OS is a toolbox that offers a lot of tools but you don't have
* to use them all necessarily.
*/
-/** @} */
diff --git a/docs/src/goals.dox b/docs/src/goals.dox
index 46c092086..e7a26fb3f 100644
--- a/docs/src/goals.dox
+++ b/docs/src/goals.dox
@@ -19,7 +19,6 @@
/**
* @page goals Project Goals
- * @{
*
Another RTOS?
* The first question to be answered is: there was really the need for YET
* ANOTHER RTOS?
@@ -87,4 +86,3 @@
* code is released as well, all the included demos are capable of executing
* the test suite and the OS benchmarks.
*/
-/** @} */
diff --git a/docs/src/interrupts.dox b/docs/src/interrupts.dox
index d2dfb70b5..95bd6c281 100644
--- a/docs/src/interrupts.dox
+++ b/docs/src/interrupts.dox
@@ -19,7 +19,6 @@
/**
* @page article_interrupts Writing interrupt handlers under ChibiOS/RT
- * @{
* Since version 1.1.0 ChibiOS/RT offers a cross-platform method for writing
* interrupt handlers. Port-related and compiler-related details are
* encapsulated within standard system macros.
@@ -50,5 +49,4 @@ CH_IRQ_HANDLER(myIRQ) {
* please read about it in the ARM7 port section: @ref ARM7_IH
* .
*/
-/** @} */
\ No newline at end of file
diff --git a/docs/src/jitter.dox b/docs/src/jitter.dox
index 747a07a7e..5f4e7ff5e 100644
--- a/docs/src/jitter.dox
+++ b/docs/src/jitter.dox
@@ -19,7 +19,6 @@
/**
* @page article_jitter Response Time and Jitter
- * @{
* Response time jitter is one of the most sneaky source of problems when
* designing a real time system. When using a RTOS like ChibiOS/RT one must
* be aware of what the jitter is and how it can affect the performance of the
@@ -134,4 +133,3 @@
* subsystem can improve the overall response time and reduce jitter but it is
* not a magic wand, a proper system design comes first.
*/
-/** @} */
diff --git a/docs/src/licfaq.dox b/docs/src/licfaq.dox
index f3bf3c3a1..58e99a2bb 100644
--- a/docs/src/licfaq.dox
+++ b/docs/src/licfaq.dox
@@ -19,7 +19,6 @@
/**
* @page lic_faq License and F.A.Q.
- * @{
* ChibiOS/RT is a
* GPL3-licensed product but it offers a linking exception in its stable
* releases.
@@ -89,5 +88,4 @@ Program code and other code used in conjunction with the Program except the
Non-GPL Code covered by this exception.
*
*/
-/** @} */
\ No newline at end of file
diff --git a/docs/src/main.dox b/docs/src/main.dox
index 2e76e0a75..bf6eecd54 100644
--- a/docs/src/main.dox
+++ b/docs/src/main.dox
@@ -64,6 +64,27 @@
* .
*/
+/**
+ * @page TEST_SUITE Tests Description
+ * Descriptions
+ * Most of the ChibiOS/RT demos link a set of software modules (test suite) in
+ * order to verify the proper working of the kernel, the port and the demo
+ * itself.
+ * Each Test Module performs a series of tests on a specified subbsystem or
+ * subsystems and can report a failure/success status and/or a performance
+ * index as the test suite output.
+ * The test suite is usually activated in the demo applications by pressing a
+ * button on the target board, see the readme into the various demos
+ * directories. The test suite output is usually sent through a serial port and
+ * can be examined by using a terminal emulator program.
+ *
+ * Test Modules
+ * - @subpage test_threads
+ * - @subpage test_queues
+ * - @subpage test_serial
+ * .
+ */
+
/**
* @defgroup Ports Ports
* This section describes the technical details for the various supported
diff --git a/docs/src/mutualexcl.dox b/docs/src/mutualexcl.dox
index ae6f57c0a..69eb65dc8 100644
--- a/docs/src/mutualexcl.dox
+++ b/docs/src/mutualexcl.dox
@@ -19,7 +19,6 @@
/**
* @page article_mutual_exclusion Mutual Exclusion guide
- * @{
* The most common problem when writing multithreaded code is the
* synchronization on the shared resources/services.
* ChibiOS/RT offers a rich variety of mechanisms that apparently solve the
@@ -209,4 +208,3 @@
* - Requires a dedicated thread as server.
* .
*/
-/** @} */
diff --git a/docs/src/portguide.dox b/docs/src/portguide.dox
index 57216885d..14a3c2eca 100644
--- a/docs/src/portguide.dox
+++ b/docs/src/portguide.dox
@@ -19,7 +19,6 @@
/**
* @page article_portguide Porting ChibiOS/RT for Dummies
- * @{
* Porting the operating system on a new platform is one of the most common
* tasks. The difficulty can range from easy to very difficult depending
* on several factors.
@@ -111,4 +110,3 @@
* the OS template files, the hardest part is decide the correct and efficient
* way to implement the context switching.
*/
-/** @} */
diff --git a/docs/src/saveram.dox b/docs/src/saveram.dox
index 7a1f6f662..6682fe0fe 100644
--- a/docs/src/saveram.dox
+++ b/docs/src/saveram.dox
@@ -19,7 +19,6 @@
/**
* @page article_saveram Saving RAM by declaring thread functions "noreturn"
- * @{
* One of the problems, when writing embedded multi-threaded applications,
* is that the thread functions do save the registers in the function
* entry code even if the system does not require it, exiting such
@@ -80,4 +79,3 @@ main() {
* need to save registers. The code will be a bit less readable and less
* portable on other compilers however.
*/
-/** @} */
diff --git a/docs/src/stacks.dox b/docs/src/stacks.dox
index a27c2e1b9..6035e1277 100644
--- a/docs/src/stacks.dox
+++ b/docs/src/stacks.dox
@@ -19,7 +19,6 @@
/**
* @page article_stacks Stacks and stack sizes
- * @{
* In a RTOS like ChibiOS/RT there are several dedicated stacks, each stack
* has a dedicated RAM space that must have a correctly sized assigned area.
* The stacks
@@ -104,4 +103,3 @@
* end of your development cycle.
* .
*/
-/** @} */
diff --git a/docs/src/timing.dox b/docs/src/timing.dox
index 9e013c412..a09db8575 100644
--- a/docs/src/timing.dox
+++ b/docs/src/timing.dox
@@ -19,7 +19,6 @@
/**
* @page article_timing Reliable timings using Threads
- * @{
* One common task is to have threads do something at regular, scheduled,
* intervals.
* An obvious solution is to write something like this:
@@ -58,4 +57,3 @@ msg_t my_thread(void *param) {
* deadline time and the error will not accumulate over time regardless of
* the execution time and delays inserted by other threads.
*/
-/** @} */
diff --git a/src/templates/chconf.h b/src/templates/chconf.h
index 9909a60d3..a7b840bf1 100644
--- a/src/templates/chconf.h
+++ b/src/templates/chconf.h
@@ -228,6 +228,7 @@
* If specified then the Asynchronous Messages (Mailboxes) APIs are included
* in the kernel.
* @note The default is @p TRUE.
+ * @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__)
#define CH_USE_MAILBOXES TRUE
diff --git a/test/test.c b/test/test.c
index 3ca3d8a8a..02e56788a 100644
--- a/test/test.c
+++ b/test/test.c
@@ -30,6 +30,7 @@
#include "testpools.h"
#include "testdyn.h"
#include "testqueues.h"
+#include "testserial.h"
#include "testbmk.h"
/*
@@ -46,6 +47,7 @@ static const struct testcase **patterns[] = {
patternpools,
patterndyn,
patternqueues,
+ patternserial,
patternbmk,
NULL
};
diff --git a/test/test.mk b/test/test.mk
index 2a3e1a4f9..f80237f8a 100644
--- a/test/test.mk
+++ b/test/test.mk
@@ -4,7 +4,8 @@ TESTSRC = ../../test/test.c ../../test/testthd.c \
../../test/testmsg.c ../../test/testmbox.c \
../../test/testevt.c ../../test/testheap.c \
../../test/testpools.c ../../test/testdyn.c \
- ../../test/testqueues.c ../../test/testbmk.c
+ ../../test/testqueues.c ../../test/testserial.c \
+ ../../test/testbmk.c
# Required include directories
TESTINC = ../../test
diff --git a/test/testqueues.c b/test/testqueues.c
index e3faf71f0..2781b3479 100644
--- a/test/testqueues.c
+++ b/test/testqueues.c
@@ -21,10 +21,51 @@
#include "test.h"
+/**
+ * @page test_queues I/O Queues test
+ *
+ * Description
+ * This module implements the test sequence for the @ref IOQueues subsystem.
+ * The tests are performed by inserting and removing data from queues and by
+ * checking both the queues status and the correct sequence of the extracted
+ * data.
+ *
+ * Objective
+ * Objective of the test module is to cover 100% of the @ref IOQueues code
+ * as a necessary step in order to assess its readyness.
+ * Note that the @ref IOQueues subsystem depends on the @ref Semaphores
+ * subsystem that has to met its testing objectives as well.
+ *
+ * Preconditions
+ * The module requires the following kernel options:
+ * - @p CH_USE_QUEUES (and dependent options)
+ * .
+ * In case of the required options are not enabled some or all tests may be
+ * skipped.
+ *
+ * Waivers
+ * None.
+ *
+ * Test Cases
+ * - @subpage test_queues_001
+ * - @subpage test_queues_002
+ * .
+ * @file testqueues.c
+ * @file testqueues.h
+ */
+
#if CH_USE_QUEUES
#define TEST_QUEUES_SIZE 4
+/**
+ * @page test_queues_001 Input Queues functionality and APIs
+ *
+ * Description
+ * This test case tests sysnchronos and asynchronous operations on an
+ * @p InputQueue object including timeouts. The queue state must remain
+ * consistent through the whole test.
+ */
static void notify(void) {}
static char *queues1_gettest(void) {
@@ -81,6 +122,14 @@ const struct testcase testqueues1 = {
queues1_execute
};
+/**
+ * @page test_queues_002 Output Queues functionality and APIs
+ *
+ * Description
+ * This test case tests sysnchronos and asynchronous operations on an
+ * @p OutputQueue object including timeouts. The queue state must remain
+ * consistent through the whole test.
+ */
static char *queues2_gettest(void) {
return "Queues, output queues";
diff --git a/test/testserial.c b/test/testserial.c
new file mode 100644
index 000000000..a10529493
--- /dev/null
+++ b/test/testserial.c
@@ -0,0 +1,65 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+
+#include "test.h"
+
+/**
+ * @page test_serial Serial Driver test
+ *
+ * Description
+ * This module implements the test sequence for the @ref Serial subsystem.
+ * The tests are performed on a loopback software serial driver where a
+ * dedicated thread echoes back in the input queue the data read from the
+ * output queue at a fixed rate.
+ *
+ * Objective
+ * Objective of the test module is to cover 100% of the @ref Serial code
+ * as a necessary step in order to assess its readyness.
+ * Note that the @ref Serial subsystem depends on the @ref Semaphores and
+ * @ref Events subsystems that have to met their testing objectives as well.
+ *
+ * Preconditions
+ * The module requires the following kernel options:
+ * - @p CH_USE_SERIAL_FULLDUPLEX (and dependent options)
+ * .
+ * In case of the required options are not enabled some or all tests may be
+ * skipped.
+ *
+ * Waivers
+ * None.
+ *
+ * @file testserial.c
+ * @file testserial.h
+ */
+
+#if CH_USE_SERIAL_FULLDUPLEX
+
+#endif /* CH_USE_SERIAL_FULLDUPLEX */
+
+/*
+ * Test sequence for queues pattern.
+ */
+const struct testcase * const patternserial[] = {
+#if CH_USE_SERIAL_FULLDUPLEX
+ &testserial1,
+#endif
+ NULL
+};
diff --git a/test/testserial.h b/test/testserial.h
new file mode 100644
index 000000000..3e68dd9c7
--- /dev/null
+++ b/test/testserial.h
@@ -0,0 +1,25 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifndef _TESTSERIAL_H_
+#define _TESTSERIAL_H_
+
+extern const struct testcase *patternserial[];
+
+#endif /* _TESTSERIAL_H_ */
diff --git a/test/testthd.c b/test/testthd.c
index e4e15be52..e44531868 100644
--- a/test/testthd.c
+++ b/test/testthd.c
@@ -21,6 +21,47 @@
#include "test.h"
+/**
+ * @page test_threads Threads and Scheduler test
+ *
+ * Description
+ * This module implements the test sequence for the @ref Scheduler,
+ * @ref Threads and @ref Time subsystems.
+ * Note that the tests on those subsystems are formally required but most of
+ * their functionality is already demostrated because the test suite itself
+ * depends on them, anyway doublecheck is good.
+ *
+ * Objective
+ * Objective of the test module is to cover 100% of the subsystems code
+ * as a necessary step in order to assess their readyness.
+ *
+ * Preconditions
+ * None.
+ *
+ * Waivers
+ * - The @p chThdExit() API is not code 100% covered because it cannot return.
+ * It must work this way by design.
+ * .
+ * Test Cases
+ * - @subpage test_threads_001
+ * - @subpage test_threads_002
+ * - @subpage test_threads_003
+ * - @subpage test_threads_004
+ * .
+ * @file testthd.c
+ * @file testthd.h
+ */
+
+/**
+ * @page test_threads_001 Ready List functionality #1
+ *
+ * Description
+ * Five threads, with increasing priority, are enqueued in the ready list
+ * and atomically executed.
+ * The test expects the threads to perform their operations in increasing
+ * priority order redardless of the initial order.
+ */
+
static msg_t thread(void *p) {
test_emit_token(*(char *)p);
@@ -50,6 +91,16 @@ const struct testcase testthd1 = {
thd1_execute
};
+/**
+ * @page test_threads_002 Ready List functionality #2
+ *
+ * Description
+ * Five threads, with pseudo-random priority, are enqueued in the ready list
+ * and atomically executed.
+ * The test expects the threads to perform their operations in increasing
+ * priority order redardless of the initial order.
+ */
+
static char *thd2_gettest(void) {
return "Threads, enqueuing test #2";
@@ -73,6 +124,16 @@ const struct testcase testthd2 = {
thd2_execute
};
+/**
+ * @page test_threads_003 Threads priority change test
+ *
+ * Description
+ * A series of priority changes are performed on the current thread in order
+ * to verify that the priority change happens as expected.
+ * If the @p CH_USE_MUTEXES option is enabled then the priority changes are
+ * also tested under priority inheritance boosted priority state.
+ */
+
static char *thd3_gettest(void) {
return "Threads, priority change";
@@ -133,6 +194,14 @@ const struct testcase testthd3 = {
thd3_execute
};
+/**
+ * @page test_threads_004 Threads delays test
+ *
+ * Description
+ * Delay APIs and associated macros are tested, the invoking thread is verified
+ * to wake up at the exact expected time.
+ */
+
static char *thd4_gettest(void) {
return "Threads, delays";
@@ -172,7 +241,7 @@ const struct testcase testthd4 = {
};
/*
- * Test sequence for ready list pattern.
+ * Test sequence for threads patterns.
*/
const struct testcase * const patternthd[] = {
&testthd1,