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.

  • TI Thinks Resolved

CCS/66AK2H12: Cannot find Hello World example project for K2H EVM

Intellectual 300 points

Replies: 12

Views: 622

Part Number: 66AK2H12

Tool/software: Code Composer Studio

Hi there,

I want to get a simple Hello World example working with the 66AK2H12 (K2H EVM), I'm following the guide here: http://processors.wiki.ti.com/index.php/Processor_SDK_Bare_Metal_Examples#ARM_Cortex-A15  

1. Start CCS and create a work space for generating the project.

Fine, no problem.

2. Click on File menu option and select New--> CCS Project.

Fine, no problem.

3. Select Target as AM572x -Cortex A15 and GPEVM_AM572x as shown in the image

Fine - I switched the target to my own board's settings

4. Select Cortex A setting in the options below and provide name of the project as "hello_world" and use default Advanced settings for the project. If the Default settings uses "TI ARM compiler 5.x.x" switch to GNU Linaro 4.8.4 (or higher) tool chain for A15 and check the build little endian ELF binary for the A15 core. Under Project templates and examples, select Basic Examples-> Hello World

Click Finish after you are done to allow CCS to auto generate the project from the template Basic Examples-> Hello World.

Here is the problem. I cannot find Basic Examples -> Hello World. 

 


Basic Examples -> Hello World doesn't exist within my CCS install. How can I get this example project? I checked the Resource Explorer, and I can't find a way to download anything called Hello World.

 

