cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32Cube - Simulink - MikroC

broekerjens
Associate
Posted on October 01, 2015 at 13:22

Hello,

I'm new here and i've the problem that i don't know how to get the generated code from simulink and CubeMX to my Microcontroller.

My Setup:

I use mikroC Pro and an EasyMX Prov7 board with STM32V107VCT6

Now I got the order to setup Simulink, CubeMX to get the code to my microchip.

First steps were fine, i generate the code in my simulink model and after that i saw that i'm able to generate EWARM, MDK-ARM or TrueStudio but i need microC or just hex files to send it to the microcontroller. Is there any workaroung, because Keil, IAR, Atollic are to expensive .

I hope you can help me

#simulink-code-generate #stm32cubemx
1 REPLY 1
qwer.asdf
Senior
Posted on October 01, 2015 at 13:46

Hi, CubeMX currently can't generate project files for mikroC.

I never used mikroC, but it shouldn't be too difficult to import the generated source code into it. Create a new empty project in mikroC with correctly selected microcontroller then import the HAL library and CubeMX generated code and try to compile. There might be some definitions needed though in your mikroC project settings to correctly compile the project, like the USE_HAL_DRIVER definition.

The alternative is to use the free

http://www.openstm32.org/HomePage

(with integrated GCC compiler) as CubeMX can generate projects for that IDE (by selecting SW4STM32 in the Project Settings as the Toolchain/IDE in CubeMX).