Using the memory optimized libraries¶
During evaluation of the library it is recommended to use the Full Version of the library ([Library_INSTALL_DIR]/lib/USS_optimized/
). The full version of the library allows users to evaluated different algorithms performance. Once users have determined the optimal algorithm option for their application. Users can take advantage of the memory optimized library which are available under [Library_INSTALL_DIR]/lib/USS_optimized/
.
Linking memory optimized library to template example project¶
The library template examples by default links to the full version of the library. the table below indicates the different algorithm options supported for AToF, DToF and VFR calculations by each library.
Library Option | USS_Alg_AbsToF_Calculation_Option_lobe | USS_Alg_AbsToF_Calculation_Option_hilbert | USS_Alg_AbsToF_Calculation_Option_lobeWide | USS_Alg_AbsToF_Calculation_Option_hilbertWide | USS_Alg_dToF_Calculation_Option_estimate | USS_Alg_dToF_Calculation_Option_water (Obsolete) | USS_Alg_volume_flow_Calculation_Option_water (Obsolete) | USS_Alg_volume_flow_Calculation_Option_generic |
---|---|---|---|---|---|---|---|---|
Full Version | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Lobe | ✔ | ✔ | ✔ | |||||
Hilbert | ✔ | ✔ | ✔ | |||||
Lobe Wide | ✔ | ✔ | ✔ | |||||
Hilbert Wide | ✔ | ✔ | ✔ | |||||
Lobe wide and Hilbert Wide | ✔ | ✔ | ✔ | ✔ |
Code Composer Studio¶
To use a memory optimized library
- After importing the library template example, go to
<LIB_INSTALL_DIR>/lib/USS_optimized/*/CCS
and select the appropriate optimized library.
- Drag and drop the optimized
USS_SW_CCS.a
into CCS project directoryussSWLib/lib
- Select Link to files and make link relative to PROJECT_LOC
- Click on
Overwrite
- Rebuild the project
IAR¶
To use a memory optimized library
- After importing the library template example, go to
<LIB_INSTALL_DIR>/lib/USS_optimized/*/IAR
and select the appropriate optimized library.
- Remove existing USS_SW_IAR_small_code_large_data.lib
- Drag and drop the appropriate *.lib file base on project configuration to
ussSWLib
To determine the correct code and data model go to the project properties window and click on General Options
- Rebuild project
Memory footprint comparison between optimized libraries¶
This section includes Code Composer Studio and IAR memory footprints for different library configurations for the following code examples:
- FR6043_USSSWLib_template_example - Compiled for gas applications using multi tone pulse mode, UART disabled and USS_SW_LIB_APP_MAX_CAPTURE_SIZE = 300.
- FR6047_USSSWLib_template_example - Compiled for water applications using single tone pulse mode, and UART disabled.
Code Composer Studio¶
Project Name | Lib Configuration | FRAM (Bytes) | LEA RAM (Bytes) | RAM (Bytes) |
---|---|---|---|---|
FR6043_USSSWLib_template_example [Gas] | HilbWide | 30861 | 2800 | 2212 |
FR6047_USSSWLib_template_example [Water] | Lobe | 25803 | 2616 | 780 |
IAR¶
Project Name | Lib Configuration | FRAM (Bytes) | LEA RAM (Bytes) | RAM (Bytes) |
---|---|---|---|---|
FR6043_USSSWLib_template_example [Gas] | HilbWide | 28106 | 2800 | 2069 |
FR6047_USSSWLib_template_example [Water] | Lobe | 23512 | 2616 | 597 |