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/
.
Fig. 10 Mem_opt_libs
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.

Fig. 11 CCS_optimized_libs
- Drag and drop the optimized
USS_SW_CCS.a
into CCS project directoryussSWLib/lib

Fig. 12 CCS_optimized_libs_drag_drop
- Select Link to files and make link relative to PROJECT_LOC

Fig. 13 CCS_optimized_libs_link
- Click on
Overwrite

Fig. 14 CCS_optimized_libs_overwrite
- Rebuild the project

Fig. 15 CCS_optimized_libs_rebuild
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.

Fig. 16 IAR_optimized_libs
- Remove existing USS_SW_IAR_small_code_large_data.lib

Fig. 17 IAR_optimized_libs_remove
- Drag and drop the appropriate *.lib file base on project configuration to
ussSWLib

Fig. 18 IAR_optimized_libs_drag
To determine the correct code and data model go to the project properties window and click on General Options

Fig. 19 IAR_optimized_libs_code_model
- Rebuild project

Fig. 20 IAR_optimized_libs_code_rebuild
Memory footprint comparison between optimized libraries¶
Code Composer Studio¶
Project Name | Lib Configuration | FRAM (Bytes) | LEA RAM (Bytes) | RAM (Bytes) |
---|---|---|---|---|
FR6043_USSSWLib_template_example | Full version | 49337 | 4656 | 774 |
Lobe | 39941 | 4656 | 760 | |
Hilbert | 38663 | 4656 | 756 | |
LobeWideandHilbWide | 43009 | 4656 | 764 | |
LobeWide | 41531 | 4656 | 736 | |
HilbWide | 40581 | 4656 | 764 | |
FR6047_USSSWLib_template_example | Full version | 39237 | 3696 | 764 |
Lobe | 29391 | 3696 | 772 | |
Hilbert | 28113 | 3696 | 768 | |
LobeWideandHilbWide | 32413 | 3696 | 776 | |
LobeWide | 30935 | 3696 | 748 | |
HilbWide | 29535 | 3696 | 776 |
IAR¶
Project Name | Lib Configuration | FRAM (Bytes) | LEA RAM (Bytes) | RAM (Bytes) |
---|---|---|---|---|
FR6043_USSSWLib_template_example | Full version | 43084 | 4656 | 784 |
Lobe | 35038 | 4656 | 770 | |
Hilbert | 33826 | 4656 | 766 | |
LobeWideandHilbWide | 36288 | 4656 | 774 | |
LobeWide | 35044 | 4656 | 746 | |
HilbWide | 34328 | 4656 | 774 | |
FR6047_USSSWLib_template_example | Full version | 32516 | 3696 | 432 |
Lobe | 23960 | 3696 | 418 | |
Hilbert | 22768 | 3696 | 414 | |
LobeWideandHilbWide | 25662 | 3696 | 422 | |
LobeWide | 24418 | 3696 | 394 | |
HilbWide | 23270 | 3696 | 422 |