Skip to content

Commit 08f8121

Browse files
author
Amanda Butler
authored
Merge pull request #849 from jamesbeyond/fm_eth
update with Fast Models Ethernet functions
2 parents 042587a + 5539e0e commit 08f8121

File tree

1 file changed

+54
-7
lines changed

1 file changed

+54
-7
lines changed

docs/tools/fastmodels/fastmodels.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,24 @@ FVP_MPS2_Cortex-M7 | FVP_MPS2_M7
2222

2323
### Mbed OS examples on Fast Models
2424

25-
Fast Models can run most of the Mbed OS examples. (Please see [known issues 2 and 3](#known-issues)] for more information.)
25+
Fast Models can run most of the Mbed OS examples.
2626

27-
Examples you can successfully run include [`mbed-os-example-thread-statistics`](https://github.com/ARMmbed/mbed-os-example-thread-statistics), [`mbed-os-example-tls`](https://github.com/ARMmbed/mbed-os-example-tls), [`mbed-os-example-devicekey`](https://github.com/ARMmbed/mbed-os-example-devicekey) and [`mbed-os-example-nvstore`](https://github.com/ARMmbed/mbed-os-example-nvstore).
27+
Examples you can successfully run include:
2828

29-
The following examples use [`mbed-os-example-blinky`](https://github.com/ARMmbed/mbed-os-example-blinky).
29+
- [`mbed-os-example-blinky`](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/).
30+
- [`mbed-os-example-tls`](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-tls-benchmark/).
31+
- [`mbed-os-example-devicekey`](https://os-doc-builder.test.mbed.com/docs/development/apis/devicekey.html#devicekey-example).
32+
- [`mbed-os-example-nvstore`](https://os-doc-builder.test.mbed.com/docs/development/apis/nvstore.html#nvstore-example).
33+
- [`mbed-os-example-thread-statistics`](https://os-doc-builder.test.mbed.com/docs/development/apis/mbed-statistics.html#thread-statistics-example).
34+
- [`mbed-os-example-sys-info`](https://os-doc-builder.test.mbed.com/docs/development/apis/mbed-statistics.html#system-information-example).
35+
- [`mbed-os-example-cpu-usage`](https://os-doc-builder.test.mbed.com/docs/development/apis/mbed-statistics.html#cpu-usage-example).
36+
- [`mbed-os-example-cpu-stats`](https://os-doc-builder.test.mbed.com/docs/development/apis/mbed-statistics.html#cpu-statistics-example).
37+
- [`mbed-os-example-error-handling`](https://os-doc-builder.test.mbed.com/docs/development/apis/error-handling.html#error-handling-example).
38+
- [`mbed-os-example-filesystem`](https://os-doc-builder.test.mbed.com/docs/development/apis/filesystem.html#file-system-example).
39+
- [`mbed-os-example-blockdevice`](https://os-doc-builder.test.mbed.com/docs/development/apis/blockdevice.html#blockdevice-example).
40+
- [`mbed-os-example-sockets`](https://os-doc-builder.test.mbed.com/docs/development/apis/socket.html#socket-example).
41+
42+
The following examples use `mbed-os-example-blinky`.
3043

3144
To run Mbed OS examples with Fast Models, you need to install the Fast Models product and set up the license. The [Arm DS-5 Development Studio](https://developer.arm.com/products/software-development-tools/ds-5-development-studio) also provides Fast Models targets. To load a compiled Mbed OS image onto a Fast Models platform, such as the FVP_MPS2_Cortex-M0, you need to add your installation's `bin` folder to your system `PATH`. For example: `C:\Program Files\DS-5 v5.29.1\bin`.
3245

@@ -55,14 +68,48 @@ Load the compiled example image to the FVP_MPS2_Cortex-M3 target. To do so, pass
5568
$ FVP_MPS2_Cortex-M3 -a BUILD/FVP_MPS2_M3/GCC_ARM/mbed-os-example-blinky.elf
5669
```
5770

58-
The FVPs start running, andthe LEDs on the FVP blink, like:
71+
The FVPs start running, and the LEDs on the FVP blink, like:
72+
73+
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/fastmodel_cm3.png)<span>A screen shot of FVPs running</span></span>
74+
75+
<span class="notes">**Note:** FVP's `-a` option only takes `.elf` format images. To use the `--data` option with binary format images, please reference the [FVP reference guide](https://developer.arm.com/docs/100966/latest).</span>
76+
77+
#### Run Mbed OS sockets examples with Fast Models ethernet
78+
79+
Fast Models ethernet is a special component not enabled by default.
5980

60-
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/fastmodel_cm3.png)<span>a screen-shot for FVPs running</span></span>
81+
<span class="notes">**Note:** The current version of Fast Model ethernet implementations requires Fast Models 11.3 or later or DS-5 5.29.0 or later. Also, the simulated IP routing only works on TCP and IP protocols, but neither the ICMP nor the IGMP protocol. This means ping does not work. For more details about how the Fast Models ethernet MAC works, please reference the [Fast Models reference manual](https://developer.arm.com/products/system-design/fast-models/docs/100964/latest/introduction/network-set-up/user-mode-networking).</span>
6182

62-
<span class="notes">**Note:** FVP's `-a` option only takes .elf format images. To use the `--data` option with binary format images, please reference the [FVP Users' Guide](http://arminfo.emea.arm.com/help/index.jsp?topic=/com.arm.doc.100966_1103_00_en/index.html).</span>
83+
Here, the `mbed-os-example-sockets` example demonstrates ethernet function. You can build the example as usual:
84+
85+
```
86+
$ mbed import mbed-os-example-sockets
87+
$ cd mbed-os-example-sockets
88+
$ mbed compile -t GCC_ARM -m FVP_MPS2_M3
89+
```
90+
91+
While launching the Mbed OS socket example with the Fast Models Ethernet function, you need to pass the arguments `-C fvp_mps2.smsc_91c111.enabled=1` and `-C fvp_mps2.hostbridge.userNetworking=1` in the command-line:
92+
93+
```
94+
$ FVP_MPS2_Cortex-M3 -C fvp_mps2.smsc_91c111.enabled=1 -C fvp_mps2.hostbridge.userNetworking=1 -a BUILD/FVP_MPS2_M3/GCC_ARM/mbed-os-example-sockets.elf
95+
```
96+
97+
The FVPs start running, and the console output looks like:
98+
99+
```
100+
Mbed OS Socket example
101+
Mbed OS version: 99.99.99
102+
103+
IP address: 172.20.51.1
104+
Netmask: 255.255.255.0
105+
Gateway: 172.20.51.254
106+
sent 58 [GET / HTTP/1.1]
107+
recv 181 [HTTP/1.1 200 OK]
108+
External IP address: 217.140.106.54
109+
Done
110+
```
63111

64112
### Notes
65113

66114
1. Timing accuracy of Fast Models can't be guaranteed.
67115
1. There is no support for external peripherals, such as ESP8266 expansion boards.
68-
1. Ethernet support for Fast Models is in progress.

0 commit comments

Comments
 (0)