cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to debug on STM32L151VE via IAR Embedded Workbench

zhm
Associate

We've got some piece of code that we would like to debug on the MCU. This works fine with the previous hardware version of our product, which uses an STM32L151RET6.

On our new hardware version using the STM32L151VE, however, debugging from IAR does not work (full log is attached). Interestingly, flashing the hex file via ST-Link utility and running the code on the new hardware works fine.

The attached log file shows many "Verify error at address" errors like shown below. According to my colleagues, the IAR workbench project should be correctly configured for our new hardware.

Tue Feb 16, 2021 09:35:29: Warning: Verify error, failed to read memory at address 0x20000000 - 0x2000001F 
Tue Feb 16, 2021 09:35:29: Warning:  
Tue Feb 16, 2021 09:35:29: Verify error at address 0x20000000, target byte: 0xAA, byte in file: 0x00 

I wasn't able to pin the root cause of this so far and would be happy to find out in which direction I should focus: Is this problem more likely related with the MCU itself, or is it more likely an issue with IAR workbench?

2 REPLIES 2

"Is this problem more likely related with the MCU itself, or is it more likely an issue with IAR workbench?"

Most likely it's an issue with your Project - you've missed something that needs to be updated for the change from RET6 to VE ...

What happens if you create a simple test project (eg, "blinky") from scratch for the VE ?

"According to my colleagues, the IAR workbench project should be correctly configured for our new hardware."

give it back to them to check!

zhm
Associate

Thanks for your answer Andrew!

You're right, it is likely an issue with the project! I managed to do a workaround that is good enough for now:

  1. Change debug reset mode to "Normal"
  2. Compile project in IAR
  3. Flash hex with J-Link Commander (erase, loadfile, r)
  4. Start debugging in IAR with "Debug without Downloading"

What happens if you create a simple test project (eg, "blinky") from scratch for the VE ?

Same issue.

give it back to them to check!

Brilliant, Andrew! :*

I will leave the question open until I could solve the root cause.