News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Assembler error on one PC but not on the other

Started by rick.curl, Oct 27, 2022, 03:07 PM

Previous topic - Next topic

rick.curl

I've got a strange problem and I don't know how to troubleshoot it. I needed to do some tweaks to some source I wrote a few years back and when I tried to compile it on my laptop computer I got several errors "Error[113] : Symbol not previously defined (__DELAY_US_WREG)".  I was thinking the error was due to an include "print4line.inc" that Tim Box kindly shared with me, but Tim tried it and it compiled OK. I tried it on a different PC, and I can confirm that it compiles without error. This is where I'm stumped.  The compiler version is identical on both PC's and the .bas file and the include is identical on both.

...So I can compile on my desktop PC but not on my laptop.  I really need to compile on the laptop so I cam make tweaks while I'm at a customer's shop.  Unfortunately I can't post the code because it goes in a commercial product. I know this makes it difficult to offer troubleshooting suggestions.   

Can anyone offer some troubleshooting tips as to how I might track down the problem?  Aside from the compiler version being identical and the source being identical, where should I look for differences between the two PC's?  Meanwhile I'll try to find a short snippet that throws the same error so I can post it here.

Thanks for any thoughts on this.

-Rick

joesaliba

Have you tried to shorten the file name?

I.e.: - Try to eliminate some folders into folders if I can explain it properly. I remember had same issue way back and that what I did to compile.

Joe

rick.curl

Quote from: joesaliba on Oct 27, 2022, 03:16 PMHave you tried to shorten the file name?
Hi Joe- Thanks for the suggestion but in this case it's in "C:\projects\gulf power" which should be short enough.
Out of curiosity, I moved it to C:\projects and got the same error.

trastikata

Rick,

is one of the PC an upgrade to Posiron and the other a clean install?

John Lawton

If you are using library code, the versions may be different. Can you list all the include files?

rick.curl

@trastikata: Both installs are upgrades.

@John: I copied the contents of the \ProtonIDE\PDS\Includes\Sources from the computer that compiles without error to the laptop, but the problem still remains.

Also- It occurs to me that even if I can create a snippet htat shows the problem, it will more than likely compile without errors on your systems.

Baffling.

top204

#6
The assembler errors are because the library code is calling the compiler's library subroutines that may not be enabled now for use with other commands, so they are not created in the compiler's library assembler codee. Or the subroutine's name has changed over the years. THis is why I do not recomment using direct calls to the compiler's library subroutines in assembler, because they may not always be the same as before, or use teh same variables as before etc...

You will need to find the names of the subroutines it does not like and change them to suit what the compiler now uses in its library assembler code. i.e. The block of assembler code at the beginning of the listing.


This is why it is very important to always keep a version of a compiler that has important code written within it, so it can still be used, then changed for newr compilers. And add to the program's header text what compiler version was used for the code. This also has to be done with most other compilers, and I regularly do it with BCB and Delphi.


John Drew

#7
Rick,
I can't add to the two computers issue but I can tell you that the original file from Tim had to be changed when there was a compiler update some years' back. It might have even been a Windows update. Too long ago.
The modification involved one assembler line in the Include file.
I put a corrected version on the old WIKI. Not sure if I've put it on this forum's WIKI.
If I haven't I'll put it up as soon as I can but not tonight or tomorrow,other commitments.
I had notes with it describing the change.
John

Rick, I see that Gevv has a zipped version of old forum files on the main menu. I can't see the modified file in the current WIKI. If you need it urgently that might solve your problem quickly.
J

rick.curl

Thanks, John, but in this case I do have the "patched" version of Tim's include, and it does compile on one computer here and on Tim's computer.

I am still trying to comprehend Les's response (just before yours). I am looking at the assembler listing, but not clear on what I'm looking for,

The assembler listing starts out like this:
    LIST
