Assembler source not available in debugger
I have an xC8 projecting for PIC18F27K40 in MPLABX using mostly .c. Have added an assembler module .s wich compiles and links ok using xc8-cc.exe v2.10.
The problem is when compiling for debug and running in simulator debugger, when stepping from C code into the assembler module the source code does not appear. Using Windows/Debugger/Disassembly the following is displayed:
!Source not found, file: <location>/MyProject.X/2
I don't know where the "2" comes from, I'm guessing it is supposed to be the name of the .s module which is located there. Using Windows/Target Memory View/Program Memory I can get the raw assembly and step through, just no listing is available.
I notice that for .c files xc8 generates "pcode" .p1 for the linker, whereas for .s it generates conventional .o object code. Get the same result for both COFF and ELF. I'm guessing either the .o does not include debug info, or it is incompatible with xc8's debug info in the pcode files, or there is a bug filling in "2" as the file name, or I need some magic pixie dust. Has anyone successfully debugged a .s module within an xc8 project?
Related question: there seems no way to build .asm files using mpasm and link in with C modules, within an xc8 project; and not even sure mpasm .o is compatible with c18 linker. This used to be straightforward with C18 toolchain but mpasm does not appear in the xc8 toolchain - even though xc8 release notes advertize mpasm is bundled. Now it seems the only option is to use xc8's assembler support, which seems spotty - for example lfsr and btg do not seem to be supported, and it uses different syntax to regular .asm. It is true that we can't use mpasm with c18?