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

Author: Paul Van den Bergh (paul_vdbergh)
Posted on:

Rate this post
0 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.


Author: Eric (Guest)
Posted on:

Rate this post
0 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"...


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.