Working on a program that was working prior to an MPLab fail. Now program will not build and lots of #113 (Symbol no previously defined) and #126 (Argument out of range ) errors.
Language: MPASM
Assembler: MPLab 8.92
MCU: PIC16F1829 @ 5V
Programmer: ICD3
Sequence of events:
Project involves controlling the AS3935 lightning detector. I typically work with a single project folder. As I develop various versions of the program, they go in the same project folder and are added or removed from the project tree as needed. When changing the active/working .asm file, I go to build options and disable case sensitivity. This particular project now has about 6 versions of the assembly file.
Each program version has the same set of macros. They include a delay macro and stack-based print macro from Mike -- K8LH. There are a couple of other macros that I wrote. The macros work in every version of this program.
As I was doing hardware debugging of the current program MPLab stopped and gave an message that source code had changed and gave me the option of "rebuilding now." Source code hadn't changed, but I agreed to the rebuild. All hell then broke loose.
Cannot get the program to build. There are a slew of #113 and #126 errors. All of which point to calls from the macros.
The Watch window is a complete mess:
Those missing registers are all defined:
What I have tried:
1) Turned everything off, disconnected, exited and reopened MPLab a few times. Same result.
2) Removed current version of program from the project tree and re-installed most recent previous version. Version has same macros . That version built fine. Reversed that process and re-installed current version -- still fails.
3) Tried going to release mode and programmer. Still doesn't work.
Assumption:
MPLab acts as if it has inserted some flag or block that is preventing it from loading/reading the entire code. Is there any way to look at what it may have done and forcibly make it read the whole code?
John
Language: MPASM
Assembler: MPLab 8.92
MCU: PIC16F1829 @ 5V
Programmer: ICD3
Sequence of events:
Project involves controlling the AS3935 lightning detector. I typically work with a single project folder. As I develop various versions of the program, they go in the same project folder and are added or removed from the project tree as needed. When changing the active/working .asm file, I go to build options and disable case sensitivity. This particular project now has about 6 versions of the assembly file.
Each program version has the same set of macros. They include a delay macro and stack-based print macro from Mike -- K8LH. There are a couple of other macros that I wrote. The macros work in every version of this program.
As I was doing hardware debugging of the current program MPLab stopped and gave an message that source code had changed and gave me the option of "rebuilding now." Source code hadn't changed, but I agreed to the rebuild. All hell then broke loose.
Cannot get the program to build. There are a slew of #113 and #126 errors. All of which point to calls from the macros.
The Watch window is a complete mess:
Those missing registers are all defined:
Code:
CBLOCK 0x70 ;registers 0x70 to 0x7F accessible on from all banks
delayhi ;used in DelayCy macro
char
char_lo
XPos
;txbyte ;input to Put232
count
temp ;generic temp register
Reg3
Reg4
Reg5
Reg6
Reg7 ;AS3935 distance reg
ENDC
#define SCK PORTB,6 ;SPI clock
#define SDO PORTC,7 ;MOSI
#define SDI PORTB,4 ;MISO
#define CSn LATC,6 ;!SS or chip select, pin7
#define Ser_out LATC,4 ;serial output pin only used in LCD initialization CHECK PUT232&&&&&&&&&&&
#define TxOut 4 ;RC4,output pin bit number
#define SW1 5 ;RB5
#define SW2 7 ;RB7
What I have tried:
1) Turned everything off, disconnected, exited and reopened MPLab a few times. Same result.
2) Removed current version of program from the project tree and re-installed most recent previous version. Version has same macros . That version built fine. Reversed that process and re-installed current version -- still fails.
3) Tried going to release mode and programmer. Still doesn't work.
Assumption:
MPLab acts as if it has inserted some flag or block that is preventing it from loading/reading the entire code. Is there any way to look at what it may have done and forcibly make it read the whole code?
John