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
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ It's important to test your port at the end of each module porting, rather than
9
9
10
10
Read the following page to understand how tests are structured:
11
11
12
-
# Prerequisites
12
+
##Prerequisites
13
13
14
-
## Minimum HAL module support
14
+
###Minimum HAL module support
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
@@ -23,7 +23,7 @@ To run the Mbed OS built-in tests, you need to have ported and verified at least
23
23
You'll also need to have ported DAPLink or compatible interface firmware to your interface chip.
24
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
+
###mbedls
27
27
28
28
The platform under test needs to be supported in mbedls for automated tests to work.
29
29
@@ -47,7 +47,7 @@ If an updated mbedls pip package including support for your platform hasn't been
47
47
48
48
Where `"33000000e062afa300000000000000000000000097969902"` is the correct target id.
49
49
50
-
# Compiling and running tests
50
+
## Compiling and running tests
51
51
52
52
1. Compile the tests:
53
53
- To compile all tests, run `mbed test --compile`.
@@ -115,7 +115,7 @@ mbedgt: test case results: 12 OK
115
115
mbedgt: completed in 20.24 sec
116
116
```
117
117
118
-
# Manual testing
118
+
## Manual testing
119
119
120
120
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:
121
121
@@ -157,7 +157,7 @@ You may want to run tests manually, for example if DAPLink is still under develo
157
157
Customize the serial port path and baudrate as needed.
158
158
159
159
160
-
# Mbed OS built-in tests - detailed procedure
160
+
## Mbed OS built-in tests - detailed procedure
161
161
162
162
Whether you're using Greentea or performing manual tests, the procedure for using the built-in Mbed OS tests is the same.
Copy file name to clipboardExpand all lines: docs/porting/porting_full_process/demo_testing.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ You can use two applications to test your port:
5
5
1. When you've ported GPIO (and all preceeding modules), use `mbed-os-example-blinky`.
6
6
1. When you've ported all mandatory modules, use `mbed-cloud-client-example` (the Device Management Client runs on top of Mbed OS, and you don't need to manually port it). This test includes a reference bootloader for firmware update testing.
Copy file name to clipboardExpand all lines: docs/porting/porting_full_process/integration-tests.md
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Mbed OS provides a set of integration tests to help you identify integration issues around storage devices and connectivity devices. If you're using a custom board, these tests can also help you verify your board works well in your environment.
4
4
5
-
# Test suites
5
+
##Test suites
6
6
7
7
|**Test suite**|**Description**|
8
8
| ------------- | ------------- |
@@ -12,36 +12,36 @@ Mbed OS provides a set of integration tests to help you identify integration iss
12
12
|`net-multi`| Network multithreaded test for 1, 2 and 3 download threads with 1kb receive buffer size. |
The integration test requires you to configure both the connectivity and storage devices.
18
18
19
-
If a platform has both of them enabled by default (in `targets.json`), then you can compile the tests and run them from inside the `mbed-os` directory:
19
+
If a platform has both of them enabled by default (in `targets.json`), then you can compile the tests and run them from inside the `mbed-os` directory:
If a board doesn't have default connectivity and storage, it requires an extra shield to run the integration test. In this case, you can pass a `target_extended.json` file in the command-line to configure the target:
A preconfiguration file is defined in the COMMON folder, and that file covers some of the platform connectivity and storage combinations. However, this preconfiguration file might contain some compoments drivers not included in `mbed-os` (for example, `WIFI_WIZFI310` and `NUSD`). You must add those drivers manually. If you have your own platform or want to define your own configuration, please follow the [configuration guide](#tests-configuration).
32
32
33
-
# Tests configuration
33
+
##Tests configuration
34
34
35
35
If required, edit the `target_extended.json` file, and create a new entry under `target_overrides` with the target name for your device:
36
36
37
37
-**Connectivity** - Specify the default connectivity type for your target. It's essential with targets that lack default connectivity set in `targets.json` or for targets that support multiple connectivity options. For example:
The possible options are `ETHERNET`, `WIFI` and `CELLULAR`.
44
-
44
+
45
45
Depending on connectivity type, you might have to specify more configuration options. For an example, please see the defined `CELLULAR` targets in `mbed_app.json`.
46
46
47
47
-**Storage** - Specify the storage block device type, which dynamically adds the block device driver you specified at compile time. For example:
@@ -53,13 +53,12 @@ If required, edit the `target_extended.json` file, and create a new entry under
53
53
Valid options are `SD`, `SPIF` and `QSPIF`. For more available options, please see the [block device components](https://github.com/ARMmbed/mbed-os/tree/master/components/storage/blockdevice).
54
54
55
55
You also have to specify the block device pin configuration, which may vary from one block device type to another. Here's an example for `SD`:
56
-
56
+
57
57
```
58
58
"sd.SPI_MOSI" : "PE_6",
59
59
"sd.SPI_MISO" : "PE_5",
60
60
"sd.SPI_CLK" : "PE_2",
61
61
"sd.SPI_CS" : "PE_4",
62
62
```
63
-
63
+
64
64
If you are using SPI or QSPI flash, please make sure you have specified the correct SPI frequency by configuring `spif-driver.SPI_FREQ`. If it is not configured, 40Mhz is applied by default.
The following Mbed CLI commands retrieve and fork the `mbed-os-example-blinky` code, and redirect `mbed-os` to point to the newly forked `mbed-os` repository:
1. In Keil MDK, open the project file for your target in `\projectfiles\uvision<target>`, and build it. The build directory of a successful build will have the files `c_blob.c` and `c_blob_mbed.c`; save both files. You will use them in the next step (`c_blob.c` in `flash_blob.c`, and `c_blob_mbed.c` in Flash API).
78
78
79
-
# Add your new target to DAPLink
79
+
##Add your new target to DAPLink
80
80
81
81
<spanclass="notes">This step requires a Windows PC.</span>
@@ -104,7 +104,7 @@ Wait for your target support to be merged into pyOCD's master branch and release
104
104
# Setting up to debug Mbed OS programs
105
105
106
106
107
-
# Update DAPLink interface firmware
107
+
##Update DAPLink interface firmware
108
108
109
109
You need to update the new DAPLink interface firmware, which includes the new target support, on your interface MCU.
110
110
@@ -118,7 +118,7 @@ To include the new target support:
118
118
1. Plug the USB cable to the host.
119
119
1. Drag-n-drop the interface firmware.
120
120
121
-
# Create GDB pyOCD debug configuration
121
+
##Create GDB pyOCD debug configuration
122
122
123
123
1. Install pyOCD. You need the version with the new target support. If you contributed to PyOCD and an updated version hasn't been released yet, you can invoke the local copy:
124
124
@@ -152,7 +152,7 @@ To include the new target support:
152
152
153
153
# Porting HAL modules
154
154
155
-
# Recommended porting order
155
+
## Recommended porting order
156
156
157
157
Based on criticality and dependency of Mbed OS software stack, we recommend the following order:
158
158
@@ -173,13 +173,13 @@ Based on criticality and dependency of Mbed OS software stack, we recommend the
173
173
174
174
Detailed instructions for porting each module are given in the module-specific sections of this documentation.
175
175
176
-
# Create the bare metal mbed-os-example-blinky
176
+
## Create the bare metal mbed-os-example-blinky
177
177
178
178
The official `mbed-os-example-blinky` uses the RTOS, a DigitalOut object and timers. The bare metal version of the example doesn't rely on RTOS, GPIO and timers; LED toggling is done directly by accessing hardware registers. Modify the Blinky program you checked out earlier to not use the timer and DigitalOut object:
@@ -215,13 +215,13 @@ mbed compile --target <target_name> --toolchain ARM
215
215
mbed compile --target <target_name> --toolchain IAR
216
216
```
217
217
218
-
# Serial Port (synchronous transfer)
218
+
## Serial Port (synchronous transfer)
219
219
220
220
[Serial port porting instructions](../porting/serial-port.html).
221
221
222
222
Serial port porting can be done in two stages: synchronous UART and asynchronous UART. We recommend porting synchronous UART as early as possible, because the HAL Greentea tests require it, and because `printf()` is a powerful debugging tool.
223
223
224
-
# Low power ticker
224
+
## Low power ticker
225
225
226
226
<span class="notes">**Note**: Low power ticker is mandatory for any platform that supports it.</span>
227
227
@@ -235,39 +235,39 @@ When you finish porting low power ticker:
235
235
The [Mbed OS doxygen describes LowPowerTicker tests](https://os.mbed.com/docs/latest/mbed-os-api-doxy/group__hal__lp__ticker__tests.html).
The vanilla Blinky program uses GPIO, which is a great tool for debugging with an oscilloscope or logic analyzer. It's a good idea to port GPIO before any other peripherals.
249
249
250
250
You can now try [using the normal Blinky application](../porting/testing-with-the-demo-applications.html).
On some targets, RTC is shared with low power ticker and you can only use one of them. On these targets, you must use low power ticker instead of RTC.
259
259
260
-
# SPI (master)
260
+
## SPI (master)
261
261
262
262
SPI (master) is used to communicate with storage devices that have an SPI interface, such as SD cards. The CI test shield supports an SD card as a slave device, so you can use it to test SPI (master) implementations on evaluation boards that don't have an SPI slave.
263
263
264
-
# TRNG
264
+
## TRNG
265
265
266
266
[True random number generator entropy source (TRNG) porting instructions](../porting/entropy-sources.html).
267
267
268
268
If the hardware supports TRNG, you must port it before running Device Management Client, because the client uses TLS, which in turn requires an entropy source.
269
269
270
-
# Connectivity
270
+
## Connectivity
271
271
272
272
[Porting instructions for all connectivity options](../porting/porting-connectivity.html).
273
273
@@ -279,24 +279,24 @@ You can now try running the example applications for your connectivity methods.
Flash drivers are required by Device Management Client.
287
287
288
288
There are two ways to implement flash API: using CMSIS flash algorithms or vanilla C source code. We recommend using vanilla C source code, because it's easier to maintain and upgrade. It's also more portable across different platforms.
The bootloader is a separate application, which needs to be created and integrated into Device Management Client to allow firmware updates.
295
295
296
-
# Device Management Client
296
+
## Device Management Client
297
297
298
298
You do not need to manually port Device Management Client; when the above modules are ported, you should be ready to [demo the Connect and Update functionalities of the Device Management Client](https://cloud.mbed.com/guides/connect-device-to-pelion).
299
299
300
-
# Other HAL modules (Optional)
300
+
## Other HAL modules (Optional)
301
301
302
302
You are now ready to port any other HAL modules that your use case and MCU require. These modules are covered in the rest of this document, with the exception of [Mbed Cordio, which has its own porting documentation](https://os.mbed.com/docs/mbed-cordio/latest/porting-pal/index.html).
Copy file name to clipboardExpand all lines: docs/porting/porting_full_process/porting_reqs.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Setting up
2
2
3
-
# Hardware setup
3
+
##Hardware setup
4
4
5
5
Porting Mbed OS requires the following hardware:
6
6
@@ -23,14 +23,14 @@ The following items might help you test SPI, I2C and pins:
23
23
24
24
<spanclass="tips">Check the user guide of the evaluation board to see if anything needs to be done prior to using a debug probe and running Mbed OS programs.</span>
- Choose an IDE and debugger. The three commonly used IDEs are [Eclipse](https://www.eclipse.org/ide/), [IAR Embedded Workbench](https://www.iar.com/iar-embedded-workbench/) and [Keil MDK](http://www.keil.com/).
33
+
- Choose an IDE and debugger. The three commonly used IDEs are [Eclipse](https://www.eclipse.org/ide/), [IAR Embedded Workbench](https://www.iar.com/iar-embedded-workbench/) and [Keil MDK](http://www.keil.com/).
Copy file name to clipboardExpand all lines: docs/porting/porting_full_process/porting_start.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This document provides guidelines for adding a new MCU target to Mbed OS and the
8
8
9
9
These guidelines use pyOCD, our debugger, and DAPLink, our interface firmware, in the porting process because they are free and open source. Please note that you can use other debuggers and interface firmware, but that is outside the scope of this document.
10
10
11
-
# Scope and milestones
11
+
##Scope and milestones
12
12
13
13
You will usually need to go through all of these steps to port Mbed OS:
0 commit comments