cancel
Showing results for 
Search instead for 
Did you mean: 

Keil MDK and ST32cubeMX not interacting

CSuyd
Associate II

I've only been able to load demo code on the STM, not anything original. Here's why:

Pc is Windows 10 64bit 

Error #545: Required gpdsc file "C:\Users\Emiko Suydam\Documents\MDK\Boards\ST\STM32F030-Discovery\Keil_test_project_1\RTE\Device\STM32F030R8Tx\FrameworkCubeMX.gpdsc" is missing.

This error was generated by Keil while creating new project there, under Manage Run Time Environment, and selecting Buttons and LED. Keil expecting STM32cubeMX to generate this Framework file, but apparently it hasn't. 

Clicking Generate Code on a new project in STM32cubeMX locks up GUI, GUI can only be closed by ending the java service which is "Suspended". Both 32bit and 64bit JRE versions installed.

3 REPLIES 3
Pavel A.
Evangelist III

Does the standalone CubeMX work (that's, does it open and let you generate some Keil project)?

I've had this issue too, could not get the Keil's CubeMX "add-on" or whatever it is called, work. So just using the standalone application. Which brings all stuff from its own repository instead of Keil's packages :(

-- pa

CSuyd
Associate II

Thanks, interesting. What then do you use to flash the STM32? Also, to answer your question, Clicking Generate Code on a new project in STM32cubeMX was locking up GUI, GUI could only be closed by ending the java service which is "Suspended". Both 32bit and 64bit JRE versions installed.

I spent a lot of time yesterday re-installing both apps and carefully selecting software packages in Keil, and I may have fixed that issue, but I have definitely seen the error #[545 again.]​ 

In the meantime I am brushing up on c again, it's been a while.

VGold
Associate II

Hi! Better way is to use CubeMX standalone.

You need to:

-Create new project

-Select timing source - i.e. crystal or internal

-IMPORTANT! Select in SYS what debug wiring are you using, because if nothing selected you will not be able to debug and flash in realtime, only flash under reset.

I.e. i'm using serial wire (2 pins used + power + ground) with st-link, very nice working

-Setup project settings: folder, name, copy only necessary files, MDK-ARM v5

-Generate the project and select «Open Project» button in message box appeared after generation

-Build this project without modifying it, keil will scan files while building to have debug information/func definitions and other info

-Write the code

-IMPORTANT! Select in KEIL menu FLASH->Configure flash tools->Debug tab select «use ST-Link debugger» click «settings» button go to «trace» tab and change CoreClock to you system clock (72Mhz for 103c8t6 in my case) go to «Flash download» tab and activate RESET AND RUN check box.

-Close menu windows, push F7, wait, if no errors and st-link with target is connected to USB port push F8 button, wait

-You can start debug now

-Peripherals menu you can see registers of TIM, ADC, DAC, CAN, UARTs and all other hardware in «realtime»

And keep in mind that generated code is only PREPARED. To RUN selected in cube you must write after initialization functions something like HAL_(MODULE NAME)_START_(WORKING METHOD) i.e. HAL_ADC_START_DMA or HAL_TIM_PWM_START_IT and so on.