To all: First let me apologize for the length of this email, but I think this exchange of dialog between myself and Hi-Tech C's support staff is important for all members of this list who use Hi-Tech C and MP-LAB. This dialog exchange revolves around the fact that I can compile two files and have one report an absolute error, yet the linker reports a successful build. Since there is no apparent resolution to this problem at this time, this email is being sent as a friendly warning to everyone affected to double check the output of their compiles even if the build appears successful. Sam.... -----Original Message----- From: support@htsoft.com [mailto:support@htsoft.com] To: Sam Linder Hi, >I disagree. Everytime I have a "normal" error, the compile process stops >dead in its tracks - even if there are other files needing to be built. Is >it possible that this particular error is not putting out the correct error >code for MPLAB to detect? I suspect that these "normal" errors are ones which prevent an object file being produced. With a missing declation in assembler code, the object is still produced as the actual resolution of addresses is not carried out until link time. You would have seen the exit status printed from the build window under MPLAB. As I recall it was "1". Since MPLAB can build for a variety of compilers, it cannot/does not make specific checks for error conditions, but relies on a general method which (as you have seen) works most of the time. -----Original Message----- From: Sam Linder To: support@htsoft.com [mailto:support@htsoft.com] Jeff: I disagree. Everytime I have a "normal" error, the compile process stops dead in its tracks - even if there are other files needing to be built. Is it possible that this particular error is not putting out the correct error code for MPLAB to detect? Sam.... -----Original Message----- From: support@htsoft.com [mailto:support@htsoft.com] To: Sam Linder Hi, >Attached is the project file and two 'C' files that demonstrate the problem. >I started with my original (almost 8k of code) files and kept whittling them >down until I was left with nothing but the bare minimum in the two files you >see here. Thanks for the files. What is happening is that MPLAB only looks for the object file after doing the compiler stage for each node. It does not look at the error/exit status of the compiler. Even though there is an error produced by the assembler, an object file is still produced. This would not happen if you were using our picc driver to do the entire build. I suspect that the link stage is operating successfully as there are no definitions missing, but you would want to check that in the assembler list files to confirm this. I will let Microchip know of this and see if the new version of MPLAB can be made to get around this as it could lead to confusion. Jeff. -----Original Message----- From: Sam Linder To: support@htsoft.com [mailto:support@htsoft.com] Jeff: Attached is the project file and two 'C' files that demonstrate the problem. My environment is: NT4.0, build 1381, Service Pack 5. Compiler Version: 7.87, patch-2 Compiler Serial Number: CPIC-11431 MP-LAB 5.30 IDE with the Hi-Tech tools installed properly (compile/link without this intentional error works fine) Compiler output follows: Building AG57.HEX... Compiling AG57MAIN.C: Command line: "C:\HT-PIC\BIN\PICC.EXE -V -Gag57.dbg -D24 -ASMLIST -FAKELOCAL -16F877 -C -IC:\HT-PIC\INCLUDE F:\HT-PIC\AG57\AG57MAIN.C" Enter PICC -HELP for help clist.exe f:\ht-pic\ag57\ag57main.c ag57main.lst cpp.exe -DHI_TECH_C -D_MPC_ -SP1,1,1,1,1,1,1 -IC:\HT-PIC\INCLUDE -IC:\HT-PIC\INCLUDE -S1,2,2,4,3,3 -D_16F877 -D_PIC14 -D_COMMON_=1 -D_HTC_VER_MAJOR_=7 -D_HTC_VER_MINOR_=87 -D_BANKBITS_=2 f:\ht-pic\ag57\ag57main.c C:\TEMP\$$023389.000 del C:\TEMP\$$023389.003 p1.exe -S -D -M -B -QTi,fastcall -QX,bank1 -QY,bank2 -QZ,bank3 -Gstrings,const -Y -r -u C:\TEMP\$$023389.000 C:\TEMP\$$023389.001 C:\TEMP\$$023389.002 del C:\TEMP\$$023389.003 cgpic.exe -Dag57main.sdb -P16F877,2,8192,4,0,2,0,112-127,1 C:\TEMP\$$023389.001 C:\TEMP\$$023389.000 aspic.exe -R2000 -CC:\HT-PIC\LIB\picinfo.ini -ver=V7.87PL2 -lag57main.lst -oag57main.obj C:\TEMP\$$023389.000 del C:\TEMP\$$023389.000 del C:\TEMP\$$023389.001 del C:\TEMP\$$023389.002 del C:\TEMP\l.obj del C:\TEMP\$$023389.003 Compiling TESTPOW.C: Command line: "C:\HT-PIC\BIN\PICC.EXE -V -D24 -ASMLIST -FAKELOCAL -16F877 -C -IC:\HT-PIC\INCLUDE F:\HT-PIC\AG57\TESTPOW.C" Enter PICC -HELP for help clist.exe f:\ht-pic\ag57\testpow.c testpow.lst cpp.exe -DHI_TECH_C -D_MPC_ -SP1,1,1,1,1,1,1 -IC:\HT-PIC\INCLUDE -IC:\HT-PIC\INCLUDE -S1,2,2,4,3,3 -D_16F877 -D_PIC14 -D_COMMON_=1 -D_HTC_VER_MAJOR_=7 -D_HTC_VER_MINOR_=87 -D_BANKBITS_=2 f:\ht-pic\ag57\testpow.c C:\TEMP\$$023390.000 del C:\TEMP\$$023390.003 p1.exe -S -M -B -QTi,fastcall -QX,bank1 -QY,bank2 -QZ,bank3 -Gstrings,const -Y -r -u C:\TEMP\$$023390.000 C:\TEMP\$$023390.001 C:\TEMP\$$023390.002 del C:\TEMP\$$023390.003 cgpic.exe -P16F877,2,8192,4,0,2,0,112-127,1 C:\TEMP\$$023390.001 C:\TEMP\$$023390.000 aspic.exe -q -R2000 -CC:\HT-PIC\LIB\picinfo.ini -ver=V7.87PL2 -ltestpow.lst -otestpow.obj C:\TEMP\$$023390.000 C:\TEMP\$$023390.000: 21: undefined symbol _ui_tempresult (error) Exit status = 1 del C:\TEMP\$$023390.000 del C:\TEMP\$$023390.001 del C:\TEMP\$$023390.002 del C:\TEMP\l.obj del C:\TEMP\$$023390.003 Linking: Command line: "C:\HT-PIC\BIN\PICC.EXE -q -Gag57.dbg -INTEL -Mag57.map -PSECTMAP -ICD -16F877 -oAG57.HEX -fakelocal AG57MAIN.OBJ TESTPOW.OBJ " Enter PICC -HELP for help Psect Usage Map: Psect | Contents | Memory Range ---------|--------------------------|-------------------- powerup | Power on reset code | $0000 - $0003 init | Initialization code | $0004 - $0007 end_init | Initialization code | $0008 - $000B clrtext | Memory clearing code | $000C - $0012 text | Program and library code | $07F8 - $07FA text0 | Program and library code | $07FB - $07FF rbss_0 | Bank 0 RAM variables | $0020 - $0021 Memory Usage Map: Program ROM $0000 - $0012 $0013 ( 19) words Program ROM $07F8 - $07FF $0008 ( 8) words $001B ( 27) words total Program ROM Bank 0 RAM $0020 - $0021 $0002 ( 2) bytes total Bank 0 RAM Build completed successfully. Sam.... -----Original Message----- From: support@htsoft.com [mailto:support@htsoft.com] Sent: Wednesday, August 08, 2001 4:07 PM To: Sam Linder Hi, > I'm still having problems with the linker reporting a successful build > even though the compiler reported an error in one of the modules. > Is there some compile or link switch that I may be missing that should > stop the build on an error? If you are using the MPLAB IDE to compile, then our driver does not have anything to do with the build process flow. MPLAB calls the driver for each source file telling it to stop at the object stage. Then it is called again to do the link step. It is up to MPLAB to ensure that the link is not performed if there were problems at the compile stage. It is possible that MPLAB is not seeing the exit status of the compiler. Check in the "Install Language Tool..." that all tools are set to command line, not windowed. I have not seen this sort of thing before. You could ask Microchip for suggestions. You could send the project file so I could take a look at it. Jeff. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu