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.

ezDSP C5505 USB Stick Demo

Hi,

I am trying to get one of the demo programs for the ezDSP C5505 USB evaluation board running but I am having some trouble.  The demo program that I'm trying to run is one that was distibuted at the Embedded Systems Conference last week.  It is called USBKey_LED and was handed out by the folks from Texas Instruments.  Anyways, I loaded Code Composer Studio V4 and built the program without too much difficulty, but when I try to debug it, it appears to load and launch, but never gets around to calling my main() entry point.  I not sure exactly what it is doing before it calls main(),  but I would guess that it is initializing registers and setting up the interrupt vectors.  Does it run a bootloader before running my code?

Does anyone have any idea what program execution might be stuck on prior to calling main()? 

 

Thank you for your time.

 

Here is what I see when I halt the program:

 

Here is a portion of the map file that is generated:

******************************************************************************
              TMS320C55x Linker PC v4.3.2                     
******************************************************************************
>> Linked Mon Oct 05 17:31:32 2009

OUTPUT FILE NAME:   <USBKey_LED.out>
ENTRY POINT SYMBOL: "reset_isr"  address: 0000ca6e


MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
                        (bytes)   (bytes)    (bytes)   (bytes)
----------------------  --------  ---------  --------  --------  ----  --------
  VEC                   00000100   00000100  00000000  00000100  RW X
  DATA                  00000200   00007e00  00002440  000059c0  RW X
  PROG                  00008000   00010000  0000aabb  00005545  R  X


