Hello,
I got difficulties with the Keil µVision 4 IDE. I'm using the ST Discovery-Board (STM32F407VG) and want to use the Discovery-Board as an I2C-Master. I got a working CooCox-project, but now I have to migrate it to Keil µVision 4.
When I create a new project (in µVision 4) I'm able to communicate with the board (I did some blinky-programs successfully). Problem seems to be the correct usage of libraries/ errors from the linker.
My working CooCox-project is derived from this example: ").
This project has main.c/.h and stm32_ub_i2c1.c/.h with I2C-functions. Other embedded code in the CooCox-project: stm32f4xx.c/.h stm32f4xx_gpio.c/.h stm32f4xx_rcc.c/.h stm32f4xx_i2c.c/.h
Thank you for your help.
Best Regards, Ilyas
I now got a working connection with µVision 4 to the Discovery Board. You have to select the ST-Link Debugger in the "Debug"-Tab of the project-settings. But with just this (as I tried it) is not the whole story. Additional you have to configure the ST-Link Debugger to use "SW" as port instead of JTAG and then select the ARM CoreSight device. Note that you have your Discovery-Board plugged in, otherwise it won't display the ARM CoreSight device.
At the moment, I got a working connection to the board and an example project (Template project). Now I have to transform the code from the CooCox-project to µVision 4. What do I have to consider? I'll report back in about 2 hours, I didn't had the opportunity to move the CooCox project till now.
Greetings, Ilyas
Hi there,
sorry that I am late with my answer, but something in life didn't go as intended. So now I added the code from the CooCox-project into the µVvision 4 project and tried to compile. I was quite happy that all libraries seem to fit. I got a connection to the board, so I can transmit the code. But When starting debugging, it doesn't start code execution.
The LED of the ST-Link blinks red, green, red, etc... when I hit start debugging and keeps blinking. (If everything is fine, the LED blinks for some seconds and stays green then.) Is that a sign of a problem within the start-up of the CPU and how can I solve the issue?
solution to the startup problem was to remove the startup-function of the CooCox IDE (which was still in the code) and replace it with the startup procedure of the example-project for the MDK-ARM IDE.
So now the program runs with KEIL µVision 4. :-)
Thanks to all of you for your contribution. If you want a ZIP-folder of the project, please let me know.