I am working with an STM32F4 board that is running an embedded program. I would like to be able to send some data back and forth between a MATLAB script and the STM32F4. The MATLAB script is running a program that controls some lab equipment.
Due to the STM32F4 being compatible with Embedded Coder, all of my search results are littered with that. I also attempted to use the COM port functionalities that MATLAB has, but the STM32f4 has a complicated way to make it visible as a COM port using Virtual COM. The codes that were available online by STM for this purpose kept bringing up file missing errors. And these files were not available in the package I had downloaded.
All I want to do is, while the STM32F4 board is running, to send and receive some data. Similarly, to how this is easily doable with an Arduino.
My program:
MATLAB Script:
In a specific mode I will want to control the STM32F4. The MATLAB script will trigger the STM32F4 to change state, then the STM32F4 should communicate back stating that it has switched its state, then the MATLAB script will be able to record a number of signals (the MATLAB script controls all these other pieces of equipment). I want to be able to keep doing this until we have iterate through all the STM32F4's states.
So I want to be able to send small data packets back and forth from the STM32F4 to my MATLAB script.
Can someone please provide me with a comprehensive tutorial on how this can be done without using embedded coder or simulink? I want to be able to do this directly using a MATLAB script, and the C code on the STM32F4 which is programmed separately.