I am using lpc1317, cortex M3.
I have seen main has return type of int. But main don't return anything. Shouldn't it be void. In TC/TC++ or OS based software, main can return, but how in MCU.
Or it is just for compatibility.
You have seen int main() in what code?
No - main() is normally written as void for embedded applications that are run directly on the hardware. A return value is really only applicable if an OS will start the application and then pick up the return value after the application ends.
View all questions in Keil forum