DSPRelated.com
Forums

C672X unable to Run

Started by iddq...@gmail.com May 16, 2008
Hi

I have my code built and loaded to my C672X board. However, when I hit RUN button, it doesn't run at all. By that I mean the RUN button does work, but it halted right away. From the disassembly window, I can see it runs two to three instructions each time I hit the RUN button. But there is no change at all on any variable when I observe the memory. It seems like it just jumps two to three instructions each time the RUN button hit and doing nothing.

The hardware is fine. The input powers' level are currect for DVDD, CVDD & PLLHV. The oscillator is running. The EMIF clock is running. The reset is at high. The emulator clock is running.

The software is fine. The emulator is properly connected to the target board. The CCS can detect the target silicon version. All chip registers, on-chip memories and SDRAM are accessible by CCS. The code is complied without bug. The code is a very simple test code, which runs well on the CCS cpu simulator. I have no clue what's going on. Anyone have any idea what might be going wrong? All suggestions are welcome. Any help would be appreciated.

Thanks

Peter
Peter-

> I have my code built and loaded to my C672X board. However, when I hit
> RUN button, it doesn't run at all. By that I mean the RUN button does work,
> but it halted right away. From the disassembly window, I can see it runs
> two to three instructions each time I hit the RUN button. But there is no
> change at all on any variable when I observe the memory. It seems like it
> just jumps two to three instructions each time the RUN button hit and
> doing nothing.
>
> The hardware is fine. The input powers' level are currect for DVDD, CVDD
> & PLLHV. The oscillator is running. The EMIF clock is running. The reset
> is at high. The emulator clock is running.
>
> The software is fine. The emulator is properly connected to the target
> board. The CCS can detect the target silicon version. All chip registers,
> on-chip memories and SDRAM are accessible by CCS. The code is complied
> without bug. The code is a very simple test code, which runs well on the
> CCS cpu simulator. I have no clue what's going on. Anyone have any idea
> what might be going wrong? All suggestions are welcome. Any help would
> be appreciated.

So you want to "Run" before you can crawl :-) Why aren't you using that 'other
button' (single-step)? Let only one instruction run at a time, go step-by-step and
observe the processor state carefully afer each. You will soon find whatever is
wrong.

-Jeff
Peter-
> Thanks for your reply.The Run button is already doing two to three instructions at
> a time, and not really execute anything.I have try signal-step, but the result is
> still the same. It can't be the code problem. The test code is just too simple to
> have mistake. Is posible there any register setup problem can cause this situation?

There could be many different problems. But why are we guessing? It's a simple
debug process.

Just make the first instruction a NOP, and then do just ONE single-step. What
happens?

If you can't figure out this much, then you're in over your head and you need to back
way up and do some tutorials, DSK examples, etc.

-Jeff

PS. Please post to the group, not to me.
> 2008/5/16 Jeff Brower :
>
> Peter-
>
> > I have my code built and loaded to my C672X board. However, when I hit
> > RUN button, it doesn't run at all. By that I mean the RUN button does
> work,
> > but it halted right away. From the disassembly window, I can see it
> runs
> > two to three instructions each time I hit the RUN button. But there is
> no
> > change at all on any variable when I observe the memory. It seems like
> it
> > just jumps two to three instructions each time the RUN button hit and
> > doing nothing.
> >
> > The hardware is fine. The input powers' level are currect for DVDD,
> CVDD
> > & PLLHV. The oscillator is running. The EMIF clock is running. The
> reset
> > is at high. The emulator clock is running.
> >
> > The software is fine. The emulator is properly connected to the target
> > board. The CCS can detect the target silicon version. All chip
> registers,
> > on-chip memories and SDRAM are accessible by CCS. The code is complied
> > without bug. The code is a very simple test code, which runs well on
> the
> > CCS cpu simulator. I have no clue what's going on. Anyone have any idea
>
> > what might be going wrong? All suggestions are welcome. Any help would
> > be appreciated.
>
> So you want to "Run" before you can crawl :-) Why aren't you using that
> 'other
> button' (single-step)? Let only one instruction run at a time, go
> step-by-step and
> observe the processor state carefully afer each. You will soon find
> whatever is
> wrong.
>
> -Jeff
>
Jeff

ONE single-step does nothing, just like RUN.

Peter

