STM32CubeIDE Break at address "xxx" with no debug information available, or outside of program code
Asked Answered
O

1

5

I'm busy bring up some new hardware with a STM32F030C8 mcu. I'm using the STM32CubeIDE with gcc. I'm very new to microcontroller development and this is my first project with ST and their tools.

This is a very basic program that just triggers a GPIO. The rest is all generated code. As I have very little experience in this field I hope somebody can point to a location where I can look. I suspect that it might be a configuration issue.

Here is the code (I removed all generated comments to keep it a bit more compact):

int main(void)
{
  HAL_Init();

  SystemClock_Config();

  MX_GPIO_Init();

  HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_2); //my code 1
  HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_2); //my code 2

  while (1)
  {
      HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_2);
      HAL_Delay(1000);
  }
}

When I step through the code It will trigger the GPIO on "my code 1" once I step to "my code 2" it will cause the issue. I have even tried just running a fully generated program with no modifications and the issue persists. This was a quick test to see if the program actually does run on the mcu. And it does, as well as trigger the GPIO.

Debugger console Output:

Temporary breakpoint 1, main () at ../Core/Src/main.c:74
74        HAL_Init();

Program received signal SIGTRAP, Trace/breakpoint trap.
0x1fffecec in ?? ()

The Temporary breakpoint is where the program starts, I can then either run from there. Or step through, all with the same result.

Console Output:

Waiting for debugger connection...
Debugger connected
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.4.0                  
      -------------------------------------------------------------------

ST-LINK SN  : 34FF6E065250343816210143
ST-LINK FW  : V2J36S7
Voltage     : 3.22V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x440
Device name : STM32F05x/F030x8
Flash size  : 64 KBytes
Device type : MCU
Device CPU  : Cortex-M0



Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_PEkdAh.srec
  File          : ST-LINK_GDB_server_PEkdAh.srec
  Size          : 4944 Bytes
  Address       : 0x08000000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:00.627

Verifying ...

Download verified successfully 

Full Error:

Break at address "0x1fffecec" with no debug information available, or outside of program code.

Here is two images that might help. As I mention I'm very new to this. So any other information required please ask. Thanks in advance.

Debug View Disassembly

Oomph answered 2/3, 2020 at 16:27 Comment(0)
B
7

The code is placed at 0x08000000. There is no user code at 0x1fffecec. It system area and probably it boots the system bootloader. It shows that the BOOTx pin is incorrectly connected.

Backswept answered 2/3, 2020 at 17:37 Comment(4)
You are absolutely correct. BOOT0 was tied high, and "System Memory" was selected, I tied BOOT0 to ground and selected "Main Flash Memory". This sorted the problem.Oomph
How I can select Main Flash Memory? I'm new to stm32 and I didn't find any information about it.Ectomorph
Came here having the same problem with STM32CubeIDE and black pill STM32F103C8T6... check your boot pins B0 and B1. Had to make my B0 and B1 both low to solve the issue. Thanks!Grotesquery
wish it gave a clue in the toolDoud

© 2022 - 2024 — McMap. All rights reserved.