Forum: System Workbench for STM32

STM32CubeMX and SW4stm32

Hi all,
I created project using STM32CubeMX, choosing sw4stm32 as toolchain and uncheck “Generate Under Root”. Then I imported it to sw4stm32 and built success.
But when i copy files: “stm32f4_discovery.h” to ‘Inc’ directory; and “stm32f4_discovery.c” to ‘Src’ directory. And add #include “stm32f4_discovery.h” to main.c file. Then when built, errors example:”undefined reference to `BSP_LED_Init’’
Help, thanks

You have to connect the coresponding pin in CubeMX to BSP_LED.

Harry

Thank Harry
But I using “stm32f4_discovery.h” and “stm32f4_discovery.c” after created project.
“undefined reference to `BSP_LED_Init’’ because “stm32f4_discovery.c” not built. But Why ?