2024-12-06 07:20 AM
Hi guys
My software compiles fine. But if I try to run or debug it, it ends up with this message:
Break at address "0xf3af4804" with no debug information available, or outside of program code.
The console output is this:
STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.17.0
-------------------------------------------------------------------
Log output file: C:\Users\Oli\AppData\Local\Temp\STM32CubeProgrammer_a32392.log
ST-LINK SN : 48FF6B064886575306321587
ST-LINK FW : V2J45S7
Board : --
Voltage : 3.34V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x438
Revision ID : Rev Z
Device name : STM32F303x4-x6-x8/F328xx/F334xx
Flash size : 64 KBytes
Device type : MCU
Device CPU : Cortex-M4
BL Version : 0x50
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a32392.srec
File : ST-LINK_GDB_server_a32392.srec
Size : 96.00 B
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:00.101
Verifying ...
Download verified successfully
Shutting down...
Exit.
Does anyone have an idea how to solve this? I'm just out of any ideas.
2024-12-06 07:35 AM
Ok, I do not know what went wrong, but I could solve it with that way:
The project was generated from CubeMX. I just savecopied my source code and header files, and deleted everthing except the .ioc file from CubeMX.
After this, I just let CubeMX generate the project again. Pasting the source code and header files again and it works now fine again.
It is the big hammer method, but it is fast if you do not need to set up much extra stuff.
2024-12-06 09:01 AM
It just means the processor faulted at some address outside the scope of your source code.
Say it popped the bytes from an ASCII string in the PC or LR registers, ie 0x454E4E36. Or you're executing in ROM, ie 0x1FFFxxxx
Debug it, look critically at the code it has to execute, starting from Reset_Handler, perhaps disassemble and disect the code if necesary. Turn off "Run to main()" and step your way there from the code that executes first.
Inspect the Stack, try to unpick the call tree.