cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE Debugger Termination (Exit Value 0) and .elf File Permission Denied

SalaiSanjayS
Associate II

1. Environment Details

  • Board: NUCLEO-F446RE (Cortex-M4)

  • IDE: STM32CubeIDE Version 2.0.0

  • Debugger: Integrated ST-LINK/V2-1

  • Firmware Version: V2J46M33

  • OS: Windows (Process path: C:\Users\salai\...)

2. Problem Description

I am encountering a persistent debugger crash where the session terminates immediately after launch. Additionally, I am unable to rebuild the project due to a file lock on the .elf binary.

Symptom A: Debugger Disconnection Upon clicking the "Debug" button, the console shows the GDB server starting, but it immediately terminates with: arm-none-eabi-gdb <terminated, exit value: 0> ST-LINK (ST-LINK GDB server) <terminated, exit value: 0>

Symptom B: Build Error When attempting a "Clean" or "Build," the console reports: rm: can't remove '1_SYSTICK_TIMER.elf': Permission denied make: [makefile:79: clean] Error 1 (ignored)

Symptom C: No Source Available After a full chip erase, the debugger points to 0xfffffffe with the message: No source available for "<signal handler called>() at 0xfffffffe"

3. Steps Taken to Resolve

  • Updated ST-LINK firmware to the latest version.

  • Attempted "Connect Under Reset" in the Debug Configuration settings.

  • Performed a "Full Chip Erase" using STM32CubeProgrammer.

  • Disabled "Parallel Build" to avoid race conditions during the make process.

  • Verified hardware jumpers are in the default positions.

    Current Issues:

    • Debugger: Terminates instantly upon launch.

    • Build: Receiving Permission denied errors for the .elf file during Clean/Build.

    • Recovery: After a full chip erase, the debugger points to 0xfffffffe.

    What I need help with:

    1. How can I reset all my Debug/Run configurations to the default state?

    2. Why is my GDB server shutting down immediately after a successful verify?

    3. How do I break the "Permission Denied" lock on my build files?

12 REPLIES 12

@SalaiSanjayS wrote:

I'm saying that I don't even have those files and don't know where to get it,
as I have never used HAL, I asked for a bare-metal code or a code with CMSIS 
I don't want to use HAL, They asked me to use HAL, as they said They don't have code other then the HAL library.
Please read the above situation and I did mention I just started using STM32.

 


I didn't ask you to use HAL, I asked you to test your board using HAL. Your first question was the following:

2. Problem Description

I am encountering a persistent debugger crash where the session terminates immediately after launch. Additionally, I am unable to rebuild the project due to a file lock on the .elf binary.

Symptom A: Debugger Disconnection Upon clicking the "Debug" button, the console shows the GDB server starting, but it immediately terminates with: arm-none-eabi-gdb <terminated, exit value: 0> ST-LINK (ST-LINK GDB server) <terminated, exit value: 0>

Symptom B: Build Error When attempting a "Clean" or "Build," the console reports: rm: can't remove '1_SYSTICK_TIMER.elf': Permission denied make: [makefile:79: clean] Error 1 (ignored)

Symptom C: No Source Available After a full chip erase, the debugger points to 0xfffffffe with the message: No source available for "<signal handler called>() at 0xfffffffe"

Your original question has nothing to do with the BareMetal implementation .. 

So again test your board with the project I shared previously and confirm if your board is working!

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Okay, it doesn't sound like you want to cooperate with advice. I'm not asking you to use HAL. Good luck.

Using AI to create the question and arguing with results is very low effort. You may have to put in some amount of work to understand the issue.

If you feel a post has answered your question, please click "Accept as Solution".

I did came to a conclusion after confronting so many of my seniors and similar stm32f446re user and they said no one faced this issue and that I have some error based on wrongly configuring pa13/pa14 or I might have changed some settings in the in the debugger/run settings in compiler... I agree it has nothing to do with HAL... I don't know what are the files I have to include in  include and source folders from the project that the ST Employee sent me... I added all and it still shows error...  now I reinstalled STM32CUBEIDE and erased the board with STM32CubeProgrammer... and it's working good now without the terminated errors... I still don't know where the problem is... Thanks for the efforts and time.
and when I run the same code which caused me error...its working good now... I feel like the problem is with the settings in run/debug configurations... I'll try to debug or seek someone's help with the leads I found...
Have a great day!! @TDK @mƎALLEm 


and please add bare-metal code to the Github repo so that everyone can use the code and find if the pins are properly working