Pumpkin, Inc.

Pumpkin User Forums

Problem building tu5 (MPLABv7.01 && MCC18v2.4 && SALVOLITEv3.2.3 )

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Problem building tu5 (MPLABv7.01 && MCC18v2.4 && SALVOLITEv3.2.3 )

Postby david1024 » Mon May 23, 2005 11:34 am

Below is how tutorial 5 fails to compile for me. I have done the '$BINDIR-browse...' to get TU1-4 built, but when I use salvo ut u5syse u5lite.mcp, tu5 will not build.

Any idea on why this won't build?


Clean: Deleting intermediary and output files.
Clean: Deleted file "C:salvo ut u5main.o".
Clean: Done.
Executing: "C:mcc18inmcc18.exe" -p=18C452 "main.c" -fo="main.o" /i"C:salvo ut u5syse" /i"C:salvo ut u5syse.... u1" /i"C:salvo ut u5syse......inc" -DSYSE -DMAKE_WITH_FREE_LIB -DUSE_INTERRUPTS -Opa-
MPLAB C18 v2.40 (demo)
Copyright 1999-2004 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 41
Executing: "C:mcc18inmcc18.exe" -p=18C452 "isr.c" -fo="isr.o" /i"C:salvo ut u5syse" /i"C:salvo ut u5syse.... u1" /i"C:salvo ut u5syse......inc" -DSYSE -DMAKE_WITH_FREE_LIB -DUSE_INTERRUPTS -Opa-
MPLAB C18 v2.40 (demo)
Copyright 1999-2004 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 41
C:salvo ut u1isr.c:48:Error [1105] symbol 'TMR0' has not been defined
C:salvo ut u1isr.c:48:Error [1101] lvalue required
Halting build on first failure as requested.
BUILD FAILED: Mon May 23 14:24:36 2005

david1024
 
Posts: 5
Joined: Sun May 22, 2005 11:00 pm
Location: Mississippi State, MS, USA

Re: Problem building tu5 (MPLABv7.01 && MCC18v2.4 && SALVOLITEv3.2.3 )

Postby aek » Wed May 25, 2005 1:38 am

Yes.

Tu5 (and tu6) use interrupts and isr.c in order to implement delays via Salvo' timer services.

TMR0 is referenced in the ISR (in isr.c) and in Init() (to initialize the timer).

IIRC, thre is an issue surround the use of the term "TMR0" (as opposed to TMR0L and TMR0H) with the MPLAB-C18 compiler.

The best way to solve this in your case is to modify the Init() macro and the ISR so that you end up with an ISR that calls OSTimer() at a 10Hz rate.

The problem in your Build Results is simply that MPLAB-C18 doesn't know what TMR0 is -- it only knows about TMR0L and TMR0H.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Problem building tu5 (MPLABv7.01 && MCC18v2.4 && SALVOLITEv3.2.3 )

Postby david1024 » Thu May 26, 2005 8:42 am

Thanks for your reply.

I just put a "#define TMR0 TMR0L" below the "#if defined(USE_INTERRUPTS)" to fix the problem.

Although I suppose it should be in an #if defined(SYSE)....

Compiles fine now.

david1024
 
Posts: 5
Joined: Sun May 22, 2005 11:00 pm
Location: Mississippi State, MS, USA


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 4 guests