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.
te system gets it.
I modded my modem. it runs linux and my programs. my lamp timer is mechanical. no code there.
Can return the value where???
Who do you expect is waiting to pick up any value returned with exit()?
Do you often see a cable modem or a lamp timer have a command line interface or a graphical desktop for the program to return back to?
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