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.

Running on EVMK2H from CCS

Other Parts Discussed in Thread: 66AK2H14, 66AK2H12

Hi,

I currently am running on a TCIEVMK2H board.

I can successfully run using the USB UART 1 and building the Linux application on a Linux target and using TFTP to load the executable down to the target and running it on the A15s.

I can also build a DSP project in CCS (CCSv6.1.1)  and execute on any of he DSPs using no-boot mode (with evmk2h.ccxml gel file).

However, when I try and build the example project to run on the A15, I am having trouble. I cannot seem to find any instructions on how to set up the A15 to run in this mode, as I did with the DSP projects. Using the same gel file for the DSP, I can connect to an AS15, so the connect path seems to be there. However, I cannot seem to load an A15 program.

Here is what I have tried so far:

1. I created an example project in CCS 'hello-GenericCortexA15Device'.

2. I was able to build the project and get a 'hello_GenericCOrtexA15Device.out file'.

3. When trying to load this file using the target connection, I get the following error:

arm_A15_0: GEL Output:
Connecting Target...
arm_A15_0: GEL: Error while executing OnTargetConnect(): Target failed to read 0x02620020
    at (*((unsigned int *) 0x02620020)&0x0000000E) [xtcievmk2x.gel:569]
    at OnTargetConnect()
arm_A15_0: File Loader: Verification failed: Values at address 0x0000000080000000 do not match Please verify target memory and memory map.
arm_A15_0: GEL: File: /home/osboxes/workspace_v6_1/hello_GenericCortexA15Device/Debug/hello_GenericCortexA15Device.out: a data verification error occurred, file load failed.
arm_A15_0: Unable to terminate memory download: NULL buffer pointer at 0x3aa4

4. I searched the forums and found a post that linked to this post: https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/430233/1538734#1538734

5. Comparing my project to the example in the above link, I notice one glaring difference that is most likely the problem.

My compiler is set to 'GNU v4.8.4 (Linaro), and the only selections are for that and 'GNU v4.7.3'. There appears to be a reference to a TI compiler in ~/ti/ccsv6/tools/compiler, but I am not sure if this is the right place to look or which file to select, as none of them appear to be obvious.

This is different from the 'ti 5.1.5' in the example.

It seems that until I get the compiler correct for the TI ARM, the linker command file probably won't work. Is that correct?

Any help with this would be appreciated.

Thanks

Doug

  • Hi Doug,

    Doug said:
    However, when I try and build the example project to run on the A15, I am having trouble. I cannot seem to find any instructions on how to set up the A15 to run in this mode, as I did with the DSP projects. Using the same gel file for the DSP, I can connect to an AS15, so the connect path seems to be there. However, I cannot seem to load an A15 program.

    Option 1:

    yes, using the same gel file (xtcievmk2x.gel), you can do "connect target" to ARMcore, A15, load the hello world program and execute it provided you have the appropriate linker command file. Make sure you follow the steps given below.

    1. In the *.ccxml file, --->advanced -->C66xx_0 --> initialization script --> locate the path of the gel file, "xtcievmk2x.gel"

    2. In the *.ccxml file, --->advanced -->arm_A15_0 --> initialization script --> <leave it as blank>

    3. Connect core 0 . Let it run the gel file and initialize the peripherals such as DDR3, PLL

    4. Now, connect arm_A15_0, load the hello world program and run. < Here, you should have the linker command file while building the hello world program to create a map file accordingly; so that it will load the sections such as .text, .stack into appropriate memory sections)

    Option 2:

    You can directly use the ARM gel file linked to the ARM core. Load and run the example directly without connecting the DSP core0 at all.

    Steps:

    1. In the *.ccxml file, --->advanced -->arm_A15_0 --> initialization script --> locate the path of the gel file, "xtcievmk2x_arm.gel"

    2 Now, connect arm_A15_0, load the hello world program and run. < Here, you should have the linker command file while building the hello world program to create a map file accordingly; so that it will load the sections such as .text, .stack into appropriate memory sections)

     ( Attached here the ARM gel file: 2451.xtcievmk2x_arm.gel ).

    Please use this gel file and let me know the result.

    1. I would also recommend you to install the processor SDK which has ARM examples such as "UART_BasicExample_K2H_armExampleProject", "GPIO_LedBlink_K2H_EVM_armExampleProject" etc.

    2. Once you install CCS 6.1.2, you will find the ARM gel located at : "~:\ti\ccsv6\ccs_base\emulation\boards\xtcievmk2x\gel"

  • Dear Doug,


    3. When trying to load this file using the target connection, I get the following error:

    arm_A15_0: GEL Output:
    Connecting Target...
    arm_A15_0: GEL: Error while executing OnTargetConnect(): Target failed to read 0x02620020
    at (*((unsigned int *) 0x02620020)&0x0000000E) [xtcievmk2x.gel:569]
    at OnTargetConnect()
    arm_A15_0: File Loader: Verification failed: Values at address 0x0000000080000000 do not match Please verify target memory and memory map.
    arm_A15_0: GEL: File: /home/osboxes/workspace_v6_1/hello_GenericCortexA15Device/Debug/hello_GenericCortexA15Device.out: a data verification error occurred, file load failed.
    arm_A15_0: Unable to terminate memory download: NULL buffer pointer at 0x3aa4

    Can you please try to use the TI ARM compiler (instead of Linaro) ?


    It seems that until I get the compiler correct for the TI ARM, the linker command file probably won't work. Is that correct?

    Yes, you are understanding correct.
    Without linker command file, you can't run the .out on ARM core. It defines where need to run (Internal RAM or DDR etc.,).
    We use TI ARM compiler with linker command settings to do memory map.

    Refer to the following post.

    https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/452350

    Attach the code, let me try.

  • Hi Titusrathinaraj,

    I do not see an option to use the TI compiler. The only options are the 'GNU v4.8.4 (Linaro), and 'GNU v4.7.3'.

    I have the info for the linker command file once I get the compiler loaded.

    Thanks
    Doug
  • Hi Shankari,

    Thanks for the response.

    1. I have tried leaving the A15 init script blank. I am able to connect to the A15, but I cannot load a compiled image.

    2. linking with the linker.cmd file I found on that other link resulted in the following error messages:

    file format not recognized; treating as linker script
    /home/osboxes/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld:../linker.cmd:1: syntax error
    collect2: error: ld returned 1 exit status
    gmake: *** [hello_GenericCortexA15Device.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished **

    I am still building with the GNU 4.8.4 (Linaro) toolchain, as I do not know how to configure for the TI compiler.

    3. I downloaded the _arm.gel file you provided, and I was able to see the ARM cores initiaze. I am still running on 6.1.1, so I don't see the file in the gel dir. I will look into downloading 6.1.2 if you think that will make it easier.

    When I tried to load a '.out' file, I get the following errors:

    Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-i02/src/gnu/targets/arm/rtsv7A/syscalls.c"
    Locate the file or edit the source lookup path to include its location.

     

    Thanks

    Doug

  • Hi Doug,

    Doug said:

    3. I downloaded the _arm.gel file you provided, and I was able to see the ARM cores initiaze. I am still running on 6.1.1, so I don't see the file in the gel dir. I will look into downloading 6.1.2 if you think that will make it easier.

    You can use the ARM gel file even on 6.1.1. What is the actual result you got when you use the ARM gel file. Did you able to connect the ARM core 0 and run the gel file? Post the error screenshot.

    You have to download the ARM gel file and save it in your PC and then give this gel file as input  . That is In the *.ccxml file, --->advanced -->arm_A15_0 --> initialization script --> locate the path of the gel file, "xtcievmk2x_arm.gel"

    It worked for me ( provided I compiled it using *.cmd with TI ARM CGT ). It should definitely work for you too.

    Doug said:
    I am still building with the GNU 4.8.4 (Linaro) toolchain, as I do not know how to configure for the TI compiler.

    I hope you have missed to install the TI ARM compiler while installing the CCS.

    You can also do update to get the TI ARM compiler with "CCS update" option.

    TI ARM CGT location : - C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.5

    When you compile with TI ARM compiler, you can compile with *.cmd file.

    Please download the ARM CGT like below:- 

  • Hi Shankari,

    It appears that I do not have the TI compiler installed.

    When I go to 'install new software', I see 'ARM Compiler Tools' for versions

    15.12.1, 5.2.7, 5.1.14, 5.0.11, 4.9.9, 4.7.1, 4.6.6

    But no 5.1.1

    WHen I use the init script that you provided, the A15 initializes and appears to be ready for a download with no error messages.

    The error message that I posted occurs when I try to load a '.out' image that was compiled witht he linaro compiler.

    Thanks

    Doug

  • Please see the instructions provided here for creating A15 hello world project using Linaro (GNU GCC compiler). There is a template provided in CCS 6.1.2 that allows you to do this.

    Hope this helps.

    Regards,

    Rahul

  • Ok, what I think I need to do is reinstall the latest SDK. I have one from last year that doesn't have all of the updated support.
  • HI Douglas,

    As you are going to do reinstallation, I would recommend you to download and install the processor SDK and CCS 6.1.2 from the following links. The processor SDK has readymade ARM based examples for CCS, which you can import and run on K2H EVMs directly without any issues.

    Please revert if have any questions on running processor SDK examples or installation e.t.c.,

  • Hi Shankari,

    What I have installed now is CCS 6.1.1 with the 'ti_emupak_keystone2_setup_1.1.2.0.bin’.

    Can I install the new SDK and CCS over what is already there, or do I need a new path?

    Is it trivial to remove the other installations, or do I need to run an uninstaller first?

    Thanks

    Doug

  • Douglas,

    CCS 6.1.1 has a bug that won`t allow you to create hello world example using the Linaro compiler so you will need to uninstall the CCS and reinstall 6.1.2. Ensure that contents of C:\ti\ccsv6 is empty after you run the uninstaller. We have integrated the emu pack with the CCSv6.1.2 so you don`t need to install that separately.

    Regards,
    Rahul
  • Hi Shankari,

    I was able to download and install the CCS and both SDK.
    It appears that CCS came up and discovered the added packages and is happy.
    However, when I try to follow the 'Bare Metal' instructions on how to set up an ARM project, I do not see 'Basic Examples' in the projects and templates section. In fact, it appears that it is the same text that is available from the previous incarnation. I am wondering if the new SDK info is linked into the CCS.

    The available templates/ examples are:
    - Empty Projects
    - SYS/BIOS
    - System Analyzer
  • Hi Douglas,

    After installing the "processor_sdk_rtos_k2hk_2_00_01_06", you will observe that the package, "pdk_k2hk_4_0_0" got installed.

    Steps:

    1. Navigate to pdk_[soc]_[version]\packages

    2. Run pdksetupenv.bat  -- To set up the environmental variables.

    3. pdkProjectCreate.bat - To create the pdk test projects.

    Run pdksetupenv.bat like below

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

    >cd C:\ti\pdk_k2hk_4_0_0\packages

    C:\ti\pdk_k2hk_4_0_0\packages> pdksetupenv.bat

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

    pdkProjectCreate.bat [soc] [board] [endian] [module] [processor] [pdkDir]

    Run pdkProjectCreate.bat like below.

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

    C:\ti\pdk_k2hk_4_0_0\packages>pdkProjectCreate.bat K2H all little all arm

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

    Please refer to

    This will generate PDK examples in the folder like below:

    Once the PDK test projects are generated, you will find the CCS project files for each project. You can import into CCS and use it.

  • Hi Shankari,

    I have installed both the CCSv6 and both of the SDKs.
    I am trying to follow the instructions on the TI RTOS SDK hello world example in CCS, and I am getting an error when I excecute the program.

    I can successfully:
    1. launch the target server
    2. connect to the A15 core (using the xtcievmk2x_arm.gel file)
    3. load the .out file that was built

    When I go to 'resume' the program, I do not see the expected output, but instead the following error msg:

    in _exit(int) window
    ----------------------------
    Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-k07/src/gnu/targets/arm/rtsv7A/syscall.c"
    Locate the file or edit the source lookup path to include its location.

    I am thinking that maybe something isn't fully initialized?


    Doug

  • I have some more info.

    It appears that the error messages I am seeing is the source display function that is trying to display the source code for the 'exit' routine and can't find the .c file.

    I was able to single step through the code and see the IO functions being called, and it went throught all the letters in 'hello world', so I am pretty sure I should be seeing some output somewhere. But there is nothing int he console. Am I looking in the wrong place? That is where I see the output from the DSP examples.

    Thanks
    Doug
  • Hi Doug,


    When I go to 'resume' the program, I do not see the expected output, but instead the following error msg:

    in _exit(int) window
    ----------------------------
    Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-k07/src/gnu/targets/arm/rtsv7A/syscall.c"
    Locate the file or edit the source lookup path to include its location.

    I am thinking that maybe something isn't fully initialized?

    Can you please attach the screen shot of the error ?
    I hope, you can ignore this error, as it would call exit.c file once the code is returned successfully.
    You might have used "return 0" in the end of your code.
    Use "while(1);" instead of "return" function, then you won't get the exit error.


    I was able to single step through the code and see the IO functions being called, and it went throught all the letters in 'hello world', so I am pretty sure I should be seeing some output somewhere. But there is nothing int he console. Am I looking in the wrong place? That is where I see the output from the DSP examples.

    Have you included "stdio.h" in your project ?
    Can you please attach your project ?

  • Hi Shankari,

    I have discovered that the error message the I am seeing about the source file not being found is because when the program exits, it cannot find the source file for 'syscalls.c' to display in the debugger for the file.

    I have been trying to run several projects, all from either the example projects in 'Generic A15 examples' from the 'Getting started' menu, or from the pdk examples. I am not running basic examples yet, so I have not imported any other projects.

    In the 'getting started' guide for the SDK-RTOS, in theTI-RTOS kernel examples section for ARM Cortex A15, it says the following:

    "3. On SYS/BIOS scroll down to AM572X --> Cortex A --> Genereic example --> click on Hello Example."

    When I launch CCSV6, I do not see a 'AM572X' selection, instead I see the Generic ARM15, which is what I am using.
    I also tried 'custom device - TCI66362H_cortexA' examples.

    Both of them load successfully onto the target, and appear to run (single stepping, PC, registers), but there is no output in the console.

    Thanks,
    Doug
  • Hi Doug,
    Can you please attach your project and provide the screen shot for the same ?
    You can choose "Generic A15" option.
  • Douglas McIntosh said:
    I was able to single step through the code and see the IO functions being called, and it went throught all the letters in 'hello world', so I am pretty sure I should be seeing some output somewhere. But there is nothing int he console. Am I looking in the wrong place? That is where I see the output from the DSP examples.

    The programs for the ARM A15 cores in the 66AK2H14 on the EVMK2H are built using the GNU compiler.

    I found that the "Hello" example for the 66AK2H12 for the ARM core failed to produce any output on the Console, but the "Semi-Hosting Example" for the ARM core did produce output on the Console.

    It turns out the "Semi-Hosting Example" enables support for Semi-Hosting with the following in the semihost.cfg file:

    /*
     * Uncomment this line if linking with semi-hosting library.
     * The SemiHostSupport module installs an SVC_Handler that
     * is required for semi-hosting to work.
     */
    var SemiHostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    

    Where the "Hello Example" hasn't enabled Semi-Hosting support.

    Can you try running the "Semi-Hosting Example" on an ARM core and see if that then produces output on the Console?

    For information, the TI compiler used for the DSP and GNU compiler used for the ARM A15 differ in how they generate Console output:

    1) The TI compiler used for the DSP uses CIO where the CCS debugger sets a breakpoint to be able to collect the Console output. The same code can be used regardless of if a debugger is connected; it no debugger is connect the Console output is silently discarded.

    2) The GNU compiler used for the ARM A15 uses Semi-Hosting where the target stops on a SVC_Handler to be able to output Console output:

    a) If Semi-Hosting support is not compiled in no Console output is collected when the program is running under the debugger, but the program can ran when no debugger is connected.

    b) If Semi-Hosting support is compiled in then Console output is collected when the program is running under the debugger, but the program stalls when attempts to perform Console output when the debugger is not connected. i.e. can cause problems for programs which want to run standalone.

  • Dear Chester,
    Thanks for your reply and valuable answer.
    Appreciate your help for community members.

    Thanks again!