CW 7.1.1a on M52259DEMOKIT -- BDM, breakpoints, timer ISRs...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW 7.1.1a on M52259DEMOKIT -- BDM, breakpoints, timer ISRs...

Jump to solution
2,144 Views
RichTestardi
Senior Contributor II
Sorry, I decided this might be better placed in this forum, since it is really a BDM question/issue...
 
Hi all,
 
I am wondering about something I saw while debugging my program on CW 7.1.1a on the M52259DEMOKIT board...
 
This board apparently uses a new BDM, as I have to specify "ColdFire v2-v4 JM60 OSBDM" to debug it.
 
In general, the new BDM seems to work, but it has one strange behavior I am wondering if I can work around.
 
With the old PEMICRO USB BDM, when I hit a breakpoint in non-ISR code (with ISRs enabled) and then single stepped, I stepped following the expected code path -- i.e., I didn't instantly step into my 1ms PIT timer interrupt service routine.
 
With the new ColdFire v2-v4 JM60 OSBDM, on the other hand, if I break into my code anywhere other than in my PIT timer interrupt service routine, the first single step puts me right there!
 
I managed to get all my debugging done by setting breakpoints, rather than single stepping, but this seems like something that should be configurable, at least...
 
Is there a way to tell the debugger not to just step me into my PIT timer ISR every time I step?  Or might I just have something misconfigured?
 
As a related issue, when I insert a breakpoint in my code, I always hit it *twice* now -- once apparently on entry to the PIT timer ISR, and once apparently on return.  (I've gotten used to this and just always continue once when I hit a breakpoint.)
 
Thanks for any help!
 
Other than this, the port to the MCF52259 took less than a day, and it seems fast -- about 5% faster than a MCF52221 clock-for-clock, which I can't really explain but will not complain about!
 
-- Rich
 
Labels (1)
0 Kudos
1 Solution
382 Views
RichTestardi
Senior Contributor II

Just in case anyone ends up here, I thought I'd post a resolution...

 

I finally added this flag to my PIT initialization:

 

  MCF_PIT_PCSR_DBG

 

And now the debugger doesn't just step into the timer isr on the M52259DEMOKIT.

 

I'm not sure why I would ever want any other behavior.

 

-- Rich

View solution in original post

0 Kudos
3 Replies
383 Views
RichTestardi
Senior Contributor II

Just in case anyone ends up here, I thought I'd post a resolution...

 

I finally added this flag to my PIT initialization:

 

  MCF_PIT_PCSR_DBG

 

And now the debugger doesn't just step into the timer isr on the M52259DEMOKIT.

 

I'm not sure why I would ever want any other behavior.

 

-- Rich

0 Kudos
382 Views
ChrisJohns
Contributor I
hi Rich,

At a guess I would say the mask interrupt bit is not being set in the CSR register when stepping an instruction. This all means you are not at fault and I suspect the low level BDM code is not correct.

I had not heard of OSBDM before now. Where can I locate the OSBDM source code for the host and target ?

Regards
Chris


0 Kudos
382 Views
RichTestardi
Senior Contributor II
Hi Chris,
 
The extent of what I know is there are a couple of directories on my PC with what look like the BDM (object) files:
 
C:\Program Files\Freescale\CodeWarrior for ColdFire V7.1\Drivers\osbdm
C:\Program Files\Freescale\CodeWarrior for ColdFire V7.1\bin\Plugins\Support\ColdFire\OSBDM
 
I suspect these were either part of CW7.1 or CW7.1.1, since the M52259DEMOKIT Quick Start Guide says:
 

Working with

OSBDM

OSBDM = Open Source

Background Debug Mode

Ensure your CodeWarrior projects are

setup correctly for the on board OSBDM

debugger circuit. Type Alt+F7 to open

the Project Settings window. Click

Remote Debugging and select ColdFire

v2-v4 JM60 OSBDM. If this option is not

available, check that CodeWarrior 7.1 is

installed correctly.

 
Thanks.
 
-- Rich
 
 
 
0 Kudos