;{
;FILE F1 = C:\PROJECTS\GULF POWER\HVSUPPLY1_3G-100.BAS
;FILE F2 = C:\PROJECTS\GULF POWER\PRINT4LINENEW.INC
;}
;[VARIABLE LISTING]
;_B__VR2,0034,DT_BYTE,1
;A2D_VAL,0035,DT_MCHP_FLOAT,4
;A,0039,DT_WORD,2
;ACCEPTANCE,003B,DT_WORD,2
;ADAVG,003D,DT_MCHP_FLOAT,4
;AVGCOUNT,0041,DT_MCHP_FLOAT,4
;BALANCE,0045,DT_BYTE,1
;BAR_VAL,0046,DT_WORD,2
;BARS,0048,DT_BYTE,1
;CLASS_OPTION,0049,DT_BYTE,1
;CLASSVAR,004A,DT_BYTE,1
;CLASS_STR,004B,DT_STRING,12
;DUR,0057,DT_WORD,2
;F,0059,DT_BYTE,1
;FULL,005A,DT_BYTE,1
;KV_DIG,005B,DT_MCHP_FLOAT,4
;MAXKV,005F,DT_MCHP_FLOAT,4
;MENUV,0063,DT_BYTE,1
;MENUH,0064,DT_BYTE,1
;MINUTE,0065,DT_BYTE,1
;PARTIAL,0066,DT_BYTE,1
;PASS,0067,DT_WORD,2
;PWMVAL,0069,DT_WORD,2
;X,006B,DT_WORD,2
;RETEST,006D,DT_WORD,2
;RT_A2D,006F,DT_MCHP_FLOAT,4
;SECOND,0073,DT_BYTE,1
;SET_VAL,0074,DT_WORD,2
;SET_DIG,0076,DT_MCHP_FLOAT,4
;TEMPU,007A,DT_BYTE,1
;TEMPD,007B,DT_BYTE,1
;TEMPL,007C,DT_BYTE,1
;TEMPR,007D,DT_BYTE,1
;TEMPSTART,007E,DT_BYTE,1
;TEMPSTOP,007F,DT_BYTE,1
;TESTDUR,0080,DT_WORD,2
;TEST_SETVAL,0082,DT_MCHP_FLOAT,4
;TICKS,0086,DT_BYTE,1
;LCD#ENPINSELECT1,0033.0,DT_BIT
;LCD#ENPINSELECT2,0033.1,DT_BIT
;LCD_ENPORT2,0F81,DT_BYTE,1
;R,0F83.7,DT_BIT
;U,0F83.6,DT_BIT
;L,0F83.5,DT_BIT
;D,0F83.4,DT_BIT
;START,0F83.0,DT_BIT
;STOP_BTN,0F82.3,DT_BIT
;FAIL_IN,0F84.1,DT_BIT
;HORN,0F89.4,DT_BIT
;FLASH_OUT,0F8C.1,DT_BIT
;COMPLETE,0F8C.2,DT_BIT
;HVREQ,0F8C.3,DT_BIT
;FAIL_LED,0F89.5,DT_BIT
;COMP_LED,0F8D.0,DT_BIT
;I_LOCK,0F82.1,DT_BIT
;HVACK,0F82.0,DT_BIT
;FAULT,0F84.2,DT_BIT
;DCOUT,0F8B.6,DT_BIT
;ROOM,0F84.3,DT_BIT
;HV_CONT,0F8B.7,DT_BIT
;ACDC,0033.2,DT_BIT
;COMP_FLAG,0033.3,DT_BIT
;DPRESS,0033.4,DT_BIT
;LOWER,0033.5,DT_BIT
;LPRESS,0033.6,DT_BIT
;PWMHI,006C,DT_BYTE,1
;PWMLO,006B,DT_BYTE,1
;RPRESS,0033.7,DT_BIT
;RUNSTOP,0034.0,DT_BIT
;STARTPRESS,0034.1,DT_BIT
;STOPPRESS,0034.2,DT_BIT
;TIMESTART,0034.3,DT_BIT
;UPRESS,0034.4,DT_BIT
;[END LISTING]
;[TOTAL VARS] 135
But I don't see the names of any subroutines.

Can someone enlighten me?

Thanks!

rick.curl

I made the situation much worse. I did find the version of Proton that did the last successful compile.  It was 3.7.5.4.  I uninstalled the newer version of Proton and installed the old one.  Now when  I try to compile I get "A registration is required for device PIC18F4620...." even though the Spark dongle is installed.

At that point I uninstalled both Proton and Positron and attempted a clean install.  Now when I try to compile using Positron I get "Compilation failed. Unable to create new Assembler or Hex file.

Any advice would be greatly appreciated!

-Rick