2027015_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2027015_en-US

2027015_en-US

MCUXpresso SDK: CMake Usage - Build Options

Exploring CLI Build Options

In a previous article, we demonstrated how to build a simple project using the CLI. However, we can easily build more complex projects using west build options. We can specify a specific toolchain, compiler, core, etc. To view the complete list of build options run the command:

west build -h


Dual Core Device Example

For single core devices there is no need to specify a core ID. However, this must be done when working with a dual core device. For example, to build Hello_World for the FRDM MCXN947, the following command needs to be run:

west build -b frdmmcxn947 example/demo_apps/hello_world -Dcore_id=cm33_core0

joseOcampoHernandez_0-1736800312855.png

Specifying a Toolchain

The MCUXpresso SDK supports several toolchains. To take the example above and build for IAR, we simply specify the IAR toolchain with a build option as follows:

west build -b frdmmcxn947 example/demo_apps/hello_world -Dcore_id=cm33_core0 --toolchain iar

joseOcampoHernandez_1-1736800353601.png

Specifying a Different Build Directory

As you can see the CLI is quick and easy to use for building projects. So far, we have covered some of the major build options to consider. What happens when we want to evaluate with different builds simultaneously? Well, we can specify different build directories within our workspace. To designate a different build directory for the project above, simply run:

west build -b frdmmcxn947 examples/demo_apps/hello_world -Dcore_id=cm33_core0 --toolchain iar -d C:\temp-sdk\mcuxsdk\custom_build

joseOcampoHernandez_0-1736804302394.png

*Note the path shown has been personalized. The path for your system will vary.

MCUXpresso for VS Code
タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-19-2025 01:08 PM
更新者: