• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » StarterWare » StarterWare forum » AM335xEVM example project won’t build and run in CCSv5 with TMS470 compiler
Share
StarterWare
  • Forum
Options
  • Subscribe via RSS

AM335xEVM example project won’t build and run in CCSv5 with TMS470 compiler

AM335xEVM example project won’t build and run in CCSv5 with TMS470 compiler

This question is answered
MWagner
Posted by MWagner
on Apr 18 2012 16:15 PM
Prodigy170 points

I’m using CCSv5 (version 5.1.0.09000) with the TMS470 compiler and I can’t get a simple project (eg. buzzerBeep) to build and run with on the EVM board with a Blackhawk USB560 JTAG emulator. I installed the tools on my Windows 7 64-bit machine using the SPRC932A install DVD.

 I can successfully import and compile the buzzerBeep project as shown below, but there are errors with the post-build, namely because no directory tiobj2bin was installed by the DVD installer in the utils. Therefore there is no tiojb2bin.bat or mkhex4bin.exe on my hard drive.

 Then I unsuccessfully tried to load the buzzerBeep.out into the debugger. Is the problem due to these missing utilities? If so, how can I get these missing files installed?

 

**** Build of configuration Debug for project buzzerBeep ****

 C:\ti\ccsv5\utils\bin\gmake -k all

'Building file: C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c'

'Invoking: TMS470 Compiler'

"C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv7A8 -g --include_path="C:/ti/ccsv5/tools/compiler/tms470/include" --include_path="../../../../../../../include" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv7a/am335x" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="buzzerBeep.pp"  "C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c"

'Finished building: C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c'

' '

'Building target: ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out'

'Invoking: TMS470 Linker'

"C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv7A8 -g --diag_warning=225 -me --abi=eabi --code_state=32 -z -m"buzzerBeep.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/tms470/lib" -i"C:/ti/ccsv5/tools/compiler/tms470/include" --reread_libs --ram_model -o "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out"  "./buzzerBeep.obj" -l"libc.a" -l../buzzerBeep.cmd

<Linking>

'Finished building target: ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out'

' '

C:/ti/ccsv5/utils/bin/gmake --no-print-directory post-build

"C:/ti/ccsv5/utils/tiobj2bin/tiobj2bin.bat"  "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out"  "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.bin"  "C:/ti/ccsv5/tools/compiler/tms470/bin/ofd470.exe"  "C:/ti/ccsv5/tools/compiler/tms470/bin/hex470.exe"  "C:/ti/ccsv5/utils/tiobj2bin/mkhex4bin.exe"

The system cannot find the path specified.

gmake[1]: [post-build] Error 1 (ignored)

