Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic18c452

Status
Not open for further replies.

fusian

New Member
i tried to compile the code 18motor.c using MPLABC18 but got the error message shown below...

181:Warning [2074] location PRODL specified in the interrupt save list is redundant
182:Warning [2074] location PRODH specified in the interrupt save list is redundant
468:Error [1105] symbol 'AARGB1' has not been defined
469:Error [1105] symbol 'AARGB0' has not been defined
477:Error [1105] symbol 'AARGB1' has not been defined
478:Error [1105] symbol 'AARGB0' has not been defined
485:Error [1105] symbol 'AARGB1' has not been defined
486:Error [1105] symbol 'AARGB0' has not been defined

shall i just ignore the warning message?

and what should i defined the AARGB0 & AARGB1 as?

i want to learn more about PIC programming in C, where can i find good tutorial? :D as all my previous projects are done in asm...

thanks!
 

Attachments

  • 18motor.c
    29.6 KB · Views: 282
The compiled program will not link if there is errors. It might link if there are warnings only.

The errors indicate the Compiler don't know about AARGB0 & AARGB1. It is possible that your "18motor.c" example is taken from the pre V3.02 Compiler time where compiler knows about these variables because they are reserved.

You can try prefixing the symbol name with two underscores to see if the errors went away.

See the following quote from the C18 change log.

#


# Fixed between v3.01 and 3.02:

(27624)
Using any of a set of symbols reserved for use by the compiler caused the compiler to emit a "type mismatch in redeclaration" error. The following symbols are no longer reserved for use by the compiler:

AEXP
BEXP
AARGB0 <<<
AARGB1 <<<
AARGB2
AARGB3
AARGB4
AARGB5
AARGB6
AARGB7
BARGB0
BARGB1
BARGB2
BARGB3
REMB0
REMB1
REMB2
REMB3
TEMP
TEMPB0
TEMPB1
TEMPB2
TEMPB3
FPFLAGS
FPFLAGSbits

If you are using any of these names to refer to the math library's variables, these can now be accessed by prefixing the symbol name with two underscores (e.g., __FPFLAGS).
 
thanks!

the error message is clear now! ;)

but now got another

Error - could not find file 'c018i.o'.
Errors : 1

i can find the file 'c018i.o' in directory c:/mcc18/lib , why still got this error?
 
In Microchip MPLAB, clicks

Project->Set Language Tool Locations->Microchip C18 Tool Suite->Default Search path & Directory->Library Search Path,$(LIBDIR)

Browse to or simply enter C:\MCC18\lib into the location text box beneath.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top