This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/EVMK2G: undefined reference to `_start'

Part Number: EVMK2G

Tool/software: Code Composer Studio

I'm trying to build and run the simplest "hello_K2GEVM_CortexA" example.

If I compile the example, it builds but doesn't run properly.  It acts like its loading and running but does not break at main() and only gives the red terminate icon.

Thinking maybe its missing some startup code, I add "startup_ARMCA15.S" to the build and it gives the error " undefined reference to `_start' ".  Not sure that I need this file since the example builds without it, but since it doesn't run properly I'm just grasping at straws.

Enter_BootLoader:
    LDR r10, = _start @ Get the address of _start    <<<==== offending line of code
    MOV lr,pc @ Dummy return
    BX r10 @ Branch to main
    SUB pc, pc, #0x08 @ looping

Roger

  • I've notified the sw team. They will post their feedback directly here.

    Note that responses will be delayed, because of the holidays.

    Best Regards,
    Yordan
  • Can you check this wiki on how to create hello world bare metal on K2G A15: processors.wiki.ti.com/.../Processor_SDK_Bare_Metal_Examples

    Regards, Eric
  • I meticulously followed all of the instructions for the bare metal examples, modifying as necessary for the K2GEVM. I believe that I got much farther this time. When I select "Connect Target" for the CortexA15 in the debug window, it runs some GEL scripts and then gives me an icon with the green right-arrow as if I can run the code. But, in the Debug window it says
    0x00000000 (no symbols are defined)
    and I cannot set breakpoints and I get various errors telling me that there are no symbols and that I need to load them. It's a debug build, so I would think that symbols would get loaded automatically and I don't see any explicit means for loading symbols.

    If, instead of using Connect Target, I right-click on the hello_world project and select Debug As -> Code Composer Debug Session, I see similar GEL statements in the console window telling me "K2G GP EVM Initialization Complete" and in the Debug window I see that it says CortaxA15 (Running) but there are no icons enabled for me to start/pause the program, only the stop icon.
  • Hi,

    It looks that you just connected the K2G A15 core, it halts at 0x0000000. There is no out file loaded. From the CCS, you need load your hello world application, from RUN---->LOAD---->Load program, then it should go main(). Then you can set break point, run, debug, etc.

    Regards, Eric
  • Okay. So it turns out that contrary to the instructions, I don't need to launch and connect to the target first. I just need to right-click on the project and choose Debug As -> Code Composer session and it does everything and I can step through the startup code.

    I've now moved on to the next problem where it doesn't ever get to main() because it fails in _start() but I'll post a new forum entry for that if I can't resolve it. Thanks