' '

 **** Build Finished ****

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Apr 18 2012 23:27 PM
    Expert4435 points

    Hi,

          I believe you have not installed all the packages while installing CCS. tiobj2bin is not installed in your machine. refer http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/168266.aspx for more information.

    Basically you need to install "Stellaris Cortex M MCU" package while installing CCS.

    Regards

    Baskaran

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Apr 19 2012 02:48 AM
    Expert4435 points

    also "Then I unsuccessfully tried to load the buzzerBeep.out into the debugger. " can you explain what is the error you are getting.

    1. What is the configuration in target configuration ccxml.

    2. Are you able to connect MPU (cortex A8)?

    Regards

    Baskaran

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MWagner
    Posted by MWagner
    on Apr 19 2012 16:20 PM
    Prodigy170 points

    Thank you for your advice to install the Stellaris Cortex M MCU package. I installed that and I am no longer getting the link error. However, I still can’t run the buzzerBeep application.

     I followed the instructions for TMS470 form CCS project and Debugging on EMV AM335x using CCSv5 on the AM335x StarterWare Environment Setup page

    http://processors.wiki.ti.com/index.php/AM335X_StarterWare_Environment_Setup#Debugging_on_EVM_AM335x_using_CCSv5

     For the Target Configuration file, I selected AM335x with Blackhawk USB560-M Emulator.

    I tested the connection to the debugger and that passes.

    After launching the target and connecting to the Blackhawk USB560-M Eumlator_0/CortxA8, I successfully executed the AM335x_EVM_Initialization script. Then I loaded the buzzerBeep program. The program does not appear to run and when I suspend operation it appears to be at the trap instruction at 00020080 as shown:

    00020080:   EAFFFFFE B               0x20080

    00020084:   EAFFFFFE B               0x20084

    00020088:   EAFFFFFE B               0x20088

    0002008c:   EAFFFFFE B               0x2008C

    00020090:   EAFFFFFE B               0x20090

    00020094:   EAFFFFFE B               0x20094

    00020098:   EAFFFFFE B               0x20098

    0002009c:   EAFFFFFE B               0x2009C

    000200a0:   EAFFFFFE B               0x200A0

    000200a4:   EAFFFFFE B               0x200A4

    000200a8:   EAFFFFFE B               0x200A8

    000200ac:   EAFFFFFE B               0x200AC

    000200b0:   EAFFFFFE B               0x200B0

    000200b4:   EAFFFFFE B               0x200B4

    000200b8:   EAFFFFFE B               0x200B8

    000200bc:   EAFFFFFE B               0x200BC

    000200c0:   E59F102C LDR             R1, 0x200F4

    000200c4:   E5911000 LDR             R1, [R1]

    000200c8:   E2011C07 AND             R1, R1, #1792

    000200cc:   E1A01421 MOV             R1, R1, LSR #8

    000200d0:   E3510003 CMP             R1, #3

    000200d4:   1A000005 BNE             0x200F0

    000200d8:   E59F1018 LDR             R1, 0x200F8

    000200dc:   E5912000 LDR             R2, [R1]

     The buzzerBeep executable appears to have been loaded at address 0x80002940 per the map file, but it did not execute.

     If I manually set the PC to 0x80000000 (the platform lib entry point) and single step, it will go off into the weeds at init.asm line 162, because the start_boot address is pointing off in the weeds.

     Here is an excerpt from the map file:

    SECTION ALLOCATION MAP

     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .init      0    80000000    000000b4    
                      80000000    000000ac     system.lib : init.obj (.text)
                      800000ac    00000008     rtsv7A8_A_le_eabi.lib : auto_init.obj (.tramp.__TI_auto_init.1)

    .text      0    800000b4    000029d0    
                      800000b4    000005f4     platform.lib : gpio.obj (.text)
                      800006a8    00000570     drivers.lib : hsi2c.obj (.text)
                      80000c18    00000450     system.lib : cp15.obj (.text)
                      80001068    0000043c     platform.lib : dmtimer.obj (.text)
                      800014a4    00000428     drivers.lib : gpio_v2.obj (.text)
                      800018cc    00000324     platform.lib : hsi2c.obj (.text)
                      80001bf0    000002c0     system.lib : interrupt.obj (.text)
                      80001eb0    000002b8     drivers.lib : dmtimer.obj (.text)
                      80002168    000001e8     platform.lib : cpld.obj (.text)
                      80002350    00000180     rtsv7A8_A_le_eabi.lib : memcpy32.obj (.text)
                      800024d0    00000120     platform.lib : sysdelay.obj (.text)
                      800025f0    000000fc     system.lib : exceptionhandler.obj (.text)
                      800026ec    000000f4     rtsv7A8_A_le_eabi.lib : u_div32.obj (.text)
                      800027e0    000000d4                           : auto_init.obj (.text)
                      800028b4    0000008c                           : cpy_tbl.obj (.text)
                      80002940    00000070     buzzerBeep.obj (.text)
                      800029b0    00000060     system.lib : cpu.obj (.text)
                      80002a10    00000048                : startup.obj (.text)
                      80002a58    00000020     rtsv7A8_A_le_eabi.lib : icall32.obj (.text)
                      80002a78    0000000c     system.lib : cpu.obj (.text:CPUIntStatus)

    .bss       0    80002a84    00000200     UNINITIALIZED
                      80002a84    00000200     system.lib : interrupt.obj (.bss:fnRAMVectors)

    .const     0    80002c84    00000038    
                      80002c84    00000038     system.lib : startup.obj (.const:vecTbl)

    .data      0    80002cbc    00000004    
                      80002cbc    00000004     platform.lib : sysdelay.obj (.data)

    .stack     0    87fffff0    00000008     UNINITIALIZED
                      87fffff0    00000008     --HOLE--

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Apr 19 2012 23:11 PM
    Expert4435 points

    MWagner,

                     Are you able to execute the prebuilt binary which is in the package. i dont see anything wrong in the steps you followed.

    Regards

    Baskaran

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MWagner
    Posted by MWagner
    on Apr 20 2012 12:00 PM
    Prodigy170 points

    If I try to load a pre-built binary (eg. gpioLCDBacklight.out) with the ebugger and run, I get the same result.

    The application does not run correctly. And if I suspend the debugger, execution is at a trap address (0x00020088:  EAFFFFFE B    0x20088)

    Also, I verified that the compiler is building the buzzerBeep project properly, by putting buzzerBeep_ti.bin (renamed to app) onto the SD card.

    Then I booted the EVM board off of the SD card and the beep program runs correctly.

    I'm not certain what could be wrong with the debugger setup.

    Here is the output after I run the AM335x_EVM_Initialization script. As far as I can tell it executed properly:

    CortxA8: Output:      ****  AM335x 15x15 EVM Initialization is in progress ..........
    CortxA8: Output:      ****  Subarctic ALL ADPLL Config for OPP == OPP100 is In Progress .........
    CortxA8: Output:      Input Clock Read from SYSBOOT[15:14]:  24MHz
    CortxA8: Output:      ****  Going to Bypass...
    CortxA8: Output:      ****  Bypassed, changing values...
    CortxA8: Output:      ****  Locking ARM PLL
    CortxA8: Output:      ****  Core Bypassed
    CortxA8: Output:      ****  Now locking Core...
    CortxA8: Output:      ****  Core locked
    CortxA8: Output:      ****  DDR DPLL Bypassed
    CortxA8: Output:      ****  DDR DPLL Locked
    CortxA8: Output:      ****  PER DPLL Bypassed
    CortxA8: Output:      ****  PER DPLL Locked
    CortxA8: Output:      ****  DISP PLL Config is in progress ..........
    CortxA8: Output:      ****  DISP PLL Config is DONE ..........
    CortxA8: Output:      ****  Subarctic ALL ADPLL Config for OPP == OPP100 is Done .........
    CortxA8: Output:      ****  Subarctic OPP100 DDR2 EMIF and PHY configuration is in progress.........
    CortxA8: Output: EMIF PRCM is in progress .......
    CortxA8: Output: EMIF PRCM Done
    CortxA8: Output: DDR PHY Configuration In progress
    CortxA8: Output:  Waiting for VTP Ready .......
    CortxA8: Output: DDR PHY CMD0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD1 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD2 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA1 Register configuration is in progress .......
    CortxA8: Output: emif Timing register configuration is in progress .......
    CortxA8: Output: emif Timing register configuration is done .......
    CortxA8: Output: DDR PHY Configuration done
    CortxA8: Output:      ****  Polar Subarctic DDR2 EMIF and PHY configuration is DONE ****
    CortxA8: Output:      ****  AM335x 15x15 EVM Initialization is Done ******************

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Apr 30 2012 03:42 AM
    Expert4435 points

    MWanger,

                      Unfortunately nothing strikes in my mind for this issue. can you debug (step in) and see which routine causes it to crash. May be that will help us to narrow down the possibilities.

    Regards

    Baskaran

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MWagner
    Posted by MWagner
    on Apr 30 2012 09:19 AM
    Prodigy170 points

    I'm getting very inconsistent behavior if I try to use breakpoints.
    If I try to use them, the debugger always ends in the weeds and sometimes I'll get an error message similar to the following:

    CortxA8: Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x80000088: (Error -1066 @ 0x333C) Unable to set requested breakpoint in memory. Verify that the breakpoint address is in writable memory. (Emulation package 5.0.520.0)

    So I have to single step from the entry point at 0x80000000.
    When I single step, I must execute every instruction (ie. must use "Step Into" for every instruction).
    "Step over" will result in the system going off in the weeds on a BL instruction.

    When I use single stepping, I can single step through init.asm and into start_boot.

    The program will always fail in CopyVectorTable at instruction 80002A28.


              CopyVectorTable:
    80002a10:   E92D4010 STMFD           R13!, {R4, R14}
    145           CP15VectorBaseAddrSet(AM335X_VECTOR_BASE);
    80002a14:   E59F4034 LDR             R4, $C$CON1
    80002a18:   E1A00004 MOV             R0, R4
    80002a1c:   EBFFF961 BL              CP15VectorBaseAddrSet
    147           for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]); count++)
    80002a20:   E59F002C LDR             R0, $C$CON2
    80002a24:   E3A0C00E MOV             R12, #14
    149               dest[count] = src[count];
              $C$DW$L$CopyVectorTable$3$B, $C$L1:
    80002a28:   E4901004 LDR             R1, [R0], #4
              $C$DW$L$CopyVectorTable$4$B, $C$DW$L$CopyVectorTable$3$E:
    80002a2c:   E4841004 STR             R1, [R4], #4
    147           for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]); count++)
    80002a30:   E25CC001 SUBS            R12, R12, #1
    80002a34:   1AFFFFFB BNE             $C$L1
    151       }


    Here are some core registers and their values before and after I execute LDR R1,[R0],#4 at 80002A28

    PC           0x80002A28        0xFFFFFFF0
    SP           0xA7FFFAC0        0xA7FFFFE8
    LR           0x80002A20        0x80002A34
    CPSR     0x60000193        0x60000197
    R0           0x80002C84       0x80002C88
    R1           0x80002C80       0xE59FF018

    For some reason, the PC goes off into the weeds, and the program fails here every time.

    One other thing that doesn't make sense to me is the SP.
    The link file places it at 0x87FFFFF0.
    I don't understand why it is being set to 0xA7FFFFxx when the program executes.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on May 01 2012 08:46 AM
    Intellectual330 points

    I am experiancing similar issues. I am not able to run the example programs in the debugger. However, I can run the NAND Flash writer program in the debugger. I am able to set break points and use the "step over" command. 

    I've noticed that the linker file for the Flash Writer is very simple, and differs from the linker command files for the examples projects. I see an warning that "cint00" has been changed, i believe by the line "-e Entry" in the linker files. Also, the stack is only 8 bytes, which looks odd to me.

    When I load any of the demo applications, the program just runs, it does not stop at main like the Flash Writer tool. If I suspend the target, it is at instruction"

     0002008c:   EAFFFFFE B               0x2008C

    AM335x am3359 am335x evm starerware
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MWagner
    Posted by MWagner
    on May 01 2012 11:43 AM
    Prodigy170 points

    If I load any of the example applications and run, when I hit the suspend button,

    the program is more often than not at an instruction similar to what Jon Young is seeing.

    (ie. EAFFFFFE      B    0x200xx)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on May 02 2012 15:32 PM
    Intellectual330 points

    I modified the buzzerBeep and gpioLCDBacklight linker files to put code only in internal RAM, and had success. I was able to run to main, single step, and set break points.

    I haven't had time to look into why code won't run from external DDR.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on May 02 2012 15:33 PM
    Intellectual330 points
    MEMORY
    {
        RAM0        : org = 0x402F8000  len = 0x00017fff /* OCM RAM0 */
    		DDR_MEM    	: org = 0x80000000  len = 0x7FFFFFF  /* RAM */
    }
    
    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
    
    SECTIONS
    {
        .init 	 : { 
        			 system.lib<init.obj> (.text) 
        		   } load > RAM0
      			
        .text    : load > RAM0              /* CODE                          */
        .data    : load > RAM0              /* INITIALIZED GLOBAL AND STATIC VARIABLES */
        .bss     : load > RAM0              /* UNINITIALIZED OR ZERO INITIALIZED */
                                               /* GLOBAL & STATIC VARIABLES */
        				RUN_START(bss_start)
    					RUN_END(bss_end) 
        .const   : load > RAM0              /* GLOBAL CONSTANTS              */
        .stack   : load > RAM0           /* SOFTWARE SYSTEM STACK         */
    }
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MWagner
    Posted by MWagner
    on May 03 2012 08:22 AM
    Prodigy170 points

    Changing the linker file to use internal RAM also works for me.

    I am able to load, set breakpoints and run the app using the Blackhawk debugger.

    Now the issue is to determine what's going on with running out of external DDR when using the debugger.

    Using the debugger with external DDR fails every time.

    If I disconnect the debugger and load my program onto an SD card and execute it out of external DDR, everything works fine.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on May 03 2012 09:08 AM
    Expert4435 points

    In this case only possibility could be gel not executed properly. But the gel log you embedded in earlier reply doesn't indicate any possible issue. Can you try with different board or emulator.

    Regards

    Baskaran

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on May 03 2012 15:28 PM
    Intellectual330 points

    There are 2 people experiancing the same issues, highly unlikely its a hardware issue.

    I am experiancing the same issues with an XDS100v3 debugger. My AM335x EVM baseboard is rev 1.1A.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gerard Belanger
    Posted by Gerard Belanger
    on May 07 2012 14:36 PM
    Intellectual765 points

    I'm not sure if the EVM initializes DDR for you before your download.  If not, then you may have to do that.

    On the BeagleBone, with CCSv5.1, after loading the debugger ccxml file, I run a script which writes the registers to set up the DDR.

    The script appears under the Scripts pulldown menu once the ccxml file is done initializing. Then I can download my app.

    Hope this helps.

    Gerry Belanger

    CCS v5.1 CCS beaglebone am3359
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use