Skip to content

Commit

Permalink
Fixed bug #1205.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osdn.net/svnroot/chibios/branches/stable_21.11.x@15173 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
  • Loading branch information
gdisirio committed Dec 2, 2021
1 parent 9242690 commit 02734b1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 23 deletions.
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
ARMv7-M and ARMv8-M-ML.
- NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG.
- NEW: Added SPIv2 support also to STM32WB and STM32WL.
- FIX: Fixed RT test suite build fails when CH_CFG_USE_TIMESTAMP is FALSE
(bug #1205).
- FIX: Fixed wrong number of CAN filters for STM32L496/9A6 (bug #1204).
- FIX: Fixed DMA stream not disabled in STM32 QUADSPIv1 driver (bug #1203).
- FIX: Fixed I2C4 DMA streams for STM32L496 (bug #1202).
Expand Down
26 changes: 14 additions & 12 deletions test/rt/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,29 @@
* Allowed delay in timeout checks.
*/
#if CH_CFG_ST_TIMEDELTA == 0
#define ALLOWED_DELAY 2
#define ALLOWED_DELAY 2
#else
#define ALLOWED_DELAY TIME_MS2I(2)
#define ALLOWED_DELAY TIME_MS2I(2)
#endif
/*
* Maximum number of test threads.
*/
#define MAX_THREADS 5
#define MAX_THREADS 5
/*
* Stack size of test threads.
*/
#if defined(PORT_ARCHITECTURE_AVR) || defined(PORT__ARCHITECTURE_MSP430)
#define THREADS_STACK_SIZE 48
#elif defined(PORT__ARCHITECTURE_STM8)
#define THREADS_STACK_SIZE 64
#elif defined(PORT__ARCHITECTURE_SIMIA32)
#define THREADS_STACK_SIZE 512
#else
#define THREADS_STACK_SIZE 128
#if !defined(THREADS_STACK_SIZE)
#if defined(PORT_ARCHITECTURE_AVR) || defined(PORT__ARCHITECTURE_MSP430)
#define THREADS_STACK_SIZE 48
#elif defined(PORT__ARCHITECTURE_STM8)
#define THREADS_STACK_SIZE 64
#elif defined(PORT__ARCHITECTURE_SIMIA32)
#define THREADS_STACK_SIZE 512
#else
#define THREADS_STACK_SIZE 192
#endif
#endif
/*
Expand Down Expand Up @@ -819,7 +821,7 @@ test_assert(b == false, "in range");
related to time stamps.</value>
</description>
<condition>
<value />
<value><![CDATA[CH_CFG_USE_TIMESTAMP == TRUE]]></value>
</condition>
<shared_code>
<value><![CDATA[#include "ch.h"]]></value>
Expand Down
2 changes: 2 additions & 0 deletions test/rt/source/test/rt_test_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ const testsequence_t * const rt_test_suite_array[] = {
&rt_test_sequence_001,
&rt_test_sequence_002,
&rt_test_sequence_003,
#if (CH_CFG_USE_TIMESTAMP == TRUE) || defined(__DOXYGEN__)
&rt_test_sequence_004,
#endif
&rt_test_sequence_005,
&rt_test_sequence_006,
#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
Expand Down
24 changes: 13 additions & 11 deletions test/rt/source/test/rt_test_root.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,29 @@ extern "C" {
* Allowed delay in timeout checks.
*/
#if CH_CFG_ST_TIMEDELTA == 0
#define ALLOWED_DELAY 2
#define ALLOWED_DELAY 2
#else
#define ALLOWED_DELAY TIME_MS2I(2)
#define ALLOWED_DELAY TIME_MS2I(2)
#endif

/*
* Maximum number of test threads.
*/
#define MAX_THREADS 5
#define MAX_THREADS 5

/*
* Stack size of test threads.
*/
#if defined(PORT_ARCHITECTURE_AVR) || defined(PORT__ARCHITECTURE_MSP430)
#define THREADS_STACK_SIZE 48
#elif defined(PORT__ARCHITECTURE_STM8)
#define THREADS_STACK_SIZE 64
#elif defined(PORT__ARCHITECTURE_SIMIA32)
#define THREADS_STACK_SIZE 512
#else
#define THREADS_STACK_SIZE 128
#if !defined(THREADS_STACK_SIZE)
#if defined(PORT_ARCHITECTURE_AVR) || defined(PORT__ARCHITECTURE_MSP430)
#define THREADS_STACK_SIZE 48
#elif defined(PORT__ARCHITECTURE_STM8)
#define THREADS_STACK_SIZE 64
#elif defined(PORT__ARCHITECTURE_SIMIA32)
#define THREADS_STACK_SIZE 512
#else
#define THREADS_STACK_SIZE 192
#endif
#endif

/*
Expand Down
10 changes: 10 additions & 0 deletions test/rt/source/test/rt_test_sequence_004.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@
* This sequence tests the ChibiOS/RT functionalities related to time
* stamps.
*
* <h2>Conditions</h2>
* This sequence is only executed if the following preprocessor condition
* evaluates to true:
* - CH_CFG_USE_TIMESTAMP == TRUE
* .
*
* <h2>Test Cases</h2>
* - @subpage rt_test_004_001
* .
*/

#if (CH_CFG_USE_TIMESTAMP == TRUE) || defined(__DOXYGEN__)

/****************************************************************************
* Shared code.
****************************************************************************/
Expand Down Expand Up @@ -104,3 +112,5 @@ const testsequence_t rt_test_sequence_004 = {
"Time Stamps Functionality",
rt_test_sequence_004_array
};

#endif /* CH_CFG_USE_TIMESTAMP == TRUE */

0 comments on commit 02734b1

Please sign in to comment.