Pumpkin, Inc.

Pumpkin User Forums

Compiler Error (main.obj)

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®).

Compiler Error (main.obj)

Postby javamatte » Tue Oct 15, 2002 1:14 am

Hi...
I am using PICC LITE and Salvo Lite to try to evaluate if this is a product I can use. I have gone through AN-1 and AN-17 and finally gotten to the point where I can _almost_ compile Tut1. Here is the output of the compiler (i moved it to another directory so as not to mess up the original).


Compiling MAIN.C:
Command line: "C:STUFFPICHTC-LITEBINpicc.EXE -V -FAKELOCAL -G -O -Zg9 -DMAKE_WITH_FREE_LIB -E -ASMLIST -16F628 -IC:STUFFPICPROJSAL_TEST -DSYSA C:STUFFPICPROJSAL_TESTMAIN.C"

::undefined symbols: (error)
::_OSSched (MAIN.obj) (error)
::_OSInit (MAIN.obj) (error)


I am by no means a C guru, and I haven't the foggiest what it is looking for at this point. I have defined SYSA and MAKE_WITH_FREE_LIB. Am I missing some other define?

Lost,
Matt

javamatte
 
Posts: 4
Joined: Wed Aug 28, 2002 11:00 pm
Location: St. Louis, MO

Re: Compiler Error (main.obj)

Postby aek » Tue Oct 15, 2002 3:19 am

Hi Matt.

A couple of things:

1) PICC Lite (as opposed to the PICC demo version) should be able to compile our projects right off-the-bat (just change to 16F628). Or are you trying with PICC demo? They're not the same thing ...

2) While you may be able to compile a Salvo project for the 16F628, it is realistically too small (1K ROM, as I recall) to use Salvo for anything more than simple multitasking.

3) The errors you're getting are linker errors, yet the line you show is an invocation of the compiler (not linker). Could you please cut-and-paste the entire MPLAB Build Results window to your next post?

Thanks,

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

[This message has been edited by aek (edited October 15, 2002).]

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

Re: Compiler Error (main.obj)

Postby jtemples » Wed Oct 16, 2002 12:06 am

I notice there's no "-c" on that command line, so it probably really is trying link without the library.
jtemples
 
Posts: 45
Joined: Tue Jul 16, 2002 11:00 pm

Re: Compiler Error (main.obj)

Postby javamatte » Wed Oct 16, 2002 12:18 am

Well, I was apparently NOT using picc lite. I was using the demo version of the main compiler. I am now using the PICCLITE compiler, but getting basically the same error (btw, you have to use 16f627 for PICCLITE, go figure...).

Here is the output from the compile window (big and ugly):

code:
Building MAIN.HEX...

Compiling MAIN.C:
Command line: "C:STUFFPICPICCLITEBINPICL.EXE -V -FAKELOCAL -G -O -Zg9 -DMAKE_WITH_FREE_LIB -E -ASMLIST -16F628
-IC:STUFFPICPROJSAL_TEST -DSYSA C:STUFFPICPROJSAL_TESTMAIN.C"
clist.exe C:STUFFPICPROJSAL_TESTMAIN.C MAIN.lst
cpp.exe -DHI_TECH_C -D_MPC_ -SP1,1,1,1,1,1,1 -DMAKE_WITH_FREE_LIB -IC:STUFFPICPROJSAL_TEST -DSYSA
-IC:stuffpicPICCLITEINCLUDE -S1,2,2,4,3,3 -E1 -D_16F628 -D_PIC14 -D_COMMON_=1 -D_HTC_VER_MAJOR_=8 -D_HTC_VER_MINOR_=0 -D_HTC_VER_PATCH_=1 -D_BANKBITS_=1
-D_GPRBITS_=1 C:STUFFPICPROJSAL_TESTMAIN.C C:WINNTTEMP\_1LS.AAA
Warning[000] C:STUFFPICPROJSAL_TESTMAIN.C 14 : Redefining macro "SYSA"
Warning[000] C:STUFFPICPROJSAL_TESTMAIN.C 15 : Redefining macro "MAKE_WITH_FREE_LIB"
p1.exe -E1 -S -D -M -B -QTi,fastcall -QX,bank1 -QY,bank2 -QZ,bank3 -Gstrings,const -Y -r -u C:WINNTTEMP\_1LS.AAA C:WINNTTEMP\_1LS.AAB C:WINNTTEMP\_1LS.AAC
cglpic.exe -Og9 -DMAIN.sdb -P16F628 C:WINNTTEMP\_1LS.AAB C:WINNTTEMP\_1LS.AAA
aspic.exe -E1 -o -R400 -CC:stuffpicPICCLITELIBpiclite.ini -ver=V8.00PL1 -lMAIN.lst -oMAIN.obj C:WINNTTEMP\_1LS.AAA
hlink.exe -z -ol.obj -ppowerup=0,intentry=4,intcode,intret,init,end_init,clrtext,stringtable,pstrings,strings -ABANK0=020h-07Fh -prbit_0=BANK0,rbss_0=BANK0,rdata_0=BANK0,idata_0=CODE
-ABANK1=0A0h-0EFh -prbit_1=BANK1,rbss_1=BANK1,rdata_1=BANK1,idata_1=CODE -ACOMBANK=070h-07Fh -ptemp=COMBANK -ACODE=0-03FFh -ACONST=0-0FFhx4 -pconfig=2007h
-pidloc=2000h -AEEDATA=2100h-21FFh -peeprom_data=EEDATA -pfloat_text0=CODE,float_text1=CODE,float_text2=CODE -pfloat_text3=CODE,float_text4=CODE -pnvram=BANK0,nvram_1=BANK1
-pnvbit_0=BANK0,nvbit_1=BANK1 -Q16F628 -h+MAIN.sym -mC:WINNTTEMP\_1LS.AAE -ver=PICC#V8.00PL1 C:stuffpicPICCLITELIBpicrt40b.obj MAIN.obj C:stuffpicPICCLITELIBpic40b-c.lib
Error[000] : undefined symbols:
Error[000] : _OSSched (MAIN.obj)
Error[000] : _OSInit (MAIN.obj)
del l.obj
del C:WINNTTEMP\_1LS.AAE
del C:WINNTTEMP\_1LS.AAA
del C:WINNTTEMP\_1LS.AAB
del C:WINNTTEMP\_1LS.AAC
del l.obj
del C:WINNTTEMP\_1LS.AAD
Enter PICC -HELP for help