Hi
>
>I have my code built and loaded to my C672X board. However, when I hit RUN button, it doesn't run at all. By that I mean the RUN button does work, but it halted right away. From the disassembly window, I can see it runs two to three instructions each time I hit the RUN button. But there is no change at all on any variable when I observe the memory. It seems like it just jumps two to three instructions each time the RUN button hit and doing nothing.
>
>The hardware is fine. The input powers' level are currect for DVDD, CVDD & PLLHV. The oscillator is running. The EMIF clock is running. The reset is at high. The emulator clock is running.
>
>The software is fine. The emulator is properly connected to the target board. The CCS can detect the target silicon version. All chip registers, on-chip memories and SDRAM are accessible by CCS. The code is complied without bug. The code is a very simple test code, which runs well on the CCS cpu simulator. I have no clue what's going on. Anyone have any idea what might be going wrong? All suggestions are welcome. Any help would be appreciated.
>
>Thanks
>
>Peter
>
am running a simple loop program on C6713 processor.Am storing the adc
values in array but when i plot the values it is giving wrong values.How the
values read from the adc can be converted into proper float numbers

On Fri, May 16, 2008 at 7:07 PM, Jeff Brower wrote:

> Peter-
> > I have my code built and loaded to my C672X board. However, when I hit
> > RUN button, it doesn't run at all. By that I mean the RUN button does
> work,
> > but it halted right away. From the disassembly window, I can see it runs
> > two to three instructions each time I hit the RUN button. But there is no
> > change at all on any variable when I observe the memory. It seems like it
> > just jumps two to three instructions each time the RUN button hit and
> > doing nothing.
> >
> > The hardware is fine. The input powers' level are currect for DVDD, CVDD
> > & PLLHV. The oscillator is running. The EMIF clock is running. The reset
> > is at high. The emulator clock is running.
> >
> > The software is fine. The emulator is properly connected to the target
> > board. The CCS can detect the target silicon version. All chip registers,
> > on-chip memories and SDRAM are accessible by CCS. The code is complied
> > without bug. The code is a very simple test code, which runs well on the
> > CCS cpu simulator. I have no clue what's going on. Anyone have any idea
> > what might be going wrong? All suggestions are welcome. Any help would
> > be appreciated.
>
> So you want to "Run" before you can crawl :-) Why aren't you using that
> 'other
> button' (single-step)? Let only one instruction run at a time, go
> step-by-step and
> observe the processor state carefully afer each. You will soon find
> whatever is
> wrong.
>
> -Jeff
>
>
Peter-

> ONE single-step does nothing, just like RUN.

Was your first instruction a NOP? And the little yellow arrow in CCS is pointing to
the next (second) instruction?

-Jeff
> Hi
> >
> >I have my code built and loaded to my C672X board. However, when I hit RUN button, it doesn't run at all. By that I mean the RUN button does work, but it halted right away. From the disassembly window, I can see it runs two to three instructions each time I hit the RUN button. But there is no change at all on any variable when I observe the memory. It seems like it just jumps two to three instructions each time the RUN button hit and doing nothing.
> >
> >The hardware is fine. The input powers' level are currect for DVDD, CVDD & PLLHV. The oscillator is running. The EMIF clock is running. The reset is at high. The emulator clock is running.
> >
> >The software is fine. The emulator is properly connected to the target board. The CCS can detect the target silicon version. All chip registers, on-chip memories and SDRAM are accessible by CCS. The code is complied without bug. The code is a very simple test code, which runs well on the CCS cpu simulator. I have no clue what's going on. Anyone have any idea what might be going wrong? All suggestions are welcome. Any help would be appreciated.
> >
> >Thanks
> >
> >Peter
Peter,

On 5/16/08, i...@gmail.com wrote:
>
> Jeff
>
> ONE single-step does nothing, just like RUN.
>
> Peter
>

Let's start with the basics.
1. Does this happen with every program, or just one program??
2. Where does the PC point after a load??
3. Does the instruction packet that the PC points to consist of valid
instructions??
4. Are you loading into internal or external memory??

mikedunn

Hi
> >
> >I have my code built and loaded to my C672X board. However, when I hit RUN
> button, it doesn't run at all. By that I mean the RUN button does work, but
> it halted right away. From the disassembly window, I can see it runs two to
> three instructions each time I hit the RUN button. But there is no change at
> all on any variable when I observe the memory. It seems like it just jumps
> two to three instructions each time the RUN button hit and doing nothing.
> >
> >The hardware is fine. The input powers' level are currect for DVDD, CVDD &
> PLLHV. The oscillator is running. The EMIF clock is running. The reset is at
> high. The emulator clock is running.
> >
> >The software is fine. The emulator is properly connected to the target
> board. The CCS can detect the target silicon version. All chip registers,
> on-chip memories and SDRAM are accessible by CCS. The code is complied
> without bug. The code is a very simple test code, which runs well on the CCS
> cpu simulator. I have no clue what's going on. Anyone have any idea what
> might be going wrong? All suggestions are welcome. Any help would be
> appreciated.
> >
> >Thanks
> >
> >Peter
> >
>
> >
> >

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Hi Mikedunn

