Run a demo application using CodeWarrior
This section describes the steps required to build, run, and debug example applications provided in the MCUXpresso SDK.
Note: CodeWarrior for DSC v11.2 is used as an example to show below steps, and the DSC toolchain should correspond to the latest supported version, as described in MCUXpresso SDK Release Notes for MC56F81000-EVK (document MCUXSDKMC56F81000RN).
Download CodeWarrior for DSC v11.2, and ServicePack1 for DSC devices from CodeWarrior for 56800 Digital Signal Controller v11.2.
Install CodeWarrior for DSC v11.2.
Install ServicePack1 within CodeWarrior from the menu.
Click the Help menu and select Install new software > Add > Archive. Select the SP on your computer, check MCU v11.2 DSC Service Packs, and click Next.
Build an example application
To build the hello_world
example application, perform the following example steps:
Launch CodeWarrior. In the workspace launcher, choose a workspace which holds the projects to use. If the dialogue box does not pop up, enter a workspace folder and create one workspace.
|
|
Then the CodeWarrior Development Studio workspace with empty projects appears.
|
|
Import the project into the workspace.
Click Import project in the Commander pane. A form pops up. Click Browse to the SDK install directory.
|
|
Then all available demo projects are as shown in [Figure 3](build_an_example_application.md#FIG_PROJECTIMPORT). Select the `hello_world` project in the list, and click **Finish**.
If you already know the project location, navigate to the folder when clicking **Browse**, and only one project can be seen.
To locate most example application workspace files, use the following path:
```
<install_dir>/boards/<board_name>/<example_type>/<application_name>/codewarrior
```
Using the MC56F81000-EVK hardware platform as an example, the `hello_world` workspace is located in:
```
<install_dir>/boards/evkmc56f81000/demo_apps/hello_world/codewarrior
```
Select the desired build target from the drop-down menu. For this example, select hello_world – flash_sdm_lpm_debug, as shown in Figure 4.
|
|
To build the demo application, click Build (All) in the Commander pane.
The build completes without errors.
Parent topic:Run a demo application using CodeWarrior
Run an example application
Perform the following steps to download and run the application.
Connect the MC56F81000-EVK USB port, J12, to your PC via USB cable. This USB port is used for on-board multilink debugger.
Connect the MC56F81000-EVK USB port, J26, to your PC via USB cable. This USB port is used for on-board CP2102 USB to UART bridge.
Install the MultiLink driver as PC hint if it is the first time you run it on your PC. The MultiLink driver are provided by Codewarrior by default. The USB to UART bridge (CP2102) driver may be found on the internet or SILICON LAB.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM port (to determine the COM port number, see How to determine COM port). Configure the terminal with these settings:
115200, defined by
BOARD_DEBUG_UART_BAUDRATE
in the board.h fileNo parity
8 data bits
1 stop bit |
|
For this example, click Debug in the Commander pane, and select the hello_world_flash_sdm_lpm_debug_PnE U-MultiLink launch configuration.
|
|
|
|
Then the application is downloaded onto target board and automatically runs to the `main()` function.
Click **Run** on the toolbar to run the code.
**Note:**
1. Generally there are four build configuration for DSC SDK 2.x.x: `flash_sdm_lpm_debug`, `flash_sdm_lpm_release`, `flash_ldm_lpm_debug`, and `flash_ldm_lpm_release`.
`debug` uses optimization level 1 and `release` uses optimization level 4. `sdm` means small data memory model. `ldm` means large data memory model. `lpm` means large program memory model.
2. Check each demo `readme` document, which includes detail instructions for HW and SW settings.
|
|
The
hello_world
application is now running and a banner is displayed on the terminal, as shown in Figure 5. If it does not appear, check your terminal settings and connections.|
|
Parent topic:Run a demo application using CodeWarrior