SPRADI0A July 2024 – November 2024
To ensure that the generated code is optimally executed on the C2000 MCU, compiler settings needs to be correctly configured beyond the Simulink specific optimization, which are hardware specific to the C2000 MCUs. As discussed in Section 3.1, if the build configuration setting is correctly configured as Faster Runs, the optimization level (-O2) will be invoked while running the code on the hardware. Additionally, if manually the optimization level is to be changed, the Toolchain details section in the Code generation tab of hardware settings allows you to configure the compiler settings by selecting build configuration as Specify. Compiler optimization settings are available in the C compiler settings as shown in Figure 3-3.