MPLAB 6.30 Compile Problem

Status
Not open for further replies.

Mercury

Member level 3
Joined
Oct 7, 2003
Messages
67
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
612
mplab 6.30

Hello!
Am am starting to use the PIC MCUs. So far I have been using the AVRs ( which are by the way great ) but now I would like to try something different.

I have installed the MPLAB IDE v6.30, and followed the MPLAB IDE Quick Start Guide. I have written the code on page 9 ( or 5 ). I fail to compile, Reason:

Error[113] H:\PIC\CNT452.ASM 15 : Symbol not previously defined (wreg)
Error[113] H:\PIC\CNT452.ASM 16 : Symbol not previously defined (portc)
Error[113] H:\PIC\CNT452.ASM 17 : Symbol not previously defined (trisc)
Error[113] H:\PIC\CNT452.ASM 25 : Symbol not previously defined (portc)

OK, the problem here is that the #include statement is not working. However, the assembler finds the file because I don't get the File Not Found error. It simply doesn't include the .inc file as it should. So what am I doing wrong???

Best Regards
George
 

error[113] symbol not previously defined (wreg)

for clrf wreg try to use clrw since W is not a memory mapped register, but something like accumulator (it is called Working register)
for movwf portc try to use movwf PORTC since assembler is set case sensitive by default (You can disable it, but it is sometime usefull)
 

microchip mplab 6.30

Try to put string like this INCLUDE p16f628.inc
 

error[113] symbol not previously defined (wreg)

You were right. The problem was in case sensitivity. As I am used to AVR assembler this was a problem.
Anyway, can you also please tell me, where do I get the information how many words of program memmory does my program occupy?

George Mercury
 

download mplab 6.3

Mercury said:
Anyway, can you also please tell me, where do I get the information how many words of program memmory does my program occupy?
Have a look at the end of .lst file, there are program statistics like program memory used/left, program memory usage map, symbol list.
 

mplab error messages 113

Thanks! However I have just encountered annother problem, which I was not used to having with AVR Studio. Since my asm codes are sometimes very long I tend to make many .asm files ( a few hundred lines of code each ) and then one .asm files which uses "#include"s to gather all the asm files togeter. This file is then assembeled. The problem with MPLAB is that it wants to compile every asm file in the project ( under the folder "Source Files" ) as an individual .asm file. So how do I tell the project that I want to compile just one .asm file ( the one with "include"s ) and not every asm files seperatly?

George
 

mplab memory usage

I have no idea, but mplab for large project is using separate asm file and linker script to join them to one binary file. However I haven`t ever tested it writing myself, I have saw it in pic16c765 usb firmware sample code and it was working.
 

error 152 mplab

I also have a MPLAB 6.3 problem where the file 'builds' ok but each time I try to burn a 16f628 it returns a 'fail' and I get an error message 'configuration bits error'

When the program verifies itself after the burn it returns with the OSC, Code Protect, Master clear and Data EE protect bits set differently to that in the ASM file and set manually in MPLAB before programming.

I have also installed an older version of MPLAB 5.7 and have found the same problem.

The burner itself seems to work as it will burn an imported HEX file fine.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…