Associate III
April 16, 2023
Solved
Some code is not compiled with STM32CubeIDE
- April 16, 2023
- 2 replies
- 1780 views
I am using STM32CubeIDE to develop a small project. But I do not know why some code if(Motor_PullBack_Enable == 1) {} statement is not compiled.
if(Motor_Extend_Enable == 1)
{
....
}
if(Motor_PullBack_Enable == 1)
{
...
}
if(SPI_Receive_Buffer[2] != 0)
{
}
Checked project.list file. there is no this if (){} statement.
if(Motor_Extend_Enable == 1)
8000632: 4b61 ldr r3, [pc, #388] ; (80007b8 <main+0x2e0>)
8000634: 781b ldrb r3, [r3, #0]
8000636: 2b01 cmp r3, #1
8000638: d136 bne.n 80006a8 <main+0x1d0>
{
}
// there is no if(Motor_PullBack_Enable == 1)
if(SPI_Receive_Buffer[2] != 0)
Please refer to attached source code. there is no compile error. Why not compile ?
Jiannong