Skip to main content
Associate
August 19, 2026
Question

Debugging hangs at 0x404100 on AEK-MCU-C4MINI1 using SPC5LNK

  • August 19, 2026
  • 6 replies
  • 72 views

Hello everyone,

I am experiencing a persistent debugging issue using AutoDevKit Studio. The debugger connects successfully to the target, but the application never reaches the main() function, immediately hanging at an exception handler.

Here are the details of my setup and the issue:

1. Part Number

  • Target Board: AEK-MCU-C4MINI1

  • Debugger: AEK-MCU-SPC5LNK

 

2. Environment

  • IDE: AutoDevKit Studio (Eclipse-based) on Windows 11.

  • Toolchain/Debugger: GDB OpenOCD Debugging (OpenOCD 0.12.0+dev).

 

3. Schematics Standard ST evaluation board (no custom schematics).

 

4. Details 

When I launch a debug session, OpenOCD connects successfully, halts the target, and identifies the chip. However, the execution is stuck with the following error: Break at address “0x404100 with no debug information available, or outside of program code.

I am fully aware that the "Source not found" window shown by the IDE is simply a consequence of the core hanging at this specific exception handler address (which naturally lacks source code), rather than a misconfigured source path.

The main anomaly I noticed is a Flash Loading Failure accompanied by GDB packet warnings. In the OpenOCD console, right after reading the flash banks, I get the following warnings: Warn : negative reply, retrying Warn : acknowledgment received, but no packet pending Consequently, the Debugger Console (GDB) only shows the initial GNU GDB welcome message. It appears that due to this communication protocol drop, AutoDevKit is not actually sending/loading the .elf file into the flash memory, despite the debugger connecting properly.

Open On-Chip Debugger 0.12.0+dev-00318-g0e98d766e (2023-05-17-15:52)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter srst pulse_width: 100
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 4000 kHz
Info : JTAG tap: spc58xc.tap tap/device found: 0x01142041 (mfg: 0x020 (STMicroelectronics), part: 0x1142, ver: 0x0)
Info : 0x01142041
mfg: 0x020 (STMicroelectronics),
device: 0x01 - SPC584C / SPC58EC - (Chorus4M),
application: 2,
technology: 40nm,
design: 0,
cut: 2.0
Info : starting gdb server for spc58xc.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : OnCE IDCODE = 0x07c2701d
target halted
Info : Target status: halted - PC: 0xf7fb8004
Info : accepting 'gdb' connection on tcp/3333
Info : JTAG tap: spc58xc.tap tap/device found: 0x01142041 (mfg: 0x020 (STMicroelectronics), part: 0x1142, ver: 0x0)
Info : 0x01142041
mfg: 0x020 (STMicroelectronics),
device: 0x01 - SPC584C / SPC58EC - (Chorus4M),
application: 2,
technology: 40nm,
design: 0,
cut: 2.0
Info : OnCE IDCODE = 0x07c2701d
Disable Software Watchdog Timer
Cache invalidate
Init regs
initialize work area from 0x400A8000 to 0x400A8FFF
Clearing memory [0x400A8000-0x400A8FFF]
initialize RAM from 0x400A9000 to 0x400C7FFF
setup IVOPR points
Disable Software Watchdog Timer
Cache invalidate
Init regs
initialize work area from 0x400A8000 to 0x400A8FFF
Clearing memory [0x400A8000-0x400A8FFF]
initialize RAM from 0x400A9000 to 0x400C7FFF
setup IVOPR points
Info : flash: 4096 kbytes @ 0x00fc0000
Info : flash: 144 kbytes @ 0x0060c000
Info : flash: 32 kbytes @ 0x00680000
Info : flash: 32 kbytes @ 0x00800000
Warn : negative reply, retrying
Warn : acknowledgment received, but no packet pending
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Info : JTAG tap: spc58xc.tap tap/device found: 0x01142041 (mfg: 0x020 (STMicroelectronics), part: 0x1142, ver: 0x0)
Info : 0x01142041
mfg: 0x020 (STMicroelectronics),
device: 0x01 - SPC584C / SPC58EC - (Chorus4M),
application: 2,
technology: 40nm,
design: 0,
cut: 2.0
Info : OnCE IDCODE = 0x07c2701d
Disable Software Watchdog Timer
Cache invalidate
Init regs
initialize work area from 0x400A8000 to 0x400A8FFF
Clearing memory [0x400A8000-0x400A8FFF]
initialize RAM from 0x400A9000 to 0x400C7FFF
setup IVOPR points
force hard breakpoints
Info : JTAG tap: spc58xc.tap tap/device found: 0x01142041 (mfg: 0x020 (STMicroelectronics), part: 0x1142, ver: 0x0)
Info : 0x01142041
mfg: 0x020 (STMicroelectronics),
device: 0x01 - SPC584C / SPC58EC - (Chorus4M),
application: 2,
technology: 40nm,
design: 0,
cut: 2.0
Info : OnCE IDCODE = 0x07c2701d

 

 

5. Expected behavior 

The IDE should load the newly compiled .elf firmware into the microcontroller's flash memory, and the debugger should halt correctly at the main() function, allowing me to step through the code.

 

6. How to reproduce

  1. Connect the AEK-MCU-C4MINI1 to the PC using the AEK-MCU-SPC5LNK debugger.

  2. Create or import a standard SPC5 Application Component project in AutoDevKit Studio.

  3. Build the project.

  4. Launch the GDB OpenOCD Debugging configuration.

  5. The debug session starts but hangs immediately at 0x404100.

