electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Instruments and Equipment » Chameleon
Debugging DSP code
Post new topic   Reply to topic
Page 1 of 1 [20 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Tue Jul 01, 2008 1:10 am    Post subject: Debugging DSP code Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Jul 01, 2008 2:33 am    Post subject: Reply with quote  Mark this post and the followings unread

I have no solutions but I'm quite interested in the problem ;¬).
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 11:04 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Tue Jul 01, 2008 11:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Are
Back to top
View user's profile Send private message
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 11:21 am    Post subject: Reply with quote  Mark this post and the followings unread

You're welcome Andy! Sounds like you're in the thick of it, maxing out the fun Very Happy

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
View user's profile Send private message Visit poster's website
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Tue Jul 01, 2008 11:28 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 11:35 am    Post subject: Reply with quote  Mark this post and the followings unread

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() Laughing

DJ
--
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20284
Location: The Netherlands, Enschede
Audio files: 143
G2 patch files: 318

PostPosted: Tue Jul 01, 2008 12:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

DrJustice wrote:
Lucky for me I'm so old school that I actually prefer scopes, LEDs and printf() Laughing


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 Wink

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
Back to top
View user's profile Send private message Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 12:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20284
Location: The Netherlands, Enschede
Audio files: 143
G2 patch files: 318

PostPosted: Tue Jul 01, 2008 12:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

DrJustice wrote:
All code in the host and DSP runs from RAM.


Cool

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Tue Jul 01, 2008 12:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

The DSP supports JTAG/OnCE but there seems to be no way of getting at it in the Chameleon.
Back to top
View user's profile Send private message
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Tue Jul 01, 2008 12:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 1:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Jul 01, 2008 1:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

DrJustice wrote:
Lucky for me I'm so old school that I actually prefer scopes, LEDs and printf() Laughing


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
View user's profile Send private message Send e-mail Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2031
Location: Morokulien
Audio files: 3

PostPosted: Tue Jul 01, 2008 2:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
lordavon



Joined: Jun 27, 2008
Posts: 45
Location: UK

PostPosted: Fri Jul 04, 2008 6:19 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Fri Jul 04, 2008 6:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Absolutely.
Back to top
View user's profile Send private message
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Fri Jul 04, 2008 6:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Being able to use the Symphony Studio dev env and debugger against it would be great.
Back to top
View user's profile Send private message
lordavon



Joined: Jun 27, 2008
Posts: 45
Location: UK

PostPosted: Sat Jul 05, 2008 2:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Bob,

okdoky, noted.

Paul
Back to top
View user's profile Send private message Visit poster's website
BobTheDog



Joined: Feb 28, 2005
Posts: 3830
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Sat Jul 05, 2008 4:12 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [20 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Instruments and Equipment » Chameleon
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
AmbiphonicDSP

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use