SECTION ALLOCATION MAP
(Addresses surrounded by []'s are displayed for convenience only!)

output                                                          attributes/
section   page  orgn(bytes) orgn(words) len(bytes) len(words)   input sections
--------  ----  ----------- ----------- ---------- ----------   --------------
.data        0   [ 00000200 ]  00000100          *   00000000   UNINITIALIZED

.sysmem      0   [ 00000200 ]  00000100          *   00001000   UNINITIALIZED
                 [ 00000200 ]  00000100          *   00001000   --HOLE--

.cio         0   [ 00002200 ]  00001100          *   00000120   UNINITIALIZED
                 [ 00002200 ]  00001100          *   00000120   rts55h.lib : trgmsg.obj (.cio)

vectors      0     00002500  [ 00001280 ] 00000200          *   NOLOAD SECTION
                   00002500  [ 00001280 ] 00000100          *   cslVC5505.lib : vectors.obj (vectors)
                   00002600  [ 00001300 ] 00000100          *   rts55h.lib : vectors.obj (vectors)

.text        0     00008000  [ 00004000 ] 00004f9b          *  
                   00008000  [ 00004000 ] 00001526          *   rts55h.lib : _printfi.obj (.text)
                   00009526  [ 00004a93 ] 00000554          *   cslVC5505.lib : csl_intc.obj (.text)
                   00009a7a  [ 00004d3d ] 00000538          *   rts55h.lib : trgdrv.obj (.text)
                   00009fb2  [ 00004fd9 ] 0000052a          *              : memory.obj (.text)
                   0000a4dc  [ 0000526e ] 00000518          *              : lowlev.obj (.text)
                   0000a9f4  [ 000054fa ] 00000367          *              : divd.obj (.text)
                   0000ad5b  [ 000056ad+] 00000338          *   csl_led_demo.obj (.text)
                   0000b093  [ 00005849+] 00000337          *   cslVC5505.lib : csl_gpt.obj (.text)
                   0000b3ca  [ 000059e5 ] 000002b7          *                 : csl_pll.obj (.text)
                   0000b681  [ 00005b40+] 0000026c          *   rts55h.lib : fopen.obj (.text)
                   0000b8ed  [ 00005c76+] 0000025c          *              : llmpy.obj (.text)
                   0000bb49  [ 00005da4+] 00000257          *              : addd.obj (.text)
                   0000bda0  [ 00005ed0 ] 000001ea          *              : cmpd.obj (.text)
                   0000bf8a  [ 00005fc5 ] 0000017b          *              : fputs.obj (.text)
                   0000c105  [ 00006082+] 0000014b          *              : mpyd.obj (.text)
                   0000c250  [ 00006128 ] 000000f3          *              : setvbuf.obj (.text)
                   0000c343  [ 000061a1+] 000000da          *              : _io_perm.obj (.text)
                   0000c41d  [ 0000620e+] 000000c8          *              : frcmpyd_div.obj (.text)
                   0000c4e5  [ 00006272+] 000000be          *              : trgmsg.obj (.text:CIO_breakpoint)
                   0000c5a3  [ 000062d1+] 000000ba          *              : fflush.obj (.text)
                   0000c65d  [ 0000632e+] 000000a2          *              : fputc.obj (.text)
                   0000c6ff  [ 0000637f+] 000000a0          *              : divul.obj (.text)
                   0000c79f  [ 000063cf+] 0000008c          *   cslVC5505.lib : csl_irqplug.obj (.text)
                   0000c82b  [ 00006415+] 00000079          *   rts55h.lib : ltoa.obj (.text)
                   0000c8a4  [ 00006452 ] 00000076          *              : fclose.obj (.text)
                   0000c91a  [ 0000648d ] 00000076          *              : frcmpyd.obj (.text)
                   0000c990  [ 000064c8 ] 00000070          *              : remul.obj (.text)
                   0000ca00  [ 00006500 ] 0000006e          *              : fixdli.obj (.text)
                   0000ca6e  [ 00006537 ] 0000006d          *   cslVC5505.lib : vectors.obj (.text)
                   0000cadb  [ 0000656d+] 0000006b          *   rts55h.lib : trgmsg.obj (.text)
                   0000cb46  [ 000065a3 ] 00000068          *              : fseek.obj (.text)
                   0000cbae  [ 000065d7 ] 00000067          *              : fltlid.obj (.text)
                   0000cc15  [ 0000660a+] 00000059          *              : atoi.obj (.text)
                   0000cc6e  [ 00006637 ] 00000056          *              : memcpy.obj (.text)
                   0000ccc4  [ 00006662 ] 0000004e          *              : printf.obj (.text)
                   0000cd12  [ 00006689 ] 0000004d          *              : autoinit.obj (.text)
                   0000cd5f  [ 000066af+] 0000004b          *              : remli.obj (.text)
                   0000cdaa  [ 000066d5 ] 00000049          *              : args_main.obj (.text)
                   0000cdf3  [ 000066f9+] 00000048          *              : divli.obj (.text)
                   0000ce3b  [ 0000671d+] 0000003e          *              : exit.obj (.text)
                   0000ce79  [ 0000673c+] 00000034          *              : boot.obj (.text)
                   0000cead  [ 00006756+] 0000002a          *              : fixdi.obj (.text)
                   0000ced7  [ 0000676b+] 0000002a          *              : udiv.obj (.text)
                   0000cf01  [ 00006780+] 00000022          *              : memccpy.obj (.text)
                   0000cf23  [ 00006791+] 0000001b          *              : isinf.obj (.text)
                   0000cf3e  [ 0000679f ] 00000014          *              : subd.obj (.text)
                   0000cf52  [ 000067a9 ] 00000013          *              : lmpy.obj (.text)
                   0000cf65  [ 000067b2+] 00000012          *              : _lock.obj (.text)
                   0000cf77  [ 000067bb+] 00000010          *              : negd.obj (.text)
                   0000cf87  [ 000067c3+] 0000000a          *              : remove.obj (.text)
                   0000cf91  [ 000067c8+] 00000007          *              : exit.obj (.text:CIO_breakpoint)
                   0000cf98  [ 000067cc ] 00000002          *              : vectors.obj (.text)
                   0000cf9a  [ 000067cd ] 00000001          *   --HOLE-- [fill = 20]

.stack       0   [ 0000cf9c ]  000067ce          *   00001800   UNINITIALIZED
                 [ 0000cf9c ]  000067ce          *   00001800   --HOLE--

.sysstack
*            0   [ 0000ff9c ]  00007fce          *   00001000   UNINITIALIZED
                 [ 0000ff9c ]  00007fce          *   00001000   --HOLE--

.bss         0   [ 00011f9c ]  00008fce          *   000002f8   UNINITIALIZED
                 [ 00011f9c ]  00008fce          *   00000119   rts55h.lib : defs.obj (.bss)
                 [ 000121ce ]  000090e7          *   000000d0              : trgdrv.obj (.bss)
                 [ 0001236e ]  000091b7          *   00000001              : fopen.obj (.bss)
                 [ 00012370 ]  000091b8          *   00000084   cslVC5505.lib : csl_intc.obj (.bss)
                 [ 00012478 ]  0000923c          *   00000071   rts55h.lib : lowlev.obj (.bss)
                 [ 0001255a ]  000092ad          *   00000001   --HOLE--
                 [ 0001255c ]  000092ae          *   00000007   csl_led_demo.obj (.bss)
                 [ 0001256a ]  000092b5          *   00000001   --HOLE--
                 [ 0001256c ]  000092b6          *   00000007   rts55h.lib : memory.obj (.bss)
                 [ 0001257a ]  000092bd          *   00000001   --HOLE--
                 [ 0001257c ]  000092be          *   00000004              : _lock.obj (.bss)
                 [ 00012584 ]  000092c2          *   00000004              : exit.obj (.bss)

.const       0   [ 0001258c ]  000092c6          *   00000216  
                 [ 0001258c ]  000092c6          *   00000101   rts55h.lib : ctype.obj (.const:__ctypes_)
                 [ 0001278e ]  000093c7          *   00000001   --HOLE-- [fill = 0]
                 [ 00012790 ]  000093c8          *   000000d5   csl_led_demo.obj (.const:.string)
                 [ 0001293a ]  0000949d          *   00000001   --HOLE-- [fill = 0]
                 [ 0001293c ]  0000949e          *   00000024   rts55h.lib : _printfi.obj (.const:.string)
                 [ 00012984 ]  000094c2          *   0000000c              : _printfi.obj (.const)
                 [ 0001299c ]  000094ce          *   00000008              : divd.obj (.const:_initial_approx$1)
                 [ 000129ac ]  000094d6          *   00000002              : fputs.obj (.const:.string)
                 [ 000129b0 ]  000094d8          *   00000002              : divd.obj (.const)
                 [ 000129b4 ]  000094da          *   00000002              : fltlid.obj (.const)

.cinit       0   [ 000129b8 ]  000094dc          *   00000082  
                 [ 000129b8 ]  000094dc          *   0000002d   rts55h.lib : lowlev.obj (.cinit)
                 [ 00012a12 ]  00009509          *   0000002a              : defs.obj (.cinit)
                 [ 00012a66 ]  00009533          *   0000000e   csl_led_demo.obj (.cinit)
                 [ 00012a82 ]  00009541          *   0000000a   rts55h.lib : _lock.obj (.cinit)
                 [ 00012a96 ]  0000954b          *   0000000a              : exit.obj (.cinit)
                 [ 00012aaa ]  00009555          *   00000004              : fopen.obj (.cinit)
                 [ 00012ab2 ]  00009559          *   00000004              : memory.obj (.cinit)
                 [ 00012aba ]  0000955d          *   00000001   --HOLE-- [fill = 0]

  • Dan,
    I notice that your entry point address and code size are different than my build of the demo code.  Did you follow all the steps in the project configuration for the CCSv4?  Did you make any changes to the code?

    You are correct that before the code reaches main(), other SW is run first.  The file vectors.asm is run first that does some initial HW config (entry point is here), then passes control to the embedded bootloader which sets up the C environment before branching to main().

    I'm not familiar with the error I see in the IDE snap shot above.  I'll need to research this.

    Regards.

  • TommyG,

    I followed the steps that were in the file ESC_2009_Hands_On_Lab_CSLOnly.ppt.

    I did not make any changes to the code.  I also tired a clean install and got the same result.

    I am using Code Composer Studio  Version: 4.0.0.16000 which is the one that came on the CD that was in the Box.

     

    Thanks for getting back to me so quickly.

     

     

  • Hi Dan,

    I think the problem may cause by the pre-flashed program in the EEPROM. I have seen this on one USB stick before. Here are the procedures after power up:

    1. The booloader in the ROM will run first. It will set up the registers and device initialization etc. 

    2. It will then search for a bootable perpherial in certain order (NOR, NAND, SPI EEPROM, I2C EEPROM etc.).

    3. If it find a valid boot image from any of the bootable perpherial, then it will try to load it from the bootable device into RAM and start to run the boot image

    4. If it cannot find a valid boot image from any of the perpherials, then it will loop in the bootloader.

    5. The entry point of the example program is reset_isr. It is in the vectors.asm file. It does very simple setup then go to _c_int00 (the default entry point in runtime support library) which will do more setups and then got to main().

    From you screen capture, your CPU is in the bootloader. There are two possibilities, either the bootable image in the EEPROM is faulty, or the execution of the program in EEPROM prevents the JTAG to load your example code into RAM.

    Please do the following to determine which of the two cases you are in:

    1. Unplug your USB stick, then power cycle you PC

    2. Plug in your USB stick. If you get the generated tones (1K or 2K) and LED blinks at two different speed, then your EEPROM image is good. Otherwise the EEPORM is faulty

    3. if the EEPROM image is OK, then you will need to make sure the CCS connects to the target configuration (USB stick) correctly. Click Target --> Launch TI Debugger. You should see the Disassemly Window to tell you where the program halts. If it shows the address bigger than 0xff0000, then it is in bootloader. If you see the address is between 0x4E000 and 0xFF0000, then the program is not running properly. If the address is between 0 and 0x4E000, then the program is running properly and the JTAG is halting CPU properly, then you can load your example program. It should halt at reset_isr(). Press F8 to run it.

    You can also try the other example (C5505_USBKey_LED_Demo_CSL_1.0_CCS4.0_Full.zip).

    Please let us know the result.

     

    Best regards,

    Ming