Skip to main content
Ofer
Associate III
May 4, 2026
Question

MCSDK: Build fails; says target device definition missing - but it *is* defined

  • May 4, 2026
  • 1 reply
  • 161 views

i created a project with the MCSDK for controlling my 3-phase motor,

i used it to create a new project with the ioc file with the cubemx, but got many compilation errors, i manage to solve lots of them but got 1 error i cant solve:

error: #error "Please select first the target STM32G0xx device used in your application (in stm32g0xx.h file)"

133 | #error "Please select first the target STM32G0xx device used in your application (in stm32g0xx.h file)"

 

but the macro STM32G031xx is defined on my PREPROCESSOR definitations.

 

There are lots of issues with the last third-part parties software lately (MCSDK and GFX as well), the projects are lucking some folders, like the include folder in which the main.h exist or the h files of the drivers and are not part of the project when doing searches

 

1 reply

Technical Moderator
May 4, 2026

Hello @Ofer 

Let me thank you for posting.

For more investigation, could you please provide your Ioc.File.

Thanks.

Mahmoud

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.
Ofer
OferAuthor
Associate III
May 5, 2026

sure, attached is the ioc file