Simulink code generation doesn't work on the MCU. AND WHAT IS ERROR?
- February 20, 2021
- 1 reply
- 2062 views
Dear. All
Hi, everyone.
I am a hardware engineer.
I created a very simple logic to create mcu code through simulink, and I succeeded in creating code-build-download.
By the way, I'm trying to find out why it doesn't work because it doesn't work in the logic on the mcu.
Version : Matlab 2019a / STM32CubeIDE 1.5.1
My Test logic is below.
PC0 - GPIO INPUT set (active_low sw ON) -> PA8 - GPIO OUTPUT set (led on)
PC0 - GPIO INPUT set (active_low sw OFF) -> PA8 - GPIO OUTPUT set (led OFF)
Q1) Logic doesn't seem to generate code, is there any way to know?
Q2) When I call GPIO_WRITE from the simulation link, I get this error, what kind of error is it? I don't know if this error is affecting in simulink code generation.
Q3) Is it right to create a code in a simulink, run a ".project", build and download it to CUBEIDE? The file created by SIMULINK is "simulink_test1.c", but is it different from MAIN.C?
Q4) I want to check the variable value in CUBEIDE, but what is the reason why I can't check the value because of this error?
simulink Code Generation is my first time, so I don't know much about it, so please answer me.
