Pumpkin User Forums
  PICmicro MCUs
  Compiler Error (main.obj)

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Compiler Error (main.obj)
aek
Moderator
posted October 16, 2002 16:35     Click Here to See the Profile for aek     Edit/Delete Message   Reply w/Quote
Hi Matt.

For your convenience, I've attached the MPLAB v5.5 Build Results for \salvo\tut\tu1\sysa for the 16F627.

code:
Building TU1FREE.HEX...

Compiling main.c:
Command line: "C:\HT-PIC\BIN\PICC.EXE -FAKELOCAL -G -O -Zg9 -I\salvo\inc
-E -16F627 -C -I\SALVO\TUT\TU1\SYSA -DMAKE_WITH_FREE_LIB -DSYSA \salvo\tut\tu1\main.c"
Enter PICC -HELP for help
Serial number: HCPIC-0xxxx
Licensed to : ANDREW KALMAN

Compiling mem.c:
Command line: "C:\HT-PIC\BIN\PICC.EXE -FAKELOCAL -G -O -Zg9 -I\salvo\inc
-E -16F627 -C -I\SALVO\TUT\TU1\SYSA -DMAKE_WITH_FREE_LIB \salvo\src\mem.c"
Enter PICC -HELP for help
Serial number: HCPIC-0xxxx
Licensed to : ANDREW KALMAN

Linking:
Command line: "C:\HT-PIC\BIN\PICC.EXE -FAKELOCAL -G -Mtu1free.map -E -16F627
-oTU1FREE.HEX \salvo\tut\tu1\main.obj \salvo\src\mem.obj C:\SALVO\LIB\SFP40CMB.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.


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

IP: 63.203.232.106

aek
Moderator
posted October 16, 2002 16:20     Click Here to See the Profile for aek     Edit/Delete Message   Reply w/Quote
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.

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

IP: 63.203.232.106

javamatte
Junior Member
posted October 16, 2002 13:21     Click Here to See the Profile for javamatte     Edit/Delete Message   Reply w/Quote
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.

IP: 12.105.115.18

javamatte
Junior Member
posted October 16, 2002 13:18     Click Here to See the Profile for javamatte     Edit/Delete Message   Reply w/Quote
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:\STUFF\PIC\PICCLITE\BIN\PICL.EXE -V -FAKELOCAL -G -O -Zg9 -DMAKE_WITH_FREE_LIB -E -ASMLIST -16F628
-IC:\STUFF\PIC\PROJ\SAL_TEST -DSYSA C:\STUFF\PIC\PROJ\SAL_TEST\MAIN.C"
clist.exe C:\STUFF\PIC\PROJ\SAL_TEST\MAIN.C MAIN.lst
cpp.exe -DHI_TECH_C -D_MPC_ -SP1,1,1,1,1,1,1 -DMAKE_WITH_FREE_LIB -IC:\STUFF\PIC\PROJ\SAL_TEST -DSYSA
-IC:\stuff\pic\PICCLITE\INCLUDE -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:\STUFF\PIC\PROJ\SAL_TEST\MAIN.C C:\WINNT\TEMP\_1LS.AAA
Warning[000] C:\STUFF\PIC\PROJ\SAL_TEST\MAIN.C 14 : Redefining macro "SYSA"
Warning[000] C:\STUFF\PIC\PROJ\SAL_TEST\MAIN.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:\WINNT\TEMP\_1LS.AAA C:\WINNT\TEMP\_1LS.AAB C:\WINNT\TEMP\_1LS.AAC
cglpic.exe -Og9 -DMAIN.sdb -P16F628 C:\WINNT\TEMP\_1LS.AAB C:\WINNT\TEMP\_1LS.AAA
aspic.exe -E1 -o -R400 -CC:\stuff\pic\PICCLITE\LIB\piclite.ini -ver=V8.00PL1 -lMAIN.lst -oMAIN.obj C:\WINNT\TEMP\_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:\WINNT\TEMP\_1LS.AAE -ver=PICC#V8.00PL1 C:\stuff\pic\PICCLITE\LIB\picrt40b.obj MAIN.obj C:\stuff\pic\PICCLITE\LIB\pic40b-c.lib
Error[000] : undefined symbols:
Error[000] : _OSSched (MAIN.obj)
Error[000] : _OSInit (MAIN.obj)
del l.obj
del C:\WINNT\TEMP\_1LS.AAE
del C:\WINNT\TEMP\_1LS.AAA
del C:\WINNT\TEMP\_1LS.AAB
del C:\WINNT\TEMP\_1LS.AAC
del l.obj
del C:\WINNT\TEMP\_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).]

IP: 12.105.115.18

jtemples
Member
posted October 16, 2002 13:06     Click Here to See the Profile for jtemples     Edit/Delete Message   Reply w/Quote
I notice there's no "-c" on that command line, so it probably really is trying link without the library.

IP: 209.239.242.114

aek
Moderator
posted October 15, 2002 16:19     Click Here to See the Profile for aek     Edit/Delete Message   Reply w/Quote
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).]

IP: 63.203.232.106

javamatte
Junior Member
posted October 15, 2002 14:14     Click Here to See the Profile for javamatte     Edit/Delete Message   Reply w/Quote
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:\STUFF\PIC\HTC-LITE\BIN\picc.EXE -V -FAKELOCAL -G -O -Zg9 -DMAKE_WITH_FREE_LIB -E -ASMLIST -16F628 -IC:\STUFF\PIC\PROJ\SAL_TEST -DSYSA C:\STUFF\PIC\PROJ\SAL_TEST\MAIN.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

IP: 12.105.115.18

All times are ET

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Pumpkin Home Page

2000-2008 Pumpkin, Inc. All Rights Reserved. Pumpkin and the Pumpkin logo, Salvo and the Salvo logo, The RTOS that runs in tiny places, CubeSat Kit and the CubeSat Kit logo are all trademarks of Pumpkin, Inc. All other trademarks are the properties of their respective owners.


Ultimate Bulletin Board 5.46a