From: Brad Griffis on
"Ajay" <ajaydsouza(a)gmail.com> wrote in message
news:1126245339.925826.61050(a)z14g2000cwz.googlegroups.com...
>I would just like to correct what I wrote above.
>
> On further testing I find that I can do a Debug > Reset CPU and Debug >
> Restart and it goes to main and I can run the program.
>
> I would like the program to begin automatically as a seperate embedded
> unit without me using CCS.
>
> How do I do this?
>

It sounds like your problem is that you don't have anything programmed into
address 0x3F7FF6. When you do the "boot from flash" mode the DSP jumps from
the boot ROM to address 0x3F7FF6 and expects a jump to _c_int00 instruction
to be there. Take a look at the CodeStartBranch file. It should have that
jump instruction. It should also have a pragma or assembly directive
telling the linker to put that in its own section. Check your linker
command file and make sure that section is being assigned to address
0x3F7FF6 so that your branch instruction gets placed there. If you look at
the example code from TI you'll notice they're doing exactly what I'm
describing and this is probably the missing thing.

Brad


From: Ajay on
I am using TI's CodeStartBranch.asm file itself with no modifications.

I have only modified the C Code of the Example file.

I have the same problem described above with the sample flash code
given by TI.

I need to do Debug > Reset CPU and Debug > Restart and it goes to main
and I can run the flash program. It too doesn't autostart.

Is it just me :(

From: Brad Griffis on
What is at address 0x3F7FF6? Open a memory window and have a look.


"Ajay" <ajaydsouza(a)gmail.com> wrote in message
news:1126516788.627335.226240(a)g14g2000cwa.googlegroups.com...
>I am using TI's CodeStartBranch.asm file itself with no modifications.
>
> I have only modified the C Code of the Example file.
>
> I have the same problem described above with the sample flash code
> given by TI.
>
> I need to do Debug > Reset CPU and Debug > Restart and it goes to main
> and I can run the flash program. It too doesn't autostart.
>
> Is it just me :(
>


From: Ajay on
At address 0x3F7FF6, I have 0x007F

In Disassembly window I have
3F7FF6 007F LB wd_disable

Lastly in CodeStartBranch.asm,

>***********************************************************************
>* File: CodeStartBranch.asm
>* Devices: TMS320F2812, TMS320F2811, TMS320F2810
>* Author: David M. Alter, Texas Instruments Inc.
>* History:
>* 09/08/03 - original (D. Alter)
>***********************************************************************

>WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0

> .ref _c_int00

>***********************************************************************
>* Function: codestart section
>*
>* Description: Branch to code starting point
>***********************************************************************
> .sect "codestart"

> .if WD_DISABLE == 1
> LB wd_disable ;Branch to watchdog disable code
> .else
> LB _c_int00 ;Branch to start of boot.asm in RTS library
> .endif

>;end codestart section


>***********************************************************************
>* Function: wd_disable
>*
>* Description: Disables the watchdog timer
>***********************************************************************
> .if WD_DISABLE == 1

> .text
>wd_disable:
> EALLOW ;Enable EALLOW protected register access
> MOVZ DP, #7029h>>6 ;Set data page for WDCR register
> MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
> EDIS ;Disable EALLOW protected register access
> LB _c_int00 ;Branch to start of boot.asm in RTS library

> .endif

>;end wd_disable
>***********************************************************************


> .end ; end of file CodeStartBranch.asm


Brad Griffis wrote:
> What is at address 0x3F7FF6? Open a memory window and have a look.
>
>

From: Ajay on
Additionally, when I do Restart, it goes to _c_int00 as I assume it
should.

However, it doesn't run.

My intention is to run the ezDSP as an independent system, disconnected
from the PC.

Is there something I am missing?