Debug configuration: 

 

 

SVD path: C:\AutoDevKitStudio-2.8.1\openocd\svd\spc58\SPC58ECx.svd

 

7. Occurrence Systematic (happens 100% of the time).

 

8. Sanity checks 

I have already performed the following troubleshooting steps to rule out basic configuration errors:

  • Executable Linked: Confirmed that the correct out.elf file is explicitly selected in the Debug Configuration -> Main tab.

  • Startup Configuration: Confirmed that Load excecutable and Load symbols are checked in the Startup tab.

  • Target Config: Ensured the OpenOCD config points to board\spc58ec_dis.cfg to match the detected IDCODE.

  • Hardware checks: Verified all jumpers on the C4MINI1 (JP4, JP5, JP6, JP7, JP10, JP11, JP12, JP13 are properly closed).

  • Breakpoints: Cleared all manual breakpoints in the IDE.

Could anyone explain why AutoDevKit Studio/GDB is dropping the connection with OpenOCD (negative reply, retrying), failing to load the executable into the board, and hanging at this address?

Thank you in advance for your support.

6 replies

SRomeo
ST Employee
August 20, 2026

Hello,
As far as I see your debugging configuration is correct.

But it seems the second half of the “Debugger” section has been forgotten. Check if also that part is correct:

You should point to the following executable:
C:\AutoDevKitStudio-2.8.1\eclipse\plugins\com.st.tools.spc5.tools.gnu.gcc.ppcvle.win32_4.9.4.20200908161514\toolchain\bin\ppc-freevle-eabi-gdb.exe

 

Please Note that AutoDevKit is for Windows only. We cannot guarantee support on MAC “Emulated Windows environments”.

In case either this doesn’t solve your issue, then the problem may be a damaged USB cable, or, your USB port rights.
If the latter is the case, please contact your System administrator.

Best regards,
Simone
AEK_Team

Associate
August 20, 2026

Hello Simone,

Thank you for your reply and the helpful suggestions.

1. Debugger Configuration I checked my configuration and it seems to match your instructions. The only difference is the plugin timestamp in the folder name (my AutoDevKit installation has a more recent version: 20264220512 instead of 20200908161514), but it correctly points to the ppc-freevle-eabi-gdb.exe file. I also kept the set mem inaccessible-by-default off command as you suggested.
 

 

2. Environment & Hardware Checks

Just to give you more context, I am running natively on Windows 11 (no MAC/emulated environments). Furthermore, the Windows Device Manager correctly identifies all the ST evaluation board interfaces without any warning triangles.

To check if the hardware was okay, I tried communicating with the board directly using AutoDevKit's External Tools (OpenOCD). The board responded perfectly to the connection without any drops. Because of this, I would probably exclude a damaged USB cable or USB port rights issues.

3. Ongoing Issue and Next Steps

However, when I launch the standard debug session, the behavior remains exactly the same: it still hangs at 0x404100.

At this point, I honestly don't know what else to verify. I have carefully followed the official documentation and the step-by-step guides for the setup, but I am still stuck with this exact same error. I also still see those warnings in the OpenOCD console (Warn : negative reply, retrying and Warn : acknowledgment received, but no packet pending). I would appreciate any further advice or troubleshooting steps you could recommend to resolve this issue.
Thank you again for your help.

SRomeo
ST Employee
August 20, 2026

Hi,
I also have a 2026 installation.

But the “com.st.tool.spc5.tools.gnu.gcc.ppcvle.win32” folder to use is the following:
com.st.tools.spc5.tools.gnu.gcc.ppcvle.win32_4.9.4.20200908161514

 



give it a try

Simone

Associate
August 20, 2026

Hi Simone,

I checked my plugins directory, but I do not have the 20200908161514 folder. Since I did a fresh installation of the program recently, my environment only contains the 202604220512 folder. However, I noticed from your screenshot that the only real difference is just the folder name: the rest of the path, the executable name (ppc-freevle-eabi-gdb.exe), and its exact size in KB are completely identical (38431 KB).

My deduction is that they are actually the exact same file. I might be wrong, but I guess it should still work correctly regardless of the folder version. Nevertheless, even with this setup, I keep getting the exact same 0x404100 error.

C:\AutoDevKitStudio-2.8.1\eclipse\plugins\com.st.tools.spc5.tools.gnu.gcc.ppcvle.win32_4.9.4.202604220512\toolchain\bin

 

 

Associate
August 22, 2026

Hi Simone,

Just a quick update: I managed to find the version you mentioned by installing an older release alongside my current 2026 setup, just to get that exact 20200908161514 folder.

I tested the debugger using that specific executable, but unfortunately, nothing changed. I am still getting the exact same 0x404100 error.

Please let me know what else we can investigate at this point.

Thanks again!

 

SRomeo
ST Employee
August 26, 2026

It seems the communication is ok, but, somehow, PC is not reaching your application entry point. It seems to get stuck at that address.
I tried to reproduce your condition but I had no success so far.

Your procedure should be

  1. Connect the AEK-MCU-C4MINI1 to the PC using the AEK-MCU-SPC5LNK debugger.

  2. Import a C4MINI project from:

     

  3. Click on the project from the Project explorer on the left and click on the Compile button:

     

  4. Launch the OpenOCD Debugging configuration clicking the little bug on the top right corner, and then on the top bar:

  5. Configure the configurator as you already did
  6. Check your C4MINI jumpers and Switch ON the board (both switches)
  7. Click on debug
  8. After a while, check if main is visible and the code debuggable.