Running a Demo using IAR Embedded Workbench

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running a Demo using IAR Embedded Workbench

Running a Demo using IAR Embedded Workbench

The following steps will guide you through opening the hello_world application. The instructions for compiling and debugging the Cortex M33 core are covered in the instructions below.

Build an Example Application

Please use IAR Embedded Workbench for Arm version 9.50.1 or above.

  1. First, unzip the previously downloaded FRDM-MCXW71 SDK package
  2. Open the desired example application workspace. Most example application workspace files can be located using the following path:

    <install_dir>/boards/<sdk_board_name>/<example_type>/<application_name>/iar

  3. Select the desired build target from the drop-down. For this example, select the "hello_world - debug" target
    Sabina_Bruce_1-1767115322919.png
  4. Open the project properties by doing a right-click on the project and selecting "Options"
    Sabina_Bruce_2-1767115378262.png
  5. Now, go to the "Debugger" section and change the debugger driver to CMSIS DAP. Press the OK button
    Sabina_Bruce_3-1767115394492.png
  6. To build the application, click the "Make" button, highlighted in red belowSabina_Bruce_4-1767115408772.png
  7. The build will complete without errors
    Sabina_Bruce_5-1767115443376.png

     

    Note: In case of building errors, make sure that the correct board is selected, right-click in Project → Options → General Options → Target → Device. Select the NXP MCU you are using and is supported by the IAR version you have installed.
Sabina_Bruce_6-1767115467787.png

 

Run an Example Application

  1. Connect the development platform to your PC via USB cable to 'MCU-Link' port
    Sabina_Bruce_7-1767115540901.png
  2. Click the "Download and Debug" button to download the application to the target
    Sabina_Bruce_8-1767115562027.png
  3. The application is then downloaded to the target and automatically runs to the main() function
  4. Run the code by clicking the "Go" button to start the application
    Sabina_Bruce_9-1767115576348.png
  5. The hello_world application is now running on the MCU.
%3CLINGO-SUB%20id%3D%22lingo-sub-2270154%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERunning%20a%20Demo%20using%20IAR%20Embedded%20Workbench%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270154%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%3CP%3EThe%20following%20steps%20will%20guide%20you%20through%20opening%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Ehello_world%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eapplication.%20The%20instructions%20for%20compiling%20and%20debugging%20the%20Cortex%20M33%20core%20are%20covered%20in%20the%20instructions%20below.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-207196793%22%20id%3D%22toc-hId-207196821%22%3EBuild%20an%20Example%20Application%3C%2FH4%3E%0A%3CP%3EPlease%20use%20IAR%20Embedded%20Workbench%20for%20Arm%20version%209.50.1%20or%20above.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EFirst%2C%20unzip%20the%20previously%20downloaded%20FRDM-MCXW71%20SDK%20package%3C%2FLI%3E%0A%3CLI%3E%0A%3CP%3EOpen%20the%20desired%20example%20application%20workspace.%20Most%20example%20application%20workspace%20files%20can%20be%20located%20using%20the%20following%20path%3A%3C%2FP%3E%0A%3CP%3E%3CCODE%3E%3CINSTALL_DIR%3E%2Fboards%2F%3CSDK_BOARD_NAME%3E%2F%3CEXAMPLE_TYPE%3E%2F%3CAPPLICATION_NAME%3E%2Fiar%3C%2FAPPLICATION_NAME%3E%3C%2FEXAMPLE_TYPE%3E%3C%2FSDK_BOARD_NAME%3E%3C%2FINSTALL_DIR%3E%3C%2FCODE%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3ESelect%20the%20desired%20build%20target%20from%20the%20drop-down.%20For%20this%20example%2C%20select%20the%20%22hello_world%20-%20debug%22%20target%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_1-1767115322919.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_1-1767115322919.png%22%20style%3D%22width%3A%20243px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371440i31672C1E1EBA1A66%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_1-1767115322919.png%22%20alt%3D%22Sabina_Bruce_1-1767115322919.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EOpen%20the%20project%20properties%20by%20doing%20a%20right-click%20on%20the%20project%20and%20selecting%20%22Options%22%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_2-1767115378262.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_2-1767115378262.png%22%20style%3D%22width%3A%20282px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371441i068FFACD26058E39%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_2-1767115378262.png%22%20alt%3D%22Sabina_Bruce_2-1767115378262.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3ENow%2C%20go%20to%20the%20%22Debugger%22%20section%20and%20change%20the%20debugger%20driver%20to%20CMSIS%20DAP.%20Press%20the%20OK%20button%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_3-1767115394492.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_3-1767115394492.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371442iA37B337CD5BF5C83%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_3-1767115394492.png%22%20alt%3D%22Sabina_Bruce_3-1767115394492.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3ETo%20build%20the%20application%2C%20click%20the%20%22Make%22%20button%2C%20highlighted%20in%20red%20below%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_4-1767115408772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_4-1767115408772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371443iB951956037E04839%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_4-1767115408772.png%22%20alt%3D%22Sabina_Bruce_4-1767115408772.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EThe%20build%20will%20complete%20without%20errors%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_5-1767115443376.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_5-1767115443376.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371444iE155C4A610253630%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_5-1767115443376.png%22%20alt%3D%22Sabina_Bruce_5-1767115443376.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3BIn%20case%20of%20building%20errors%2C%20make%20sure%20that%20the%20correct%20board%20is%20selected%2C%20right-click%20in%20Project%20%E2%86%92%20Options%20%E2%86%92%20General%20Options%20%E2%86%92%20Target%20%E2%86%92%20Device.%20Select%20the%20NXP%20MCU%20you%20are%20using%20and%20is%20supported%20by%20the%20IAR%20version%20you%20have%20installed.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_6-1767115467787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_6-1767115467787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371445iF34F0337F8411126%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_6-1767115467787.png%22%20alt%3D%22Sabina_Bruce_6-1767115467787.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CH4%20id%3D%22toc-hId--1600257670%22%20id%3D%22toc-hId--1600257642%22%3ERun%20an%20Example%20Application%3C%2FH4%3E%0A%3COL%3E%0A%3CLI%3EConnect%20the%20development%20platform%20to%20your%20PC%20via%20USB%20cable%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E'MCU-Link'%20port%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_7-1767115540901.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_7-1767115540901.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371446iAE5B9A554449C1A2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_7-1767115540901.png%22%20alt%3D%22Sabina_Bruce_7-1767115540901.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EClick%20the%20%22Download%20and%20Debug%22%20button%20to%20download%20the%20application%20to%20the%20target%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_8-1767115562027.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_8-1767115562027.png%22%20style%3D%22width%3A%20431px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371447i406D2FA8CDB800F5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_8-1767115562027.png%22%20alt%3D%22Sabina_Bruce_8-1767115562027.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EThe%20application%20is%20then%20downloaded%20to%20the%20target%20and%20automatically%20runs%20to%20the%20main()%20function%3C%2FLI%3E%0A%3CLI%3ERun%20the%20code%20by%20clicking%20the%20%22Go%22%20button%20to%20start%20the%20application%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sabina_Bruce_9-1767115576348.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sabina_Bruce_9-1767115576348.png%22%20style%3D%22width%3A%20234px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371448i53279FE2C8CD0B67%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Sabina_Bruce_9-1767115576348.png%22%20alt%3D%22Sabina_Bruce_9-1767115576348.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Ehello_world%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eapplication%20is%20now%20running%20on%20the%20MCU.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
2 weeks ago
Updated by: