|
2 | 2 |
|
3 | 3 | # mbed-fastmodel-agent |
4 | 4 |
|
5 | | -mbed-fastmodel-agent is a python module for mbed os testing framework using FastModels FVP(Fixed Virtual Platforms). |
| 5 | +mbed-fastmodel-agent is a python module for Mbed OS GreenTea testing framework using FastModels FVP (Fixed Virtual Platforms). |
6 | 6 |
|
7 | | -This module enables [greentea](https://github.com/ARMmbed/greentea) and [htrun](https://github.com/ARMmbed/htrun) running mbed os tests on Fast Models |
| 7 | +This module only designed to work with [Greentea](https://github.com/ARMmbed/greentea) and [Htrun](https://github.com/ARMmbed/htrun), |
| 8 | +It enables enables Fast Models to run Mbed OS Greentea test suites. |
8 | 9 |
|
9 | | -To use this module, It is required FastModel and it's PyCADI interface to be installed on the host. |
| 10 | +If user only need to run mbed OS applications or examples rather than Greentea tests on Fast Models, please referencing [this mbed OS documents](https://os.mbed.com/docs/v5.10/tools/fast-models.html) |
10 | 11 |
|
11 | | -## download |
| 12 | + |
| 13 | +## Requirements |
| 14 | +1. Make sure you have Arm Fast Models Libraries files installed to your host machines, as well as the Fast Models PyCADI. |
| 15 | +2. A valid Fast Models license been set up correctly. |
| 16 | +2. Install [Greentea](https://github.com/ARMmbed/greentea) latest master from GitHub (current 1.4.0 release do not contains the support for Fast Models) |
| 17 | +3. Htrun Version 1.4.1 or later |
| 18 | + |
| 19 | +## Download |
12 | 20 | ``` |
13 | | -git clone <repo_address> |
| 21 | +git clone https://github.com/ARMmbed/mbed-fastmodel-agent.git |
14 | 22 | cd mbed-fastmodel-agent |
15 | 23 | ``` |
16 | 24 |
|
17 | | -## configurations |
18 | | -1. Make sure you have Arm FastModels product installed, and "PVLIB_HOME" environment variable is set. |
19 | | -2. Edit the "Global" section in file `fm_agent\settings.json` |
20 | | -3. Change "model_lib_path" to your fastmodel installation folder (where contains all fastmodel libs). |
| 25 | +## Settings before installation |
| 26 | +1. Edit the configuration file `fm_agent\settings.json` |
| 27 | +2. Change `model_lib_path` value in the `GLOBAL` section to your Fast Models installation folder (where contains all fastmodel libs). |
| 28 | +3. Change `PyCADI_path` value to PyCADI folder, alternatively you can have `PVLIB_HOME` environment variable set on your host |
21 | 29 | 4. Optional: edit individual models if necessary |
22 | | -4. Optional: add configs to models if necessary |
| 30 | +5. Optional: add configs to models if necessary |
23 | 31 |
|
24 | | -## install |
| 32 | +## Installation |
25 | 33 | ``` |
26 | 34 | python setup.py install |
27 | 35 | ``` |
28 | 36 | *NOTE. you will need to re-run the install command after you changed the "settings.json" or any config file* |
29 | 37 |
|
30 | | -## usage |
| 38 | +## Basic usage |
31 | 39 |
|
32 | | -### Self test if fastmodel product installed correctly, "PVLIB_HOME" and PyCADI are avaliable |
| 40 | +### list available models you can use with mbed testing framework |
| 41 | +``` |
| 42 | + mbedfm |
| 43 | +``` |
| 44 | +you should be able to see a table like: |
| 45 | +``` |
| 46 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 47 | +| MODEL NAME | MODEL LIB full path | CONFIG NAME | CONFIG FILE | AVAILABILITY | |
| 48 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 49 | +| | | DEFAULT | DEFAULT.conf | YES | |
| 50 | +| FVP_MPS2_M0 | C:\work\model_libs\FVP_MPS2_Cortex-M0.dll | FAST | FAST.conf | YES | |
| 51 | +| | | NETWORK | NETWORK.conf | YES | |
| 52 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 53 | +| | | DEFAULT | DEFAULT.conf | YES | |
| 54 | +| FVP_MPS2_M0P | C:\work\model_libs\FVP_MPS2_Cortex-M0plus.dll | FAST | FAST.conf | YES | |
| 55 | +| | | NETWORK | NETWORK.conf | YES | |
| 56 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 57 | +| | | DEFAULT | DEFAULT.conf | YES | |
| 58 | +| FVP_MPS2_M3 | C:\work\model_libs\FVP_MPS2_Cortex-M3.dll | FAST | FAST.conf | YES | |
| 59 | +| | | NETWORK | NETWORK.conf | YES | |
| 60 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 61 | +| | | DEFAULT | DEFAULT.conf | YES | |
| 62 | +| FVP_MPS2_M4 | C:\work\model_libs\FVP_MPS2_Cortex-M4.dll | FAST | FAST.conf | YES | |
| 63 | +| | | NETWORK | NETWORK.conf | YES | |
| 64 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 65 | +| | | DEFAULT | DEFAULT.conf | YES | |
| 66 | +| FVP_MPS2_M7 | C:\work\model_libs\FVP_MPS2_Cortex-M7.dll | FAST | FAST.conf | YES | |
| 67 | +| | | NETWORK | NETWORK.conf | YES | |
| 68 | ++--------------+-----------------------------------------------+-------------+--------------+--------------+ |
| 69 | +``` |
| 70 | +### Self test for the settings |
33 | 71 | ``` |
34 | 72 | mbedfm --self-test |
35 | | -``` |
36 | | - |
37 | | -### list available models you can use with mbed testing framwork |
38 | 73 | ``` |
39 | | - mbedfm |
40 | | -``` |
| 74 | +This command will check if Fast Models product installed correctly and if mbed-fastmodel-agent module been configured correctly |
| 75 | +This will try to launch every model in the above list to verify them, so will take some time to finish |
41 | 76 |
|
42 | | -### run mbed test with greentea |
| 77 | +### run mbed Greentea test |
43 | 78 | ``` |
44 | 79 | mbedgt --fm <model_name>:<config_name> |
45 | | -``` |
46 | | -*e.g. mbedgt --fm FVP_MPS2_M3:DEFAULT* |
47 | | - |
48 | | -*model_name : The name to fastmodel target supported in mbed os* |
49 | | - |
50 | | -*config_name : This could be ether pre-defined CONFIG_NAME listed inside mbedfm or a local file* |
51 | | - |
52 | | - |
| 80 | +``` |
| 81 | +>e.g. `mbedgt --fm FVP_MPS2_M3:DEFAULT` |
53 | 82 |
|
54 | 83 | ### run mbed test with htrun |
55 | 84 | ``` |
56 | 85 | mbedhtrun --fm <config_name> -m <model_name> -f <test_image> |
57 | | -``` |
58 | | -*e.g. mbedhtrun --fm DEFAULT -m FVP_MPS2_M3* |
59 | | - |
60 | | -*model_name : The name to fastmodel target supported in mbed os* |
| 86 | +``` |
| 87 | +>e.g. `mbedhtrun --fm DEFAULT -m FVP_MPS2_M3 -f test.elf` |
| 88 | +
|
| 89 | +*<model_name> : The name to fastmodel target supported in mbed os* |
| 90 | +*<config_name> : This could be ether pre-defined CONFIG_NAME listed inside mbedfm or a local file* |
| 91 | + |
| 92 | +# Configurations to Fast Models |
| 93 | + |
| 94 | +The mbed fastmodel_agent module allow user to configure each individual module via a config file. |
| 95 | +by default, 3 config files are provided: |
| 96 | +* DEFAULT - default settings |
| 97 | +* FAST - based on default turned off speed limit |
| 98 | +* NETWORK - based on default enabled Ethernet |
| 99 | + |
| 100 | +## change config files |
| 101 | + |
| 102 | +all config files are in `mbed-fastmodel-agent\fm_agent\configs` directory, user can edit config file if required. |
| 103 | + |
| 104 | +The config files are standard Fast Models config file. for more detail about details of the settings, please check [Fast Models Users guide](https://developer.arm.com/docs/100965/latest) |
| 105 | +*NOTE. you will need to re-run the install command after you changed the "settings.json" or any config file* |
| 106 | + |
| 107 | +## Add your own config file |
| 108 | + |
| 109 | +Users are able to add their own customized config file to the `mbed-fastmodel-agent\fm_agent\configs` directory. |
| 110 | + |
| 111 | +Then users need to edit `mbed-fastmodel-agent\fm_agent\settings.json` file either in `GLOBAL` section or individual models. |
61 | 112 |
|
62 | | -*config_name : This could be ether pre-defined CONFIG_NAME listed inside mbedfm or a local file* |
| 113 | +Key `configs_add` can be added for additional config files for each model, Or Key `config` can be added to overwrite `GLOBAL` config files. |
63 | 114 |
|
64 | | -## Known issues: |
65 | | -1. Fast Models normally have 3 or 4 serial terminal ports. But currently only one port is supported at moment. Port number is picked randomly. |
| 115 | +## Known limitations: |
| 116 | +1. Fast Models normally have 3 or 4 serial terminal ports. But currently only one port is supported at moment. |
0 commit comments