2019-09-16 03:13 AM
I have installed STM32-MAT/TARGET , generated configuration with CubeMx, made simulink model, generated c code for keil, and compiled with out errors but the port is not toggling. I have been trying for last two weeks to get it work. I have attached cubemx file and simulink model with this message, kindly someone help me
Matlab2019a
STMcubeMx 5.3
I have tried with the simpleGPIO example supplied also, but that too didn't worked, is there any compatibility issue between the cubeMX and Matlab2019 version?
The examples supplied are made with earlier version of cubeMX and Matlab
Solved! Go to Solution.
2019-09-24 01:22 AM
Hi @vlal ,
Did you also cleanup slprj folder from where your started the Simulink build?
Did you check in the generated folders if Stm32F103C8_stm32/stm32xxxx_it.c is present?
1/ Before launching Simulink Build, set the current working directory as follows:
>> cd 'C:\MATLAB\STM32-MAT'
2/ May you empty the folder of Simulink project, must remain slx and ioc files.
In this way, you will avoid mixing the elements generated by Simulink and the source files generated at the end by STM32CubeMX.
3/ Restart the Simulink build, check main.c and st32f1xx_it.c.
You can also follow the documentation: STM32\STM32_MAT-TARGET_HandsOn.pdf
I cannot bring more. Hoping you will succeed by your side.
Regards
Cyril
2019-09-24 07:04 AM
Each time, I delete all contents in the project folder, leaving only ioc and slx.
Last time I set the current working directory as 'C:\MATLAB\STM32-MAT'
"stm32f1xx_it.c" is present in Src folder not in "Stm32F103C8_stm32" folder(Stm32F103C8_stm32/stm32xxxx_it.c not present )
I followed the documentation on: STM32\STM32_MAT-TARGET_HandsOn.pdf
2019-09-24 07:07 AM
2019-09-24 07:35 AM
Hi @vlal ,
Your main.c is not correct, stm32xxxx_it.c is missing.
It seems as if STM32\script\customRoutineProcess.tlc is not the correct one.
This file was strongly changed with the 5.1.0 version of STM32-MAT/TARGET (to fit with STM32CubeMX V5.1.0 and later).
Regards.
Cyril
2019-09-25 11:46 AM
Yes that solved the problem
I removed the CubeMX installation and installed again, now all are working
Thanks for the help in achieving the results Cyril sir