<<< | >>>

ColdFire RTOS Implementation

Phase 5: Running the Test Programs

The final phase involved running the test programs in the FreeRTOS� test suite. This phase proved the most trying and least successful. The test programs operate by spawning many tasks which each update a counter periodically. Another task regularly checks these counters. If the values have not been updated between successive checks then the task is assumed to have failed.

When we ran our tests they would constantly fail because the test tasks would not have enough time between successive checks to perform their calculations and update their counters. By adjusting the interval between checks and reducing the number of tasks we were able to get the tests to pass but we suspect that it should not be necessary to adjust the interval so drastically (our tests only start to pass once the interval is at least two or three seconds).

Despite considerable tracing and debugging we were unable to determine the cause of our port's tardiness. We have many speculations but have not been successful in proving any of them. It may be a problem with our context-switching although, given its simplicity, this is difficult to comprehend. Alternatively, it could be a defect in our interrupt handling, some overhead introduced by including Newlib, or some misunderstanding in how to run the FreeRTOS� test suite. Nevertheless the tests we were able to run passed (see Figure 5) and the other applications we have written seem to run at a reasonable pace.


Figure 5 - Output from the FreeRTOS� test suite. 'OK' is printed every few seconds if the tests are running successfully.

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.