We use Keil tools to generate C++ embedded application that run in our embedded controller.
My initialization code jumps to __main as follows:
IMPORT __main LDR R0, =__main BX R0
Wher is "__main" ?
I searched C:\Keil but could not find definition of __main.
This is what my map file says about __main
__main 0x00008308 ARM Code 8 __main.o(!!!main)
My application starts at 0x8000. __main is at 0x00008308. Where is __main.o ?
my main() is as follows:
int main()
{
os_sys_init(init);
return 0;
}
After my startup assembly file executes, Keil __main() runs and then I enter forever loop mentioned earlier in this message thread. I never hit my main().
My co-worker is up and running. He hits the main(). I took his source code and Keil RL-ARM (Real-Time Library) from my machine and encountered the exact same problem.
I can try your suggestions but doesn't it look like the problem is with Keil RL-ARM code. Maybe should I re-install Keil uVision4?
THIS IS NOT PC PROGRAMMING!!!
in embedded you can not return from main
If you want to do embedded there is one rule
"the embbeded chip aint no PC"
Erik
return 0 should never execute. We should never get to return 0 statement.
did you set a breakpoint and verify that "return 0 should never execute"
View all questions in Keil forum