You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/porting/porting_full_process/built_in_tests.md
+14-19Lines changed: 14 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
## Testing your port
2
2
3
-
It's important to test your port at the end of each module porting, rather than only once when you've imported all modules. There are three testing methods:
3
+
It's important to test your port at the end of each module porting, rather than only once when you've imported all modules. There are two testing methods:
4
4
5
-
1.Using the Mbed OS built-in tests with [*Greentea*](../tools/greentea-testing-applications.html).
6
-
1.Using the Mbed OS built-in tests with *manual testing*.
5
+
1.Running the Mbed OS built-in tests with [*Greentea*](../tools/greentea-testing-applications.html).
6
+
1.Manually running the Mbed OS built-in tests.
7
7
8
8
## Testing with the Greentea framework
9
9
@@ -15,18 +15,19 @@ Read the following page to understand how tests are structured:
15
15
16
16
To run the Mbed OS built-in tests, you need to have ported and verified at least these HAL modules:
17
17
18
-
- DAPLink or compatible interface firmware.
19
-
20
-
<spanclass="notes">If DAPLink is still under development, please [use manual tests](../porting/manual-testing.html).</span>
21
18
- Low power ticker.
22
19
- Serial port (synchronous transfer). To verify that it works, load a test binary with `printf()`. Verify debug messages can be seen on your serial terminal program.
23
20
- Microsecond ticker.
24
21
22
+
23
+
You'll also need to have ported DAPLink or compatible interface firmware to your interface chip.
24
+
<spanclass="notes">If DAPLink is still under development, you can still [run tests manually](../porting/manual-testing.html).</span>
25
+
25
26
#### mbedls
26
27
27
-
The board under test needs to be supported in mbedls for automated tests to work.
28
+
The platform under test needs to be supported in mbedls for automated tests to work.
28
29
29
-
If an updated mbedls pip package hasn't been released yet, you need to direct pip to use your local directory (which includes the code changes to support the new board):
30
+
If an updated mbedls pip package including support for your platform hasn't been released yet, you need to direct pip to use your local directory (which includes the code changes to support the new platform):
1.[Add your target to the platform database](https://github.com/ARMmbed/mbed-ls#adding-platform-support)
@@ -58,6 +59,7 @@ Here is an example of a successful run:
58
59
59
60
<!-- Needs to be updated with output from mbed-cli (mbed test) -->
60
61
```
62
+
mbed test --run -n tests-concurrent-gpio
61
63
mbedgt: greentea test automation tool ver. 1.4.0
62
64
mbedgt: using multiple test specifications from current directory!
63
65
using 'BUILD/tests/CC3220SF/GCC_ARM/test_spec.json'
@@ -114,7 +116,7 @@ mbedgt: completed in 20.24 sec
114
116
115
117
## Manual testing
116
118
117
-
You may want to run manual tests, for example if DAPLink is still under development. You will need to export your tests from Greentea and import them to your IDE. For example:
119
+
You may want to run tests manually, for example if DAPLink is still under development. You will need to export your tests from Greentea and import them to your IDE. For example:
118
120
119
121
1. Find the test directory:
120
122
@@ -143,7 +145,7 @@ You may want to run manual tests, for example if DAPLink is still under developm
143
145
mbed export -i <exporter> -m <new_target>
144
146
```
145
147
146
-
1. Open the project with pyOCD (using the same configuration you used [when you initially set up pyOCD](#creating-GDB-pyOCD-debug-configuration).
148
+
1. Flash the program with pyOCD (using the same configuration you used [when you initially set up pyOCD](#creating-GDB-pyOCD-debug-configuration).
147
149
148
150
1. Run the program:
149
151
@@ -160,17 +162,10 @@ Whether you're using Greentea or performing manual tests, the procedure for usin
160
162
161
163
To build and run the Mbed OS tests:
162
164
163
-
1. In your `mbed-os-example-blinky` clone, rename `main.cpp` to `main.txt`:
164
-
165
-
```
166
-
mv main.cpp main.txt
167
-
```
168
-
169
165
1. Build the tests:
170
166
171
-
<!-- any reason why we're doing a clean build here everytime? I'd really recommend dropping this one, build times will be very high -->
172
167
```
173
-
mbed test -m <new_target> -t gcc_arm --compile -c
168
+
mbed test -m <new_target> -t gcc_arm --compile
174
169
```
175
170
176
171
If you see some build errors, it means that some HAL modules required to run the tests are missing and need porting.
@@ -205,7 +200,7 @@ To build and run the Mbed OS tests:
205
200
- The `common_tickers` test image is at `mbed-os-example-blinky/BUILD/tests/<new_target>/gcc_arm/mbed-os/TESTS/mbed_hal/common_tickers`.
206
201
- The `common_tickers_freq` test image is at `mbed-os-example-blinky/BUILD/tests/<new_target>/gcc_arm/mbed-os/TESTS/mbed_hal/common_tickers_freq.`
207
202
208
-
1. You need to flash the test image to the board. You can use either pyOCD or the Eclipe IDE. You may also be able to use IAR and Keil (if they already support the new target).
203
+
1. You need to flash the test image to the board. You can use pyOCD (from the command line or IDE), or you could use IAR and Keil (if they already support the new target).
0 commit comments