2015-05-18 12:42 AM
Hi,all!Rencently ,I transformed my program from stm32f1 tostm32f4 using iar embedded workbench
.I met a problem
,
The debug log showed that
:program exit reached.The main function reached the end of the code but interrupt was still working.Can someone help me solve this problem?Thank you!
#stm32-iar-program-exit-reached2015-05-18 01:45 AM
The main function is not supposed to reach its end, you should have a ''forever loop'' inside it. In any case, we need to see your code to help you. Or just try to simplify your program until it works then you can localize the problem.
2015-05-18 04:15 AM
2015-05-18 06:07 AM
You can't return from main(), and you can't exit()/abort(), ponder where these go.
If you are breaking/corrupting the stack make sure it's big enough for your local/auto variable requirements.2015-05-21 09:42 PM
Thank you!The problem had been solved.The error appears when I using iar of version 7.4,but everything goes well with version 6.30.Thank you,all!