Hello, I'm trying to creating my first application using the MDK-ARM toolchain. I run one of the example files on this soft to blink a led using stm32f4xx_discovery and everything was ok but when I want to create a new project I get this error:
Build target 'Target 1' compiling main.c... main.c(5): warning: #1-D: last line of file ends without a newline linking... proba.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f4xx.o). Target not created
I don't get this error.
does anybody know what the problem is? thanks in advance :)
That is not a definition of "SystemInit" - that is a reference to "SystemInit".
As the error message tells you, you need a definition of "SystemInit" for that reference to work!
Sorry, I'm still a big newbie. Where can I find a definition of "SystemInit"?
If the sample program you looked at referenced a SystemInit without getting a linking error, then that sample program did include a source file or a library - or a project flag that implied that the linker should include a default library - that contained the actual implementation of a SystemInit function.
As Per says, if the working project contains that same reference to "SystemInit", and doesn't produce the same Linker error, then it must contain a definition of "SystemInit" somewhere - mustn't it?!
So, as I said originally, search in the working project to find where it defines "SystemInit" - and do likewise in your own!
Note that uVision has a 'Go To Definition' feature...
Hello, I'm trying to creating my first application using the MDK-ARM toolchain. I run one of the example files on this soft to blink a led using stm32f4xx_discovery ...
You're probably using the Blinky application.
Have you included the file system_stm32f4xx.c in our new project? Ah, look, there's SystemInit.