I'm having trouble getting my MCU to understand the pre-compiled code I flash onto it. Im using the STM32F2xx standard peripheral libraries which comes with some example projects as well as a template for creating your own projects. I'm using a MINGW GCC compiler. Running in the 'cmd' screen (windows 7). I manage to compile my test-project, though I had to move certain library files around to make it work.
I suspect that there is a issue with the 'startup_stm32f2xx.s' file which is supposed to configure clock settings for the microcontroller.
From main.c of standard peripheral template:
int main(void) {/*!< At this stage the microcontroller clock setting is already configured,this is done through SystemInit() function which is called from startupfile (startup_stm32f2xx.s) before to branch to application main.To reconfigure the default setting of SystemInit() function, refer tosystem_stm32f2xx.c file */...
How would I go about linking the start-up file to my project? I have one which is supposed to work with gcc. It says "gcc_ride7" in the file directory, but I can't seem to find a line of code linking it to the project.
There might also be a issue with the way I compile my code. I compile writing "gcc main.c" which produces a .exe executable file. DFUSE allowes me to convert this into a .dfu file. When I attempt to flash this onto the board, after erasing the board, the loading-bar finishes in half a second. When I reconnect the board, leaving bootloader-mode, the uploaded code has no effect on the board.
I highly doubt my code is faulty as it is strictly based on one of the example projects designed for the STM32F2xx MCU.
Does anyone have suggestions on things I could try out?