cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug X-Cube-AWS in IAR

The objective of this article is to instruct a user to be able to debug X-Cube-AWS effectively in IAR. Debugging helps the user understand the program flow and figure out which line of code could be causing any sort of deviance from normalcy.

1. Pre-requisites 

A Micro USB Cable is used to power and debug.  

2. Software Tools 

3. Steps 

  1. Extract the package directly onto the C drive

    (if the file path is too long it will generate build errors). Open IAR and Click on File->Open Workspace and open the following and navigate to the  Project.eww files in the following paths: 

  • C:\STM32CubeExpansion_Cloud_AWS_V2.0.0\Projects\B-L4S5I-IOT01A\Applications\BootLoader_STSAFE\2_Images_SECoreBin\EWARM 

  • C:\STM32CubeExpansion_Cloud_AWS_V2.0.0\Projects\B-L4S5I-IOT01A\Applications\BootLoader_STSAFE\2_Images_SBSFU\EWARM 

  • C:\STM32CubeExpansion_Cloud_AWS_V2.0.0\Projects\B-L4S5I-IOT01A\Applications\BootLoader_STSAFE\STSAFE_Provisioning\EWARM 

  • C:\STM32CubeExpansion_Cloud_AWS_V2.0.0\Projects\B-L4S5I-IOT01A\Applications\Cloud\aws_demos\EWARM 

  1. Click on Open  

1462.png

  1. Build the projects

    in the following order by clicking on the build icon -  2_Images_SECoreBin,   2_Images_SBSFU, STSAFE_Provisioning and then B-L4S5-IOT01_aws_demos . Note that a wrong compilation order will generate build errors.  

1463.png

  1. Go to the project explorer and drag and drop the binary 

    (C:\STM32CubeExpansion_Cloud_AWS_V2.0.0\ Projects\B-L4S5I-IOT01A\Applications\Cloud\aws_demos\EWARM\Debug) to the board (eg: DIS_L4S5VI).       
    1464.png 1465.png

  2. Go back to the IDE

    You can place a breakpoint as shown below by clicking right next to the line number.  
    1466.png

  1. Make sure that the board is connected to your laptop

    Click on Project -> Debug without Downloading.   
    1467.png

Or, you can also click on the following icon.  

1468.png

  1. Step into the function to see the flow of the program from the toolbar: 


    1469.png

  1. Step over to the next line of code using the following icon:  

    1470.png

 4. Additional material  

 
 
 
Version history
Last update:
‎2021-11-12 03:28 AM