Hello,
Here are some helpful steps to follow when working with the NXP GitHub SDK.
Step1: Ensure the necessary toolchains are installed:
https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/repo.html
Additional notes and links:
Step 2: Download and Install the SDK:
- Open VS Code, navigate to Import Repository and select the Remote option as shown below:
- Upon successful import, the repository will show up in the Imported Repositories window:
- west commands:
# Initialize west with the manifest repository west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests/ mcuxpresso-sdk # Update the west projects cd mcuxpresso-sdk west update
More details: https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/installation.html#get-mcuxpresso-sdk-repo
- import the local repository to VS code: Open VS Code, navigate to Import Repository and select the Local option and Browse.. to your local repo:
Step3: Run a Bluetooth LE Example
Step3a: Run a Bluetooth LE Example using MCUXpresso for VS code
- click Import Example from Repository from the QuickStart Panel
- From the open dialog, select the MCUXpresso SDK, the Arm GNU toolchain, your target board, desired template, and application type, and proceed by clicking Import:
For the application type, you’ll typically see two options:
- Repository application
- Freestanding application.
The key difference lies in where the project is imported. Repository applications are placed within the MCUXpresso SDK directory, while Freestanding applications can be imported to a custom location defined by the user.
- Next, VS Code will prompt you to verify trust for the imported files—click Yes.
Navigate to the PROJECTS view.
- Identify your project, right click and select the Prestine Build icon to begin building:
- details of the build are into the terminal window:
- using Debug button will allow you to download and debug the software:
(useful link: https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/run_a_demo_using_mcuxvsc.html )
Step3b: Run a Bluetooth LE Example using IAR Embedded Workbench for ARM:
- use the west list_projects command to list the supported example for boards and the corresponding toolchain:
Example to list Bluetooth examples:
west list_project -p .\examples\wireless_examples\bluetooth\
or if you know the platform or/and the project you can use:
west list_project -b kw45b41zevk -p .\examples\wireless_examples\bluetooth\w_uart
west list_project -b frdmmcxw23 -p .\examples\wireless_examples\bluetooth\w_uart
Once you've confirmed that the project is available for the IAR toolchain, run the appropriate command to build it:
west build -p always examples/wireless_examples/bluetooth/w_uart/freertos --toolchain iar --config debug -b kw45b41zevk
The build folder will contain the generated output:
To work with IDE add -t guiproject in the west command:
west build -p always examples/wireless_examples/bluetooth/w_uart/freertos --toolchain iar --config debug -b kw45b41zevk -t guiproject --pristine --build-dir=build/w_uart_freertos_kw45
The result of the build will indicate the path to the *.eww/*.ewp:
(additional details: https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/run_project.html )
Step4: Create a standalone example
With the freestanding project approach, only the application code is included in the export folder. Other essential files remain linked to the repository.
To generate a complete standalone project, the recommended method is using West by adding -t standalone_project option.
Example of command for kw45b41zevk, IAR toolchain:
west build -b kw45b41zevk ./examples/wireless_examples/bluetooth/w_uart/freertos -p always --toolchain iar --config debug -t standalone_project -d c:\work\w_uart_kw45
The result of the build will indicate the path to the *.eww/*.ewp:
Example of command for kw45b41zevk, armgcc toolchain:
west build -b kw45b41zevk ./examples/wireless_examples/bluetooth/w_uart/freertos -p always --toolchain armgcc --config debug -t standalone_project -d c:\work\w_uart_KW45_armgcc
The result of the build will indicate the path to the project that need to be imported in VsCode:
Regards,
Ovidiu