cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX and Keil MDK5 - not compatible at all??

arivas
Associate
Posted on April 16, 2015 at 13:25

Dear all,

I have many problems using STM32CubeMX and Keil MDK5. I'm trying to start defining all the peripherals with the STM32Cube (is intended for this), then I run code generation for Keil MDK5 and finally I open the project... all ok at this point..

BUT!!!...

When I'm trying to use any RTE of Keil like Network, Filesystem, etc.. Keil need to load also the Device drivers to resolve any dependencies and Keil add to the project the HAL driver and a configuration file called ''RTE_Devices.h''. At this point I have two problems:

1- The device drivers are duplicated, STM32Cube generated a group called ''Drivers/STM32....'' with all the xxx_hal.c drivers and also Keil generated a new component class called ''Device'' with the same xxx_hal.c drivers (but older version of course)

2- I have to edit the file ''RTE_Devices.h'' to enable and configure all the peripherals and pinout... it have no sense, I've done it with STM32Cube!!!!!

Can't understand how to use STM32Cube and Keil MDK5 togehter, only want to configure all the peripherals witn STM32Cube and then use Keil with the Filesystem, Network, RTOS...

Thanks

PD. I'm using this for STM32F407VG

#stm32cubemx #keil #stm32cube
3 REPLIES 3
bobdeschambault9
Associate II
Posted on May 08, 2015 at 22:25

I think that you will have to decide which code to use.  We came against the same problem and decided for now 

not

 to use the Keil software components.  However, it looks like ST and Keil are working hard to stay in sync as best as possible, the latest Keil software components use v1.5.0 of the cube.  It is unfortunate that all the ST generated code from the CubeMX can't directly be used in Keil without some massage.

candidocudeiro
Associate II
Posted on May 10, 2015 at 15:03

I've also been receiving a bunch of errors compiling code for my STM32F407VG. A month later, I found the solution:

It seems that there is a bit of a mess by STM, in my opinion, since they do not provide a compiler tool nor a clear guide to configure it.

But it seems also that the problem was a Keil pack for STM32f4 update that makes the code generated by the latest version of STM32CubeMX not supported by the compiler.

Here is a note by keil where they explain it:

http://www.keil.com/appnotes/files/apnt_266.pdf

In the note you can find the correct packages and how to configure the compiler.

At least Keil has uploaded an explanation, but it looks like if STM staff just don't care if things stop working.

I expect more synchronization in the future between both Keil and STM because automatically exporting designed models from design software as simulink is such an interesting tool.

Best regards.

stm32cube-t
Senior III
Posted on May 13, 2015 at 09:14

Hello,

STM32CubeMX project generation works correctly if you do not use Keil-made ''STM32 Device family packs'' since CubeMX provides already for the necessary Cube drivers.

However, we are working on a solution that will allow MDK-ARM to detect peripheral drivers and initialization code are already provided by CubeMX.

Best regards