cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to Generate Command line

Teyros
Associate II

Hi there,

I'm new to this community. I'm having an issue right now. Everything was working fine, until I made the mistake of going to Project -> Properties -> settings -> C/C++ Build -> Settings. Silly me hit "restore defaults"

Ever since that moment, when I hit the Hammer Icon to build, I get errors that say "Failed to Generate Command line. Reason: Unknown Target".

I"m assuming somehow I deleted the linker settings somehow? 


I also get these issues. 

Teyros_0-1701004655141.png

"Drivers/STM32G4xx_HAL_Driver/Src/subdir.mk:73: *** unable to generate command line. Stop."

Would really appreciate some help on how to fix this, thanks so much.

Regards,
Teyros

1 ACCEPTED SOLUTION

Accepted Solutions
Teyros
Associate II

OK So in the end, it appears I couldn't give the STM32cubeIDE a new target, it was greyed out. 
So I selected the option to create a new project with an existing ioc file. Then dragged and dropped all the src and inc files. Seems to work now when I select build.

Teyros_0-1701039625347.png

 

View solution in original post

4 REPLIES 4
Teyros
Associate II

Could really use some help guys/gals.

I created a new file, and it appears that the HAL drivers under Debug are deleting themselves. 

Teyros_0-1701038244198.png

 Also noticed I cant get the MCU and Board options to be available how do I get that to select the board?



Whenever I copy and paste the working new files Debug HAL drivers in, when I click build, then they get removed and that same error happens again

Teyros
Associate II

OK So in the end, it appears I couldn't give the STM32cubeIDE a new target, it was greyed out. 
So I selected the option to create a new project with an existing ioc file. Then dragged and dropped all the src and inc files. Seems to work now when I select build.

Teyros_0-1701039625347.png

 

Hello @Teyros ,

First let me thank you for posting and welcome to the ST Community.

You are not compiling certain source files that are under Drivers/STM32G4xx_HAL_Driver/Src. Maybe you have deleted a folder from this list.

Thanks.

Mahmoud.

 

 

 

 

Hi Mahmoud,

Thanks for the welcome. Yes in the end when I restored default, it removed the target from the settings. I was unable to modify and reset the target, but creating a new file and copying my .c and .h files seemed to be a good temporary solution. 

Hope you are well,

Regards,

Teyros