MPLAB is unable to find output file "MAIN.HEX". This may be due to a compile, assemble, or link process failure.

Build failed.


Hopefully that will help you shed some much-needed light on my problem

Thanks for your help!
-Matt

[This message has been edited by aek (edited October 16, 2002).]

javamatte
 
Posts: 4
Joined: Wed Aug 28, 2002 11:00 pm
Location: St. Louis, MO

Re: Compiler Error (main.obj)

Postby javamatte » Wed Oct 16, 2002 12:21 am

Oh, regarding the 627/628 issue...I updated my picinfo.ini to include a duplicate of the 16f627 entry, renaming it to 16f628 so that I could keep the pic type correct in MPLAB.

I get the same messages when the project target is changed to 16F627.

javamatte
 
Posts: 4
Joined: Wed Aug 28, 2002 11:00 pm
Location: St. Louis, MO

Re: Compiler Error (main.obj)

Postby aek » Wed Oct 16, 2002 3:20 am

Hi Matt.

Well, for starters, you haven't linked to any Salvo library ... you need sfp40Cab.lib. That's where OSSched() and OSInit() are ...

A couple of comments:

1) You're making things very hard for yourself by not installing the compiler or Salvo in their default directories. OK, maybe the compiler's location isn't really an issue, but by installing Salvo in a place other than drivename:salvo, you can't use all the demo projects. You should always get the demo projects to build first (as a check of your environment) before you try to build your own projects.

2) I suppose if you just link in the library and re-build, it will work. But I'm worried about the SYSA and MAKE_WITH_FREE_LIB redefinitions (and I can't see why they're happening) -- in all of our projects, you won't get any such warnings or errors on a successful build.

Please install Salvo in salvo (Salvo has no executables, so there are no DLL issues, etc -- it's just a bunch of files) and try the tutorial projects with PICC Lite, with the chip type set to 16F627 and change the "code" in the library name from whatever it's set to in the MPLAB Project Window's Nodes to 40C. If you want to do it with PICC demo, follow our App Note AN-17. Once you have that working, then consider doing your own projects in different directories, etc.

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

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

Re: Compiler Error (main.obj)

Postby aek » Wed Oct 16, 2002 3:35 am

Hi Matt.

For your convenience, I've attached the MPLAB v5.5 Build Results for salvo ut u1sysa for the 16F627.

code:
Building TU1FREE.HEX...

Compiling main.c:
Command line: "C:HT-PICBINPICC.EXE -FAKELOCAL -G -O -Zg9 -Isalvoinc
-E -16F627 -C -ISALVOTUTTU1SYSA -DMAKE_WITH_FREE_LIB -DSYSA salvo ut u1main.c"
Enter PICC -HELP for help
Serial number: HCPIC-0xxxx
Licensed to : ANDREW KALMAN

Compiling mem.c:
Command line: "C:HT-PICBINPICC.EXE -FAKELOCAL -G -O -Zg9 -Isalvoinc
-E -16F627 -C -ISALVOTUTTU1SYSA -DMAKE_WITH_FREE_LIB salvosrcmem.c"
Enter PICC -HELP for help
Serial number: HCPIC-0xxxx
Licensed to : ANDREW KALMAN

Linking:
Command line: "C:HT-PICBINPICC.EXE -FAKELOCAL -G -Mtu1free.map -E -16F627
-oTU1FREE.HEX salvo ut u1main.obj salvosrcmem.obj C:SALVOLIBSFP40CMB.LIB "
Enter PICC -HELP for help
Serial number: HCPIC-0xxxx
Licensed to : ANDREW KALMAN

Memory Usage Map:

Program ROM $0000 - $001A $001B ( 27) words
Program ROM $0390 - $03FF $0070 ( 112) words
$008B ( 139) words total Program ROM

Bank 0 RAM $0020 - $0025 $0006 ( 6) bytes
Bank 0 RAM $0070 - $0071 $0002 ( 2) bytes
$0008 ( 8) bytes total Bank 0 RAM

Bank 1 RAM $00A0 - $00A9 $000A ( 10) bytes total Bank 1 RAM


Program statistics:

Total ROM used 139 words (13.6%)
Total RAM used 18 bytes (8.0%)


Build completed successfully.


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

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


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 1 guest

cron