Really thanks for your reply.
1. It happens to every program.
2. The PC is point to 0x10002060 which is where the c_int00 is.
3. yes
4. I have tried to load the code into both internal or external memory, but the result is the same.

By the way, I don't know if this matter, but I didn't use any gel file while running the program. Would this cause the problem I have?

Thank you

Best regards
Peter

>Let's start with the basics.
>1. Does this happen with every program, or just one program??
>2. Where does the PC point after a load??
>3. Does the instruction packet that the PC points to consist of valid
>instructions??
>4. Are you loading into internal or external memory??

>mikedunn
iddqd,

The following is a slightly simplified technique for debugging the execution path
This is assuming the board is set to power up the CPU in microprocessor mode?

If you compile with full debug info..
Then load the code (be sure the .cmd file matches the addressing of the code)
Then click Debug/reset CPU
Then click View/Registers (check that the PC and SP registers are correct for a CPU reset)
Then click View/Call Stack
Then Click View/mixed Source/Asm
Then Click View/memory (setting the view address to the jump address in Flash)
Does the jump address contain the address of your program entry point?
If not your link needs tweaking
Then Click View/Memory (setting the view address to your main() function
Does your main function exist at the (.map file) indicated address?
If not, your link needs tweaking
otherwise..
Click Debug/Go Main
Check that the code actually stepped to the main() function.
(use the .map file and the PC register)
If the code executed to the main() function; use the F11 key to step through the code, one
instruction at a time
R. Williams

---------- Original Message -----------
From: i...@gmail.com
To: c...
Sent: Fri, 16 May 2008 08:37:49 -0400
Subject: [c6x] C672X unable to Run

> Hi
>
> I have my code built and loaded to my C672X board. However, when I hit RUN button, it
> doesn't run at all. By that I mean the RUN button does work, but it halted right away.
> From the disassembly window, I can see it runs two to three instructions each time I hit
> the RUN button. But there is no change at all on any variable when I observe the memory.
> It seems like it just jumps two to three instructions each time the RUN button hit and
> doing nothing.
>
> The hardware is fine. The input powers' level are currect for DVDD, CVDD & PLLHV. The
> oscillator is running. The EMIF clock is running. The reset is at high. The emulator clock
> is running.
>
> The software is fine. The emulator is properly connected to the target board. The CCS can
> detect the target silicon version. All chip registers, on-chip memories and SDRAM are
> accessible by CCS. The code is complied without bug. The code is a very simple test code,
> which runs well on the CCS cpu simulator. I have no clue what's going on. Anyone have any
> idea what might be going wrong? All suggestions are welcome. Any help would be appreciated.
>
> Thanks
>
> Peter
------- End of Original Message -------
Hi Richard

Thanks for the debuggubg technique you posted.

The PC points to the correct address when reseting the CPU and loading the program.
The stack looks right. It shows the instruction where the PC currently points to.
The main() is inside the indicated address (from .map), it should be right.

But when I click the "Go Main", CCS gives the following error message:
{
Trouble Setting Breakpoint with the Action "Terminate GEL_Go()" at 0x10002120: Error 0x00000008/-2042 Error during: Break Point, Cannot set/verify breakpoint at 0x10002120 Sequence ID: 7 Error Code: -2042 Error Class: 0x00000008
Breakpoint Manager: Retrying with a Legacy Hardware breakpoint
}

I have done some research on this, but can't find any answer.
Does anyone have an idea what might be going wrong?
P.S. I didn't use GEL file nor any berakpoint.

Best regards
Peter
>2008/5/17 Richard Williams :
>iddqd,

>The following is a slightly simplified technique for debugging the >execution path
>This is assuming the board is set to power up the CPU in microprocessor >mode?
>
>If you compile with full debug info..
>Then load the code (be sure the .cmd file matches the addressing of the >code)
>Then click Debug/reset CPU
>Then click View/Registers (check that the PC and SP registers are correct >for a CPU reset)
>Then click View/Call Stack
>Then Click View/mixed Source/Asm
>Then Click View/memory (setting the view address to the jump address in >Flash)
>Does the jump address contain the address of your program entry point?
>If not your link needs tweaking
>Then Click View/Memory (setting the view address to your main() function
>Does your main function exist at the (.map file) indicated address?
>If not, your link needs tweaking
>otherwise..
>Click Debug/Go Main
>Check that the code actually stepped to the main() function.
>(use the .map file and the PC register)
>If the code executed to the main() function; use the F11 key to step >through the code, one
>instruction at a time
>R. Williams