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 MC56F80000-EVK (document MCUXSDKMC56F80000RN).

  1. Download CodeWarrior for DSC v11.2, and ServicePack1 for DSC devices from CodeWarrior for 56800 Digital Signal Controller v11.2.

  2. Install CodeWarrior for DSC v11.2.

  3. Install ServicePack1 within CodeWarrior from the menu..

  4. Click the Help menu help and select Install new software > Add > Archive.

  5. 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:

  1. 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.

  2. 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. 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 MC56F80000-EVK hardware platform as an example, the hello_world workspace is located in:

    <install_dir>/boards/mc56f80000evk/demo_apps/hello_world/codewarrior
    
  3. Select the desired build target from the drop-down menu. For this example, select hello_worldflash_sdm_lpm_debug, as shown in Figure 4.

  4. To build the demo application, click Build (All) in the Commander pane.

  5. 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.

  1. Connect the MC56F80000-EVK USB port J12 to PC via micro USB cable. It setups the debugger multilink and USB to UART bridge.

  2. Install the multilink and USB to UART bridge driver as PC hint if it is the first time you run it on your PC. The MultiLink driver is provided by CodeWarrior by default.

  3. 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:

    1. 115200, defined by BOARD_DEBUG_UART_BAUDRATE in the board.h file

    2. No parity

    3. 8 data bits

    4. 1 stop bit

  4. 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 configurations for DSC SDK 2.12.0: 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.

  5. 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