Jump to content
Sign in to follow this  
mp035

Icd2 Memory Read Problem For Local Variables

Recommended Posts

Bug description:

When trying to debug using ICD2, local variables can't be read, BoostC requests an out of range address from the ICD2, when stepping through a procedure, the requested address for a given variable changes with each step.

 

Steps to reproduce:

 

Open a (large?) project in MPLAB7.0.

 

Compile, program, and start the code using ICD2 as the debugger.

 

Halt the target.

 

Open the Watch window.

 

Select a symbol from the watch window that is a local variable, and "Add Symbol" to the watch.

 

Set a breakpoint in the procedure where the variable is used.

 

Run the program to the breakpoint.

 

Note that the variables address is "1FFFh", if you put several locals in the Watch window, they are all 1FFFh, and have the wrong value.

 

Step the target, (use "step over" from the source code window)

 

Note the output window for ICD2 - 2 ICD2 errors are displayed, one is "Out of range memory address requested" the other is "failed to sync memory", also note that the requested address changes after each step, even though the watch variable is the same.

 

Expected behaviour:

Watch window should display the correct value.

 

Is the problem 100% reproduceable:

I have only compiled 2 projects on boostc, and both of these produced the same problem, I have 2 screen dumps if it helps. Both projects were quite large, and used RAM and ROM past the first page/bank.

 

IDE version: MPLAB 7.0

Compiler: BoostC

Compiler version: First Commercial release (6.01?)

Target device: PIC16F877 and 16F877/A

OS: Win XP Home

 

 

Comments:

 

Regards,

Mark Pointing

The Electronic Co.

Share this post


Link to post
Share on other sites

Mark,

 

What happens when the program is run under MPLABs simulator?

 

I have seen a few problems with variable monitoring using ICD, they look like probelms with MPLAB/ICD2.

 

Please send a project demonstrating the issue to support@picant.com.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Dave,

I gave the project a run on MPLAB SIM. It does the same thing. I wil send a copy of the project.

 

Mark Pointing.

 

Mark,

 

What happens when the program is run under MPLABs simulator?

 

I have seen a few problems with variable monitoring using ICD, they look like probelms with MPLAB/ICD2.

 

Please send a project demonstrating the issue to support@picant.com.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Mark,

 

The coff file ouput from boostlink looks correct.

I used two projects with the same fixed address data, one was your program one slightly modified.

The small project worked exactly as expected.

 

Two thing I found that cause restricted memory to be displayed:

1) The data is declared as local, move these declarations to global scope and no problems occur.

2) The program needs to be sizeable, a small program does not suffer from this problem.

3) The data address was not sigficant.

 

I can only think that the problem is within MPLAB :)

My best suggestion is move the data of interest to global scope while debugging using ICD2.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...