I can't simulate with MPLAB Sim

Status
Not open for further replies.

ljcox

Well-Known Member
I recently downloaded V7.21 and can use it to simulate one programme, but when I try to simulate a second one, nothing happens upon pressing F6 or Debugger>Reset>Processor Reset.

The build window states the following:-

Make: The target "D:\Projects32\pic_b.o" is out of date.
Executing: "D:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F84A "pic_b.asm" /l"pic_b.lst" /e"pic_b.err" /w2
Loaded D:\Projects32\pic_b.COD.
BUILD SUCCEEDED: Wed Oct 12 19:37:00 2005

I cannot find the file"pic_b.o" in Projects 32.

Any advice will be appreciated.
 
Hiya Len,
When I use mplab I always paste in the code I'm working on if the code has written previous to the project I'm working on, then build it which lets me know of any errors and warnings. Then when it builds ok I've never had a problem with simulator. I downloaded the 7.21 version the other day and did notice it's an interm release so people can see the new features of mplab. I'm currently using version 7.10 and after a steep re-learning curve I'm reluctant to upgrade to the latest version as my motto is " if it aint broke don't fix it". As soon as I get time I'll try out real time de-bugging with my new ICD2 clone.

Cheers Bryan

P.S. I'll get those chips off to you tomorrow as I've been flatout this week
 

I think you can't use the simulator on an object file, unless it's linked to an actual HEX program?...
 
bryan1 said:
I downloaded the 7.21 version the other day and did notice it's an interm release so people can see the new features of mplab.

Not really, it's an interim release that fixes bugs from earlier versions.

bryan1 said:
I'm reluctant to upgrade to the latest version as my motto is " if it aint broke don't fix it".

But it is broken in this case Although if you don't encounter any bugs in your particular uses of 7.10, it might be justified to stick with it for a while, at least until more "meaningful" updates are applied to MPLAB.
 
Joel Rainville said:
I think you can't use the simulator on an object file, unless it's linked to an actual HEX program?...
Thanks for the comment. I can simulate the other file (PIC_A.asm) that I loaded (in a different Project) and I don't why there is a difference.

I looked at Project>Build Project and compared the various setting in the tabs and there are some differences. I tried to change them to correspond with the PIC_A case, but could not change all of the settings.

So, now I'll prepare another project and use another .asm file to see what happens.
 
ljcox said:
Thanks for the comment. I can simulate the other file (PIC_A.asm) that I loaded (in a different Project) and I don't why there is a difference.

Technically, you're not simulating an ASM file, that's just the source. You're simulating the execution of a complete program, which an object file isn't. You simulate assembled/compiled HEX files, and MPLAB's debugger shows you the corresponding source code line in the ASM file. It's rather important to understand that subtlety.


It looks like you are using random code from other people and use them to try the simulator?... Why don't you try to write your own code and create your own projects and use other projects as references only? It might soften the learning curve quite a bit.
 
 
I discovered the reason. I had not selected the MPLAB Sim as the simulator using Debugger>Select Tool.

Thanks for your assistance.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…