Skip to content

Commit 5ae01ab

Browse files
committed
Updated documentation of timer examples.
1 parent f4fec59 commit 5ae01ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
- `test_newlib9.c`: Tests correct trap behavior for EBREAK, ECALL and illegal instructions.
2424

25-
- `test_newlib10.c`: Tests machine timer interrupt (`mtime` / `mtimecmp`), firing timer and handling timer traps while an idle loop is running. Run it with the `--timer` option and check that the number of times the interrupt has fired is nonzero. Run it with `--traps`` to monitor timer-based trap generation.
25+
- `test_newlib10.c`: Tests machine timer interrupt (`mtime` / `mtimecmp`), firing timer and handling timer traps while an idle loop is running. Run it with the `--timer=csr` option and check that the number of times the interrupt has fired is nonzero. Run it with `--traps`` to monitor timer-based trap generation.
2626

27-
- `test_newlib11.c`: Simple implementation of timer-based preemptive scheduling for two tasks. The first task increments a counter and prints it to console (using the debug macros in `risc-py.h`) every `0x10000` loops. The second task decrements a counter and prints it to console every `0x10000` loops. Run this example with the `--timer` option. Use `--traps`` to see timer-based traps triggering task switching.
27+
- `test_newlib11.c`: Simple implementation of timer-based preemptive scheduling for two tasks. The first task increments a counter and prints it to console (using the debug macros in `risc-py.h`) every `0x10000` loops. The second task decrements a counter and prints it to console every `0x10000` loops. Run this example with the `--timer=csr` option. Use `--traps`` to see timer-based traps triggering task switching.
2828

tests/test_newlib10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This example tests machine timer interrupt handling (mtime / mtimecmp).
2-
// Use "--timer" to run it.
2+
// Use "--timer=csr" to run it.
33

44
#include <stdint.h>
55
#include <stdio.h>

tests/test_newlib11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This example implements timer-based round-robin preemptive scheduling for two tasks.
2-
// Use "--timer" to run it.
2+
// Use "--timer=csr" to run it.
33

44
#include <stdint.h>
55
#include <stdio.h>

0 commit comments

Comments
 (0)