Skip to content

Commit a041986

Browse files
Qinghao ShiQinghao Shi
authored andcommitted
update with Fast Models Ethernet functions
1 parent 357d2b5 commit a041986

File tree

1 file changed

+55
-9
lines changed

1 file changed

+55
-9
lines changed

docs/tools/fastmodels/fastmodels.md

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,23 @@ 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.)
26-
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).
28-
29-
The following examples use [`mbed-os-example-blinky`](https://github.com/ARMmbed/mbed-os-example-blinky).
25+
Fast Models can run most of the Mbed OS examples.
26+
27+
Examples you can successfully run include:
28+
* [`mbed-os-example-blinky`](https://github.com/ARMmbed/mbed-os-example-blinky)
29+
* [`mbed-os-example-tls`](https://github.com/ARMmbed/mbed-os-example-tls)
30+
* [`mbed-os-example-devicekey`](https://github.com/ARMmbed/mbed-os-example-devicekey)
31+
* [`mbed-os-example-nvstore`](https://github.com/ARMmbed/mbed-os-example-nvstore)
32+
* [`mbed-os-example-thread-statistics`](https://github.com/ARMmbed/mbed-os-example-thread-statistics)
33+
* [`mbed-os-example-sys-info`](https://github.com/ARMmbed/mbed-os-example-sys-info)
34+
* [`mbed-os-example-cpu-usage`](https://github.com/ARMmbed/mbed-os-example-cpu-usage)
35+
* [`mbed-os-example-cpu-stats`](https://github.com/ARMmbed/mbed-os-example-cpu-stats)
36+
* [`mbed-os-example-error-handling`](https://github.com/ARMmbed/mbed-os-example-error-handling)
37+
* [`mbed-os-example-filesystem`](https://github.com/ARMmbed/mbed-os-example-filesystem)
38+
* [`mbed-os-example-blockdevice`](https://github.com/ARMmbed/mbed-os-example-blockdevice)
39+
* [`mbed-os-example-sockets`](https://github.com/ARMmbed/mbed-os-example-sockets)
40+
41+
The following examples use `mbed-os-example-blinky`.
3042

3143
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`.
3244

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

58-
The FVPs start running, andthe LEDs on the FVP blink, like:
70+
The FVPs start running, and the LEDs on the FVP blink, like:
71+
72+
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/fastmodel_cm3.png)
73+
74+
<span>a screen-shot for FVPs running</span></span>
75+
76+
<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>
5977

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>
78+
#### Run Mbed OS sockets examples with Fast Models Ethernet
79+
80+
Fast Models ethernet is a specical compoment which not been enabled by default. Two special options are required when using the ethernet compoment or any networking functions.
81+
82+
<span class="notes">**Note:** 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/IP protocol, but neither ICMP nor IGMP protocol. which means ping would not work. For more details about how the Fast Models ethernet MAC working, 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>
83+
84+
Here, `mbed-os-example-sockets` example is used to demonstrated ethernet function. The example can be build as usual:
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+
While launching the mbed OS socket example with Fast Models Ethernet function, arguments `-C fvp_mps2.smsc_91c111.enabled=1` and `-C fvp_mps2.hostbridge.userNetworking=1` need to be passed in the command line:
91+
```
92+
$ 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
93+
```
94+
95+
The FVPs start running, and the console output like::
96+
97+
```
98+
Mbed OS Socket example
99+
Mbed OS version: 99.99.99
100+
101+
IP address: 172.20.51.1
102+
Netmask: 255.255.255.0
103+
Gateway: 172.20.51.254
104+
sent 58 [GET / HTTP/1.1]
105+
recv 181 [HTTP/1.1 200 OK]
106+
External IP address: 217.140.106.54
107+
Done
108+
```
61109

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>
63110

64111
### Notes
65112

66113
1. Timing accuracy of Fast Models can't be guaranteed.
67114
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)