EmbDev.net

Forum: ARM programming with GCC/GNU tools How to find C++ entry point ?


von Paul V. (paul_vdbergh)


Rate this post
useful
not useful
Hi all,

I'm writing bare-metal code to startup BeagleBone Black (TI AM3358 SoC).
I succeeded in writing the first code after the ROM boot.  This code 
sets up the stack pointers, initializes peripherals and DDR3 memory.

After this initialization, I need to load the final application into 
this DDR3 memory and resume execution starting at the C++ entry point.

AFAIK, this entry point normaly resides at address 0x00000000, but since 
the DDR3 RAM is located at 0x80201000 (also specified in my linker 
script for the final application), resuming at 0x00 isn't correct.

How can one find the correct entry point for the C++ startup code in 
DDR3 memory?  There is no _main symbol defined in the .lst file, neither 
anything else that looks like an entry point to me...

I'm keen to read your advice.

Paul

von Eric (Guest)


Rate this post
useful
not useful
You application should have some kind of main function; maybe the C++ 
name mangling made it unrecognizable? However, your initialization is 
not complete yet. You need to initialize all global variables and call 
the constructors for global/static objects.

Search the web for "C++ run-time environment" and "crt0"...

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.