How to find C++ entry point ?

OP #4186760
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
Guest
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"...

Reply

A question of your own? This thread is over 11 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.