Author |
Message |
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Jul 01, 2008 1:10 am Post subject:
Debugging DSP code |
|
|
Hi,
Well I have some DSP code that doesn't work, surprise, surprise.
The code uses interrupts and dma on the Chameleon so I am pretty sure I cannot debug in the simulator and I am also pretty sure that the chameleon doesn't allow hardware debugging.
So the only way I can think of doing this is writing data to the coldfire using the host port and displaying this to the log with a printf.
Is this the way to go about it or is there a better way?
Cheers
Andy |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Jul 01, 2008 2:33 am Post subject:
|
|
|
I have no solutions but I'm quite interested in the problem ;¬). _________________ Kassen |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 11:04 am Post subject:
|
|
|
In think host port and printf() to the debugging console or LCD is best. I've also used the DACs in the past.
DJ
-- |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Jul 01, 2008 11:12 am Post subject:
|
|
|
Thanks Are |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 11:21 am Post subject:
|
|
|
You're welcome Andy! Sounds like you're in the thick of it, maxing out the fun
Just want to add that you can also use the simulator, but you will have to write stimuli files to represent the CODEC. At the very least the bit clock and frame sync are needed to drive the serial port which drives the DMA.
DJ
-- |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Jul 01, 2008 11:28 am Post subject:
|
|
|
Ok, I will look into stimuli files.
I have been playing with the Symphony Soundbite board today, I wish the chameleon supported hardware debugging. |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 11:35 am Post subject:
|
|
|
I think they're simply called I/O files in 56k sim speak.
While I agree that hardware debugging is nice, you can acheive much the same with the simulator, although it's a bit more work with the I/O files and all. Lucky for me I'm so old school that I actually prefer scopes, LEDs and printf()
DJ
-- |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Tue Jul 01, 2008 12:12 pm Post subject:
|
|
|
DrJustice wrote: | Lucky for me I'm so old school that I actually prefer scopes, LEDs and printf()
|
I remember the first processor board I ever built and how I had to debug those very first instructions with my old tube scope ... glad I needed that only once
But a good scope and some protocol spy (just a PC with a bit of custom hardware/software) are very useful tools still for the stuff that emulator and ICE will not help you with.
Is it possible to run code from RAM on the Chameleon? That would make it possible to have dynamic breakpoints. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 12:28 pm Post subject:
|
|
|
Blue Hell wrote: | Is it possible to run code from RAM on the Chameleon? That would make it possible to have dynamic breakpoints. |
All code in the host and DSP runs from RAM. The FLASH memory in the host computer is for boot code and offline storage of the soundskins. I suppose one could use compiled-in soft break points facilitated by macros, and then the host port (or the LCD even) for the console. That would not require any additional capabilities of the tool set, thus being a KISS compliant solution.
Edit to add: I wouldn't be surprised if there's some complete debugging monitor(s) written for the 56k already. But then again, writing your own monitor is always a good way to get to know the system...
DJ
-- Last edited by DrJustice on Tue Jul 01, 2008 12:34 pm; edited 1 time in total |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Tue Jul 01, 2008 12:31 pm Post subject:
|
|
|
DrJustice wrote: | All code in the host and DSP runs from RAM. |
_________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Jul 01, 2008 12:54 pm Post subject:
|
|
|
The DSP supports JTAG/OnCE but there seems to be no way of getting at it in the Chameleon. |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Jul 01, 2008 12:58 pm Post subject:
|
|
|
DrJustice wrote: | Blue Hell wrote: | Is it possible to run code from RAM on the Chameleon? That would make it possible to have dynamic breakpoints. |
All code in the host and DSP runs from RAM. The FLASH memory in the host computer is for boot code and offline storage of the soundskins. I suppose one could use compiled-in soft break points facilitated by macros, and then the host port (or the LCD even) for the console. That would not require any additional capabilities of the tool set, thus being a KISS compliant solution.
Edit to add: I wouldn't be surprised if there's some complete debugging monitor(s) written for the 56k already. But then again, writing your own monitor is always a good way to get to know the system...
DJ
-- |
Hi Are,
Are you saying that I can get at the front panel from DSP code without going through the host port?
Cheers
Andy |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 1:36 pm Post subject:
|
|
|
BobTheDog wrote: | Are you saying that I can get at the front panel from DSP code without going through the host port? |
Sorry, I wasn't being clear - I meant that the host could use the LCD and buttons for a simple monitor console (a detailed log could still be printed in the debug window, but it lacks keyboard input if I remember correctly).
DJ
-- |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Jul 01, 2008 1:38 pm Post subject:
|
|
|
DrJustice wrote: | Lucky for me I'm so old school that I actually prefer scopes, LEDs and printf()
|
I really like this stage where it does compile and run but does the wrong thing and you can debug by ear. Works best for controlling code, not so well for the DSP itself where a scope or printing a train of numbers works better but on the occasions where you can do it I find it lots of fun. _________________ Kassen |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Jul 01, 2008 2:02 pm Post subject:
|
|
|
Ahh.. the time is here to recite the DSP haiku by yon of the usenet:
silicon wafer moto
reluctant to pause in interrupt
still bleep to me sweetly
DJ
-- |
|
Back to top
|
|
|
lordavon
Joined: Jun 27, 2008 Posts: 45 Location: UK
|
Posted: Fri Jul 04, 2008 6:19 am Post subject:
|
|
|
actually, it's interesting.
It would seem that a DSP debug interface (jtag) would be a requirement for QiX, am I right?
Paul |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Fri Jul 04, 2008 6:22 am Post subject:
|
|
|
Absolutely. |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Fri Jul 04, 2008 6:23 am Post subject:
|
|
|
Being able to use the Symphony Studio dev env and debugger against it would be great. |
|
Back to top
|
|
|
lordavon
Joined: Jun 27, 2008 Posts: 45 Location: UK
|
Posted: Sat Jul 05, 2008 2:59 am Post subject:
|
|
|
Bob,
okdoky, noted.
Paul |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Sat Jul 05, 2008 4:12 am Post subject:
|
|
|
Actually I have started to go off "Symphony Studio", when building projects any asm errors are just reported as a single make problem and you have to delve around in the console output to find the actual error.
If you program in C/C++ the error/warning reporting works fine but not for asm!
The debugger is good though. |
|
Back to top
|
|
|
|