2020/10/31 00:50:07
NICK7
Hi
I am trying to simulate with MPLABx 5.40 a simple assemply program on PIC16LF877A. After strart debuging when pause the execution the following message occures:
"No source code lines were found at current PC 0xf. Open program memory view to see instruction code disassembly."
But when I open the program memory viwer I see the correct opcode to that address.
Attached you can find the program.
 
PS when I simulate using c code simulation is runing.
 
Sytem Configuration:

Product Version: MPLAB X IDE v5.40
Java: 1.8.0_202; OpenJDK 64-Bit Server VM 25.202-b05
Runtime: OpenJDK Runtime Environment 1.8.0_202-b05
System: Windows 10 version 10.0 running on amd64; Cp1253; en_US (mplab)
XC8 2.20

 
Thanks Nick

Attachment(s)

Base.zip (7.78 KB)
2020/10/31 00:58:01
ric
As many have reported, pic-as is still going through some teething issues.
It might help to submit your project and report as a support ticket.
http://microchip.com/support
 
However, MPLABX 5.45 has been released, so try the new version first.
Personally, I'd drop back to MPLABX 5.35 and MPASM, and wait until pic-as matures a bit more.
 
 
2020/10/31 14:46:40
1and0
ric
Personally, I'd drop back to MPLABX 5.35 and MPASM, and wait until pic-as matures a bit more.

For that old part in assembly, I'd drop back to MPLAB v8.92. ;)
 
2020/10/31 16:30:06
David
1and0
ric
Personally, I'd drop back to MPLABX 5.35 and MPASM, and wait until pic-as matures a bit more.

For that old part in assembly, I'd drop back to MPLAB v8.92. ;)
 




And why not Ask Noah on the Ark :) How old is the 877 now :)
2020/11/02 09:27:30
GeorgePauley
Hey, it's a 16F877A!  Those are newer than the old 16F877's.
 
Address 0xF sounds like it will be in the compiler's start up code.  This is code that the compiler inserts before your code to initialize some things. 

When you use C debugging there is a map of every one of your source lines to the corresponding program memory addresses.  When MPLAB halts it looks at the current PIC address, consults that map, and then puts the green arrow in the editor window on the correct line of your source.  But not every address actually maps to one of your source lines.  For example, compiler start up code doesn't map to your source.

The message you are getting from MPLAB is trying to tell you that, for the given PIC address, it doesn't know what source line to put the green arrow in the editor window at.  It's not an error per se.
2020/11/02 11:23:03
1and0
GeorgePauley
Hey, it's a 16F877A!  Those are newer than the old 16F877's.
 
Address 0xF sounds like it will be in the compiler's start up code.  This is code that the compiler inserts before your code to initialize some things. 

OP's source code is pure assembly code, NOT C!  Besides, I'd expect location 0xF to be ISR code, if there is one.
 
With that said, OP's source code is written in MPASM format in absolute mode, but with <xc.inc> include file. ;)  No wonder MPLAB X 5.40 and its PIC-AS do not like it -- it's no longer supporting MPASM!
 
2020/11/02 13:49:33
dan1138
1and0
GeorgePauley
Hey, it's a 16F877A!  Those are newer than the old 16F877's.
 
Address 0xF sounds like it will be in the compiler's start up code.  This is code that the compiler inserts before your code to initialize some things. 

... OP's source code is written in MPASM format in absolute mode, but with <xc.inc> include file ....

So the OP needs to deal with the problems created by Microchip that are:
  1. MPLABX v5.40 and later does not support MPASM
  2. The pic-as(v2.xx) tool chain integration with MPLABX is awful
To be of some help to the OP I have attached the code from port#1 ported to an MPLABX v5.40 project using the pic-as(v2.xx) tool chain.
 
When all of the plug-in updates for the pic-as(v2.xx) tool chain are installed in MPLABX this code runs as expected in the simulator.
 
© 2021 APG vNext Commercial Version 4.5

Use My Existing Forum Account