Skip to main content
swapnil champaneria
Associate III
January 20, 2020
Question

How can I debug user application code in Xcube-AWS?

  • January 20, 2020
  • 3 replies
  • 1247 views

I am trying to compile directly Xcube-aws code but it's not compiling in TrueSTUDIO. In Keil it do compiled but not debug, I have to load .sfb file through uart to run code. How can I debug and merge my sensor code in Xcube-aws code and debug it. @Community member​ @Amel NASRI​ 

This topic has been closed for replies.

3 replies

LMEUN
ST Employee
February 17, 2020

Hi

I assume that you are using X-CUBE-AWS-V1.3 which uses the SBSFU as a secure Boot loader.

With SBSFU, when all security features are enabled, the DEBUG will not be possible - which is one of the protections enabled by SBSFU.

Information about the bootloader can be found in Applications/BootLoader/readme.txt.

In particular, it states that the SBSFU configuration icna be found in:

+ Configuration is located in file : ./2_Images_SBSFU/SBSFU/App/app_sfu.h

If you want to debug, you need the below lines to be uncommented:

/* Uncomment the following define when in Debug mode.
 
 In debug mode some of the features are not activated (WRP, RDP, IWDG, DAP, etc.) */
 
#define SFU_DEBUG_MODE /*!< Uncomment this define when in Debug mode.
 
 In debug mode some of the features are not activated (WRP, RDP, IWDG, DAP, etc.) */

Can you please confirm that this is the case ?

Also once you've activated security features, you will need to use STM32CubeProgrammer to reset them to a non-secure state. Please read X-CUBE-SBSFU package documentation to get more information about the different setting security and how to discard them.

hope this helps

Laurent

swapnil champaneria
Associate III
February 17, 2020

Hello LMEUN,

I did uncomment that macro. Still I cannot debug my user application using stlink debugger, Is there any other way available

to debug with user application using stlink ?

Thanks and regards

swapnil

LMEUN
ST Employee
February 17, 2020

Hello Swapnil,

can you please confirm that you have reset your device RDP and other protections using STM32CubeProgrammer ?