cancel
Showing results for 
Search instead for 
Did you mean: 

error: undefined reference to 'main'

Khadratov
Associate

Hello!
I built a CubeMX project from Simulink after I connected an STM32 H753ZI hardware to my laptop.
It is giving me an error in "bl main" : 

C:/Users/detec/OneDrive/Documents/MATLAB/lastcon/STM32CubeIDE/Debug/../Application/User/Startup/startup_stm32h753zitx.s:100: undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

make: *** [makefil1e:65: lastcon.elf] Error

How to solve this matter?

1 REPLY 1
Andrew Neil
Evangelist III

@Khadratov wrote:

I built a CubeMX project from Simulink after I connected an STM32 H753ZI hardware to my laptop.
It is giving me an error in "bl main" : 


That doesn't really make sense.

What you show is a build error - so that has nothing to do with connecting the board to the laptop.

Please give a full description of exactly what steps you take to get to this position.

Remember that Simulink is an independent 3rd-party product - nothing to do with ST - so any issues with that need to be addressed to Mathworks.

 


@Khadratov wrote:

 

C:/Users/detec/OneDrive/Documents/MATLAB/lastcon/STM32CubeIDE/Debug/../Application/User/Startup/startup_stm32h753zitx.s:100: undefined reference to `main'


It's telling you that main is not defined - ie, you don't have a main() function in your project.