2019-10-31 04:24 AM
Hi everyone,
I'm trying the get the following setup working for a F767 nucleo board:
Matlab/Simulink R2019b
STM32MAT/Target v5.1.0
STM32CubeMX v5.4.0
SW4STM32
(All latest versions)
I've set up the model settings in Simulink to use the STM32.TLC, and pointed Simulink to the directory that contains Cube.
I've created the .IOC, and generated the project code, which opens nicely in SW4STM32
Building via simulink (simple model of GPIO in and GPIO out to turn LED on and off), seems to work, but leaves the folder structure below:
The project builds without error in SW4STM32, but resulting .ELF has no mention of the simulink generated code anywhere in it, and so does nothing when downloaded to the Nucleo board:
It seems to me that although the STM32-MAT/Target is creating code, Cube just ignores it when doing its thing.
Does anyone have any ideas please?
2019-10-31 05:22 AM
SOLVED!
So, a little more figuring out leads me to this, which I'll leave here for anyone else that might come across it.
It seems that when Cube builds the project code, it defaults to not including the generated files in the build process in SW4STM32. The following shows how to make it included.
NOTE: only the Cube generated files need including, not the Simulink generated files. In the below picture you can see two folders, "767_Test_06a" and "767_Test_06a_STM32". The "_stm32" is the Simulink generated files, and can be left as NOT included in the build.
2019-11-25 05:09 AM
Thank you so much :D, omg you saved my day !
File with ..... "_stm32" -> right klick -> Properties -> C/C++ Build -> [X] Exclude resource from build
FIle without "_stm32" -> right klick -> Properties -> C/C++ Build -> [..] Exclude resource from build