Hi everyone and @Pascal Weller,
I have managed to get the LED blinking.
These are the things I had to modify:
- Select: ProjectManager\Project\Toolchain\IDE = STM32CubeIDE
- Select: Pinout&Configuration\SystemCore\NVIC\CodeGeneration\TimeBase:SystemTickTimer -> TICK ON "Generate IRQ handler"
- Before launching the build of the Simulink model (Ctrl+B), create a separate folder, and go there (make it your working directory within Matlab)
- Now, go to Simulink, and build (Ctrl+B)
- This will prevent files getting mixed-up
- If the build is successful, within the folder in which the .slx model is, a .project file will be generated. This is the project to be opened in STM32CubeIDE
- Within the project tree (on the left hand side), navigate to the sub-folder of the project called like the simulink .slx model (it should contain a "Inc" and "Src" sub-folders)
- Right click -> Properties -> C\C++ build -> Un-tick the option "exclude resource from build"
- Connect the board
- Within the project tree, go to the top level, right-click and "Debug-as"
- This will generate the "Debug" folder, and within it, the .bin\.elf files
Hope it helps