Thanks for any help!

  • Guru 297065 points

    Hello Andre,

    The available templates are determined by the device support XML files. The issue sounds related to this old issue:

    CCSIDE-2490: Hello world GCC project template should be created for Cortex A15 cores

    When looking at the details of this issue, it looks like it was resolved just for AM572x (which happens to be what the guide is showing). In my environment, I can see the template for the A15 of AM572x but not for the A15 of 66AK2H12, which confirms this. I'm not sure if this is by design or oversight. I will need to investigate further

    ki

    -----------------------------------

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training/Documentation? Check out the CCS Resources page

    Curious about the status of a bug and know the tracking ID? Track it via the public bug tracking portal

    NOTE: When a bug is filed and a tracking ID is provided, the thread may then be suggested as "TI Thinks Resolved". Why? Please read the first FAQ of the CCS Forum Guidelines & FAQ

  • Guru 297065 points

    In reply to Ki:

    After discussing with a colleague, it is likely that the document you referenced is obsolete. I will move this thread to the device forum. The experts there can suggest alternatives on how to get started.

    Thanks
    ki

    -----------------------------------

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training/Documentation? Check out the CCS Resources page

    Curious about the status of a bug and know the tracking ID? Track it via the public bug tracking portal

    NOTE: When a bug is filed and a tracking ID is provided, the thread may then be suggested as "TI Thinks Resolved". Why? Please read the first FAQ of the CCS Forum Guidelines & FAQ

  • In reply to Ki:

    Hi,

    Refer to this guide:
    software-dl.ti.com/.../index_examples_demos.html

    Beware that after each sequence of steps there are NOTES for Keystone2 devices, be sure to follow them as well.

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Hi Yordan,

    Thanks for the link. Unfortunately, that link still shows me Basic Examples  -> Hello World. See my screenshots in my initial post for more info, but I cannot find anything called Basic Examples.

    Do you know how I would be able to find that?

    Thanks!

  • In reply to Andre B37:

    Andre,

    Here is the screen shot of what will work for you.  It appears in CCSv8 when you switch from TI ARM compiler to GCC the default endian format is set to big endian and there is no template for big endian due to which the basic project doesn`t show up. If you change the endian format, the issue should be fixed.

    Let me know if you are still seeing this issue. For K2H14 device, I would recommend that you set device as 66AK2G12 as that device has same A15 and memory architecture as K2H device so the example should would out of the box. For AM572x, you will need to chnage the .lds file to get the example working.

    Regards,

    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

  • In reply to Rahul Prabhu:

    Rahul,

    Great - I was already in little endian mode, but setting the device to 66AK2G12 was the fix. I was able to access the Hello World example with only a small issue.

    I build the example (creating the .out file), I launch the selected target configuration, I then Connect to the Target, I do Run > Load > Load Program and I load the .out file that was built earlier. All that works well. 

    But then I go to run the program by doing Run > Resume, I briefly see the "Hello World" printout in the Console, and then I get this Unhandled ADP_Stopped exception 0xC013B48

    Now, if the "Hello World" message was printed out, then the error must have been at the last line of code in the main function: return 0;  The disassembly window also shows me that i'm in a "kill()" function. And stepping through the code, line by line, I don't get any errors until I step past return 0.

    Any ideas?

    Thanks!

    Andre

  • In reply to Andre B37:

    There are a few things that seem to be broken. To start with CCS install seems to be missing the file startup_ARMC15.S and the project doesn`t have any gcc libratries linked in their.

    Can you include the GCC glue code required to configure the core and populate the reset vectors before entering main and also link in the following GCC libraries.

    startup_ARMCA15.S

    I have not tested this in a while and I am not sure why the glue code file is not in the CCS package. The setup worked with GCC 4.8 and GCC 5.x. ALso, there was a known issue with semihosting (CIO) in CCS so check the release notes to confirm this doesn`t impact your version.

    Regards,

    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

  • In reply to Rahul Prabhu:

    Rahul,

    I actually already do have the startup_ARMCA15.s file in my project.

    I also see that when I build the project, it builds the startup_ARMCA15.s file and links it, along with the hello.c file, into the .out file. (see bolded section in the Console output below, printed when I 'Build Project')


    **** Clean-only build of configuration Debug for project hello_world_K2G ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 12 clean -O
     
    DEL /F  "hello_world_K2G.hex"  "hello_world_K2G.out"
    DEL /F "startup_ARMCA15.d"
    DEL /F "hello.o" "startup_ARMCA15.o"
    DEL /F "hello.d"
    Could Not Find C:\Users\abododea\workspace_v8\hello_world_K2G\Debug\hello_world_K2G.hex
    Finished clean
     

    **** Build Finished ****

    **** Build of configuration Debug for project hello_world_K2G ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 12 all -O
     
    Building file: "../hello.c"
    Invoking: GNU Compiler
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dk2g02 -Darm0 -I"C:/Users/abododea/workspace_v8/hello_world_K2G" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"hello.d" -MT"hello.o"   -o"hello.o" "../hello.c"
    Finished building: "../hello.c"
     
    Building file: "../startup_ARMCA15.S"
    Invoking: GNU Compiler
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dk2g02 -Darm0 -I"C:/Users/abododea/workspace_v8/hello_world_K2G" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"startup_ARMCA15.d" -MT"startup_ARMCA15.o" -x assembler-with-cpp  -o"startup_ARMCA15.o" "../startup_ARMCA15.S"
    Finished building: "../startup_ARMCA15.S"
     
    Building target: "hello_world_K2G.out"
    Invoking: GNU Linker
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a15 -marm -Dk2g02 -Darm0 -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -mcpu=cortex-a15 -Wl,-Map,"hello_world_K2G.map" -Wl,--defsym,ARM_CORE=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"hello_world_K2G.out" "./hello.o" "./startup_ARMCA15.o" -Wl,-T"../66AK2Gxx.lds" 
    Finished building target: "hello_world_K2G.out"
     

    **** Build Finished ****

    Also, how do you know that I'm missing linked gcc library? I get no errors when building and linking (as shown above) although the 'Preferences' of my project don't match yours:

    What would be the best course of action from here to resolve my error? It doesn't seem to be an issue with missing libraries or with the startup_ARMCA15.s file.

    Thanks,

    Andre

  • In reply to Andre B37:

    Andre,

    We have seen issues in the past when librdimon is not included. this is the GCC library for semihosting and is required for CIO operations.

    I will need to locate a K2H EVM internally to try this out. I will let you know if I am able to root cause this issue.

    Regards,
    Rahul.

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

  • In reply to Rahul Prabhu:

    Andre,

    It appears that the Unhandled ADP_Stopped Exception is not result of any missing libraries but seems to be some issue with the debugger state after the program execute. HEre is ARM reference to this exception:
    infocenter.arm.com/.../index.jsp

    To avoid running into any issues, it appears we recommend ending the program with while (1) or by putting the core in WFI.

    Regards,
    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

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.