简体   繁体   English

STM32CubeIDE 在没有调试信息或程序代码之外的地址“xxx”处中断

[英]STM32CubeIDE Break at address "xxx" with no debug information available, or outside of program code

I'm busy bring up some new hardware with a STM32F030C8 mcu.我正忙着用 STM32F030C8 单片机开发一些新硬件。 I'm using the STM32CubeIDE with gcc.我正在使用带有 gcc 的 STM32CubeIDE。 I'm very new to microcontroller development and this is my first project with ST and their tools.我对微控制器开发非常陌生,这是我使用 ST 及其工具的第一个项目。

This is a very basic program that just triggers a GPIO.这是一个非常基本的程序,它只触发一个 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.当我单步执行代码时,一旦我进入“我的代码 2”,它将触发“我的代码 1”上的 GPIO,这将导致问题。 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.这是一个快速测试,看看程序是否确实在 mcu 上运行。 And it does, as well as trigger the GPIO.它确实会触发 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调试视图反汇编

The code is placed at 0x08000000.代码位于 0x08000000。 There is no user code at 0x1fffecec. 0x1ffcec 处没有用户代码。 It system area and probably it boots the system bootloader.它是系统区域,可能会引导系统引导加载程序。 It shows that the BOOTx pin is incorrectly connected.它表明 BOOTx 引脚连接不正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM