mbed-fastmodel-agent is a python module for Mbed OS GreenTea testing framework using FastModels FVP (Fixed Virtual Platforms).
This module only designed to work with Greentea and Htrun, It enables enables Fast Models to run Mbed OS Greentea test suites.
If user only need to run mbed OS applications or examples rather than Greentea tests on Fast Models, please referencing this mbed OS documents
- Make sure you have Arm Fast Models Libraries files installed to your host machines, as well as the Fast Models PyCADI.
- A valid Fast Models license been set up correctly.
- Install Greentea latest master from GitHub (current 1.4.0 release do not contains the support for Fast Models)
- Htrun Version 1.4.1 or later
git clone https://github.com/ARMmbed/mbed-fastmodel-agent.git
cd mbed-fastmodel-agent
- Edit the configuration file
fm_agent\settings.json
- Change
model_lib_path
value in theGLOBAL
section to your Fast Models installation folder (where contains all fastmodel libs). - Change
PyCADI_path
value to PyCADI folder, alternatively you can havePVLIB_HOME
environment variable set on your host - Optional: edit individual models if necessary
- Optional: add configs to models if necessary
python setup.py install
NOTE. you will need to re-run the install command after you changed the "settings.json" or any config file
mbedfm
you should be able to see a table like:
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| MODEL NAME | MODEL LIB full path | CONFIG NAME | CONFIG FILE | AVAILABILITY |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| | | DEFAULT | DEFAULT.conf | YES |
| FVP_MPS2_M0 | C:\work\model_libs\FVP_MPS2_Cortex-M0.dll | FAST | FAST.conf | YES |
| | | NETWORK | NETWORK.conf | YES |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| | | DEFAULT | DEFAULT.conf | YES |
| FVP_MPS2_M0P | C:\work\model_libs\FVP_MPS2_Cortex-M0plus.dll | FAST | FAST.conf | YES |
| | | NETWORK | NETWORK.conf | YES |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| | | DEFAULT | DEFAULT.conf | YES |
| FVP_MPS2_M3 | C:\work\model_libs\FVP_MPS2_Cortex-M3.dll | FAST | FAST.conf | YES |
| | | NETWORK | NETWORK.conf | YES |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| | | DEFAULT | DEFAULT.conf | YES |
| FVP_MPS2_M4 | C:\work\model_libs\FVP_MPS2_Cortex-M4.dll | FAST | FAST.conf | YES |
| | | NETWORK | NETWORK.conf | YES |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
| | | DEFAULT | DEFAULT.conf | YES |
| FVP_MPS2_M7 | C:\work\model_libs\FVP_MPS2_Cortex-M7.dll | FAST | FAST.conf | YES |
| | | NETWORK | NETWORK.conf | YES |
+--------------+-----------------------------------------------+-------------+--------------+--------------+
mbedfm --self-test
This command will check if Fast Models product installed correctly and if mbed-fastmodel-agent module been configured correctly This will try to launch every model in the above list to verify them, so will take some time to finish
mbedgt --fm <model_name>:<config_name>
e.g.
mbedgt --fm FVP_MPS2_M3:DEFAULT
mbedhtrun --fm <config_name> -m <model_name> -f <test_image>
e.g.
mbedhtrun --fm DEFAULT -m FVP_MPS2_M3 -f test.elf
<model_name> : The name to fastmodel target supported in mbed os
<config_name> : This could be ether pre-defined CONFIG_NAME
listed inside mbedfm or a local file
The mbed fastmodel_agent module allow user to configure each individual module via a config file. by default, 3 config files are provided:
- DEFAULT - default settings
- FAST - based on default turned off speed limit
- NETWORK - based on default enabled Ethernet
all config files are in mbed-fastmodel-agent\fm_agent\configs
directory, user can edit config file if required.
The config files are standard Fast Models config file. for more detail about details of the settings, please check Fast Models Users guide NOTE. you will need to re-run the install command after you changed the "settings.json" or any config file
Users are able to add their own customized config file to the mbed-fastmodel-agent\fm_agent\configs
directory.
Then users need to edit mbed-fastmodel-agent\fm_agent\settings.json
file either in GLOBAL
section or individual models.
Key configs_add
can be added for additional config files for each model, Or Key config
can be added to overwrite GLOBAL
config files.
- Fast Models normally have 3 or 4 serial terminal ports. But currently only one port is supported at moment.